Boost logo

Boost :

From: Paul A Bristow (pbristow_at_[hidden])
Date: 2007-05-23 10:03:34

I've been collecting a shopping list of possibly desirable features for Jake Voytko's GSoC STL containers as SVG plots.

Project and class names?

Boost.Plot? - as Boost.Graph is 'spoken for' - and does that mean that to avoid confusion we should always use the work plot rather
than graph? Like

  svg_plot my_plot("my_plot1.svg");

rather than

  svg_graph my_graph("test.svg"); // Construct class

Best to get the name right as early as possible?

Features of plots I have thought that are (or might be) wanted are:
* overall (called chart area in Excel - is this the right name?) background box colour, if any.
* background border? colour, if any
* axes area background and/or border? (called plot area in Excel)
* title, font, size and colour
* axis lines, thickness, colour?
* axis labels (and perhaps separate units) default x axis (y axis, z axis)?
* axis markers (or not), major (and minor?) width, length and colour. default of these, marks inside or outside
* (separate for x, (y and z), logarithmic, and anti) axis?/axes
* axis marker labels - as vector of pairs of values and short strings of values? max, min, Auto option, axis
* must go through origin?
* should axes be scaled, for example, if all values are in range 1e-6 to 9e-6, should be axes be 1. to 10. with a scale
factor of 1e-6?

* data marker symbol like * x . | |_| etc, size, boldness and color (and outline?). Lines or Blocks can be used to show 1D as
histograms if they can optionally be used to stack on top of each other.
* data value labels? - showing the x (y & z) value of each data point: font, size, colour, position? format?
* should data values be show with the same scale factor as axes, or include any exponent 1.23e6?
* multiple data series,
* series legend, position (top, bottom , left right exact) , font, colour, border?

* gridlines?? Not a priority,but some people will probably want them, sometimes.

* lines (colour, thinkness) and/or curves joining data points.
* lines representing a fitted line or curve - lower prority as users can always do this themselves.

* Will need greek for all sorts of text (labels, title legends), so use Unicode strings? Need sub and superscript too, and other
symbols like sqrt? Maybe worry about this later?

data sources

x data points in 'container' (C array, Boost array, std::vector, std::list, std::deque, circular_buffer)
(I'm using container to include C arrays that are not strictly STL containers).

* Default is to plot all in the container, but also:
count of values, starting with 1st,
index of 1st and last values.
iterator to 1st and last.

* Similarly for x & y data (perhaps even x & y & z data).

* y values at equally spaced x with start and finish indexes and iterators, or count of values? Default for array, vector...?

* array x values, array y values, container x & y pairs, (container x, y, z as tuples)
* container of 'points' as a struct double, double?

* Function like y = mx + c, y = sin(x) ... as source (but need to specify the limits of x (and/or y??)).
(This will also be useful to show fitted lines or curves on top of the data points).

* need to provide svg class member functions with defaults for all, as well as control of *all* details.

* getter functions like my_graph.point_color() returning red?

Views on priorities, and things I have missed?


Paul A Bristow
Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB
+44 1539561830 & SMS, Mobile +44 7714 330204 & SMS

Boost list run by bdawes at, gregod at, cpdaniel at, john at