I have developed a plotting library (currently only has linear x-y and polar types) as I am a scientist and unhappy with the way a lot of data visualisation programs do graphing (e.g. Matlab/Scilab/Origin; all produce laughably unprofessional plots). Cairo graphics being vector based offered a good solution to the resolution issues in taking screenshots of these plots. I also wanted it to be fast as I often deal with sets of 64k data points and had seen major performance lags in other plotting modules (e.g. in OpenOfficeCalc).
The source code can be obtained from https://github.com/pchilds/GtkPlot/downloads
I have a version for gtk2 and for gtk3 in order to set which one gets built run
./reversion.sh x 0 0 0 0
from the command line where x is either 2 or 3.
For those on a debian based system there is also a debian branch containing the packaging scripts. After reversioning just run
from the command line in order to build the .deb binaries.
Otherwise use the standard autotools based installation (instructions in the INSTALL file)
Screenshots are below from test programs (included in the code as TestPlotLinear and TestPlotPolar). I welcome all comments about my ignorance and how to improve the program/packaging. Please let me know if you have any features you'd like from it. the more people that use it and the more feedback I get, the better it can become.
* Multiple Plots (data from a 2d array is selected by index, length and stride to allow flexible formats)
* Automatic axis rescaling to nice neat integer * power of 10 values through the _update_cale_pretty functions.
* Cut axes (i.e. a wiggle is inserted if the range doesn't include the origin) to both maximise the view and avoid confusion (e.g. if axes don't cross at the origin).
* utf support through pangocairo
* display configurability (points&|lines, linewidth, pointsize, colour)
* Can print the graph to png, svg and eps (useful for those who use latex).
* zoomable ranges (in single click or drag; horizontally, vertically or both -- radially /azimuthally for the polar case)
* signal emission for cursor coordinates
* accessibility support (in progress)
* and lastly - bloody fast! (due to the painful way in which I code)
File comment: Screenshot of a program implementing GtkPlotLinear
plotlinear.png [ 45.1 KiB | Viewed 6254 times ]
File comment: Screenshot of a program implementing GtkPlotPolar
plotpolar.png [ 130.61 KiB | Viewed 6254 times ]