I was wondering if there were any good free graphics libraries for C that are easy to use? It's for plotting 2d and 3d graphs and then saving to a file. It's on a Linux system and there's no gnuplot on the system right now.
Or would it just be simpler to switch to another language, and if so which one would be easy to learn?
I like the Cairo library. It has a nice interface to C and it can output in many formats.
To plot 2D and 3D graphs in C I would recommend the library DISLIN. You can see examples here or there.
The code is pretty easy to use and gives nice results.
I've used netpbm format a few time when I needed something simple.
That's how I found out that
qsort()
(in my implementation and for the data provided) performs a merge sort!Source code:
I recommend the Qt GUI toolkit, coupled with the open-source QwtPlot and QwtPlot3D. It's implemented in C++, easy-to-use, extensible, and free...
Most people use the gd library for rendering from C but you must implement the "math plotting" part.
This question is a bit vague, "graphics" is a wide field. You can get pretty far using just plain SDL, but it might also be considered "too low-level". You need to provide more requirements.