Boost logo

Boost :

From: Jake Voytko (jakevoytko_at_[hidden])
Date: 2007-04-03 12:37:31


The C++/STL library does not provide a quick and easy way for a
visualization of numerical data to occur, and neither does Boost. I
propose writing a minimal SVG class that can write in the SVG
(Scalable Vector Graphics) format along with helper functions to help
users visualize data stored in arrays as well as common STL
containers. There will also be a subclass, svg_graph, that acts as a
user interface for the graph data. The user will be able to customize
how they would like the graph to be styled, and the data to be
displayed. Since the SVG format is recognized by all major browsers,
these could easily be incorporated with Boost documentation in place
of .jpg or .gif files.

The users would be able to change settings in a stream-like fashion. A
sample of how the user might be able to use the class is as follows:

svg_graph my_graph("test.svg");

//customize visualization settings

my_graph<<line_color(black)<<point_color(blue);
my_graph<<x_range(-10, 10)<<y_range(0, 5);

my_graph<<plot_range(iterator1_begin, iterator1_end);

//change values for second set of data points

my_graph<<line_color(gray)<<point_color(yellow);

my_graph<<plot_range(iterator2_begin, iterator2_end);

//write output to file

my_graph<<write();

This syntax is easy enough for a neophyte in their beginner C++ class
to be able to plot data from their statistics class on a graph, and
more advanced options can be provided for power users, such as
providing streams other than filenames.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk