Rplot: A C++ library for producing raster images
Introduction
Rplot is a C++ library for the fast production of graphs and
images. The main features to recommend it are:
- PNG, Encapsulated postscript or PPM output
- Capable handling of `raster' data on a rectangular grid, such as produced by a cloud radar
- Fonts taken from an X font server, so prettier than gnuplot!
However
- Many missing features: contouring, 3D graphs etc.
- It's undocumented - look at plot/chilplot.cpp for an
example of its implementation and include/rplot.h for all the
available methods
I wrote it because
- None of the established programming libraries seemed capable of
producing nice raster images of cloud radar data for use on the web,
and many produce intolerably ugly plots (e.g. gnuplot)
- It was the perfect way to learn C++
Why PNG?
- Portable Network
Graphics is a compressed, lossless graphics format supporting 8,
24 and 32 bit images, and is understood by all modern web browsers
- Unlike GIF it is free from patent restrictions, so it is legal to
generate PNG images using free software
- Compression is better than GIF and significantly better than JPG
for 8-bit images
Portability issues
Well, you need the PNG library (version 1.0 or greater), but the main
problem for portability is that if any text is used then an X font
server must be contacted at run-time to provide fonts. To compile you
therefore need the header files for the X font server component of the
X Window System, which on a UNIX/Linux machine with X Version 11,
Release 6 installed are usually found in /usr/X11R6/include/X11/fonts.