Boost logo

Boost-Commit :

From: pbristow_at_[hidden]
Date: 2008-05-24 12:37:11


Author: pbristow
Date: 2008-05-24 12:37:10 EDT (Sat, 24 May 2008)
New Revision: 45726
URL: http://svn.boost.org/trac/boost/changeset/45726

Log:
A start on getting docs back up to program, but much work needed still.
Text files modified:
   sandbox/SOC/2007/visualization/libs/svg_plot/doc/1d_tutorial.qbk | 12 ++++++++++++
   sandbox/SOC/2007/visualization/libs/svg_plot/doc/2d_tutorial.qbk | 1 +
   sandbox/SOC/2007/visualization/libs/svg_plot/doc/interface.qbk | 23 ++++++++++++-----------
   sandbox/SOC/2007/visualization/libs/svg_plot/doc/plot_defaults.qbk | 7 +++----
   sandbox/SOC/2007/visualization/libs/svg_plot/doc/rationale.qbk | 17 +++++++++++++++++
   5 files changed, 45 insertions(+), 15 deletions(-)

Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/1d_tutorial.qbk
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/1d_tutorial.qbk (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/1d_tutorial.qbk 2008-05-24 12:37:10 EDT (Sat, 24 May 2008)
@@ -2,14 +2,26 @@
 
 [include 1d_simple_tutorial.qbk]
 
+[include 1d_vector_tutorial.qbk]
+[include demo_1d_containers.qbk]
+[/include auto_1d_containers.qbk]
+[include auto_1d_plot.qbk]
+
 [include 1d_full_tutorial.qbk]
 
 [include 1d_special_tutorial.qbk]
 
+[include 1d_autoscale_containers.qbk]
+
+[include demo_1d_axis_scaling.qbk]
+[include demo_1d_autoscaling.qbk]
+[include demo_1d_values.qbk]
+
 [endsect] [/1d_tutorial]
 
 [/ 1d_tutorial.qbk
   Copyright 2008 Jake Voytko.
+ Copyright 2008 Paul A. Bristow.
   Distributed under the Boost Software License, Version 1.0.
   (See accompanying file LICENSE_1_0.txt or copy at
   http://www.boost.org/LICENSE_1_0.txt).

Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/2d_tutorial.qbk
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/2d_tutorial.qbk (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/2d_tutorial.qbk 2008-05-24 12:37:10 EDT (Sat, 24 May 2008)
@@ -3,6 +3,7 @@
 [include 2d_simple_tutorial.qbk]
 [include 2d_full_tutorial.qbk]
 [include 2d_special_tutorial.qbk]
+[/include auto_2d_plot.qbk]
 
 [endsect] [/2d_tutorial]
 

Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/interface.qbk
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/interface.qbk (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/interface.qbk 2008-05-24 12:37:10 EDT (Sat, 24 May 2008)
@@ -1,6 +1,6 @@
 [section:interface Public Interfaces]
 
-[include svg_interface.qbk]
+[include svg_interface.qbk] [/ just the SVG functions.]
 
 [section:svg_1d_plot_interface `svg_1d_plot` Public Interface]
 [table 1D_plot Miscellaneous Functions
@@ -14,7 +14,7 @@
   
   [[`svg_1d_plot& legend_title_font_size(unsigned int)`] [Sets the font size for the legend title.] [14]]
   [[`svg_1d_plot& legend_color(const svg_color& col)`] [Sets the color to be used for the legend text.] [black]]
- [[`svg_1d_plot& title(const std::string&)`] [Sets the string to be used for the title.] [""]]
+ [[`svg_1d_plot& title(const std::string&)`] [Sets the string to be used for the title. Switches `title_on` to `true`.] [""]]
   [[`svg_1d_plot& title_font_size(unsigned int)`] [Sets the font size for the title.] [16]]
   [[`svg_1d_plot& title_color(const svg_color& col)`] [Sets the color to be used for the title.] [black]]
   [[`svg_1d_plot& write(const std::string&)`] [Writes the plot to the file passed as a parameter.]]
@@ -26,10 +26,10 @@
   [[`svg_1d_plot& axis_on(bool)`] [Sets if the X-axis is on (true) or off.] [true]]
   [[`svg_1d_plot& legend_on(bool)`] [Sets if the legend is on (true) or off.] [true]]
   [[`svg_1d_plot& plot_window_on(bool)`] [Sets if the plot window border will be displayed.] [false]]
- [[`svg_1d_plot& title_on(bool)`] [Sets if image title is displayed.] [true]]
- [[`svg_1d_plot& x_axis_on(bool)`] [Sets if X-axis is displayed.]]
+ [[`svg_1d_plot& title_on(bool)`] [Sets if image title is displayed.] [false, until title string assigned.]]
+ [[`svg_1d_plot& x_axis_on(bool)`] [Sets if X-axis is displayed.]]
   [[`svg_1d_plot& x_external_style_on(bool)`] [Sets if axis is inside or outside of the plot.] [false]]
- [[`svg_1d_plot& x_label_on(bool)`] [Sets if X-axis label will show.][true]]
+ [[`svg_1d_plot& x_label_on(bool)`] [Sets if X-axis label will show.][false, until label assigned.]]
   [[`svg_1d_plot& x_major_labels_on(int)`] [Sets if major ticks will be labelled on the X-axis. ][true]]
   [[`svg_1d_plot& x_major_grid_on(bool)`] [Sets if major grid on the X axis will be displayed.] [false]]
   [[`svg_1d_plot& x_minor_grid_on(bool)`] [Sets if minor grid on the X axis will be displayed.] [false]]
@@ -79,9 +79,11 @@
 [table 1D_plot Required parameter
 [[ID] [Type (* is a wildcard)] [Description] [Default]]
 [[container] [*] [Any object that can return an iterator with begin() and end()]]
-[[title] [`std::string`] [The name of this data series.]]
+[[title] [`std::string`] [The name of this data series. ]]
 ] [/ table 1D_plot Required parameter]
 
+[note To use special characters, insert the XML character entity equivalents: for example: left angle bracket <, right angle bracket >, and ampersand &, double-quotation marks " for single-quotation marks '. You can use numeric character references, such as ¥ for Greek and Math symbols.]
+
 [table 1D_plot Deduced parameter
 [[ID] [Type] [Description] [Default] [Default]]
 [[fill_color] [`svg_color`] [Color that shows *inside the circle* being drawn.] [white]]
@@ -92,7 +94,7 @@
 [[stroke_color] [`svg_color`] [Outline of the circle that is being drawn.] [black] ]
 [[point_style] [`point_shape`] [Shape of the point. Options currently are: [^none], [^circle], and [^square].] [circle]]
 [[size] [`unsigned int`] [Height/width of the circle and square.] [10]]
-[[x_functor] [*] [A class or functor that contains a conversion function. You will not have to worry about this, unless you are trying to plot a container of type that does not have a conversion to double, for example, age of a user-defined type `humans`. For example:
+[[x_functor] [*] [A class or functor that contains a conversion function. You will not have to worry about this, unless you are trying to plot a container of type that does *not* have a conversion to double, for example, age of a user-defined type `humans`. For example:
 ``
 class my_functor
 {
@@ -140,7 +142,7 @@
   [[`svg_2d_plot& y_axis_on(bool)`] [Set if Y-axis drawn.] [true]]
   [[`svg_2d_plot& legend_on(bool)`] [Sets if the legend box is shown.] [true]]
   [[`svg_2d_plot& plot_window_on(bool)`] [Sets if the plot window border will be drawn.] [true]
- [[`svg_2d_plot& title_on(bool)`] [Sets if image title is displayed.] [true]]
+ [[`svg_2d_plot& title_on(bool)`] [Sets if image title is displayed.] [false, until title assigned.]]
   [[`svg_2d_plot& title_color(svg_color)`] [Sets color for title.] [true]]
   [[`svg_2d_plot& x_label_on(bool)`] [Sets if X axis label is displayed.] [true]]
   [[`svg_2d_plot& x_major_grid_on(bool)`] [Determines whether or not the major grid on the X axis will be displayed.] [false]]
@@ -153,15 +155,14 @@
   < 0 means to left (default), 0 (false) means none, > 0 means to right.] [left]]
   [[`svg_2d_plot& y_minor_grid_on(bool)`] [Sets if the minor grid on the Y axis will be displayed.] [false]]
   
- [[`svg_2d_plot& x_label_on(bool)`] [Sets the label string for the X-axis.] ]
+ [[`svg_2d_plot& x_label_on(bool)`] [Sets the label string for the X-axis.] [false, until label assigned.]]
   [[`svg_2d_plot& x_label_on()`] [Returns if to show the label string for the X-axis.] ]
- [[`svg_2d_plot& y_label_on(bool)`] [Sets to show the label string for the Y-axis.] ]
+ [[`svg_2d_plot& y_label_on(bool)`] [Sets to show the label string for the Y-axis.] [false, until label assigned.]]
   [[`svg_2d_plot& y_label_on()`] [Returns if to show the label string for the Y-axis.] ]
   
   [[`svg_2d_plot& x_major_labels_on(int)`] [Sets if to show the value labels for the X-axis. < 0 means to down (default), 0 (false) means none, > 0 means to top] ]
   [[`svg_2d_plot& y_major_labels_on(int)`] [Sets if to show the value labels for the Y-axis. < 0 means to left(default), 0 (false) means none, > 0 means to right ] ]
   
-
   [[`svg_2d_plot& x_value_precision(int)`] [Sets the iostream precison for value labels on the X axis major ticks will be displayed. Default is 3 (rather than the iostream default of 6).]]
   [[`svg_2d_plot& x_value_ioflags(int)`] [Sets the iostream flags for value labels on the X axis major ticks will be displayed. Default is std::ios::dec. This allows fine control of the value labels using, for example (ios::dec | ios::scientific), or (ios::dec | ios::fixed), particularly in conjunction with precision.]]
   [[`svg_2d_plot& y_value_precision(int)`] [Sets the iostream precison for value labels on the Y axis major ticks will be displayed. Default is 3 (rather than the iostream default of 6).]]

Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/plot_defaults.qbk
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/plot_defaults.qbk (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/plot_defaults.qbk 2008-05-24 12:37:10 EDT (Sat, 24 May 2008)
@@ -8,7 +8,6 @@
   [[All colors not defined in this table] [black] [Coloring, if any, will be highly dependent on user needs.]]
   [[Axis] [On, internal style] [Most graphs include an axis of some kind. The internal axis style is used because this seems to be the default behavior in many textbooks I have owned.]]
   [[Coordinate precision] [3 decimal digits] [Sufficient 1 in 1000 precision for typical small plots. (Higher precision will increase svg file size).]]
-
   [[Distance between major X ticks] [`3 units`] [Reasonably fits into a plot window.]]
   [[Font size of the legend title] [12] [Reasonable when paired with the image size.]]
   [[Font size of the X Label] [12] [Reasonable when paired with the image size.]]
@@ -27,10 +26,10 @@
   [[Plot window background] [white] [Coloring, if any, will be highly dependent on user needs.]]
   [[Title] [On, `"Plot of data"`] [The title is on because this is one of the most basic elements of a graph. The title is set to a default because when `title_on == true`, something should display.]]
   [[Title size] [`30`] [This is clearly visible in a variety of image sizes.]]
- [[X Axis Label] [`"X Axis"`, Off] ["X Axis" is the label because /something/ should display were the user to turn on the X-axis label without setting text.]]
+ [[X Axis Label] [`""`, Off] [No space should be used if no label is required.]]
   [[X Axis Label Size] [`12`] [This is a reasonable size at the default image size.]]
   [[X Grid (Major and Minor)] [Off] [Turned off in the interest of providing simple, clean plots.]]
- [[X Range] [`(-10, 10)`] [Traditional plot viewport (but almost all plots will need to set both X and Y ranges).]]
+ [[X Range] [`(-10, 10)`] [Traditional plot viewport (but almost all plots will need to set both X and Y ranges, using with autoscale).]]
   ]
 
 [endsect ][/section:1d_defaults `svg_1d_plot` Defaults]
@@ -62,7 +61,7 @@
   [[Title] [On, `"Plot of data"`] [The title is on because this is one of the most basic elements of a graph. The title is set to a default because when `title_on == true`,
   /something/ should display.]]
   [[Title size] [`30`] [This is clearly visible in a variety of image sizes.]]
- [[X Axis Label] [`"X Axis"`, Off] ["X Axis" is the label because /something/ should display were the user to turn on the X axis label without setting text.]]
+ [[X Axis Label] [`"X Axis"`, Off] ["X Axis" .]]
   [[X Axis Label Size] [`12`] [This is a reasonable size at the default image size.]]
   [[X Grid (Major and Minor)] [Off] [Turned off in the interest of providing simple, clean plots.]]
   [[X Range] [`(-10, 10)`] [Traditional plot viewport.]]

Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/rationale.qbk
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/rationale.qbk (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/rationale.qbk 2008-05-24 12:37:10 EDT (Sat, 24 May 2008)
@@ -1,5 +1,22 @@
 [section:implementation Implementation & Rationale]
 
+[h4 Switches for axis labels and autoscaling]
+
+If a axis label string is provided, or autoscaling is requested, it is assumed that it should be displayed/acted on.
+So there functions have the effect of switching these options on, as if , for example:
+
+`x_autoscale(true);`
+`y_label_on(true);`
+
+This avoids users providing an axis label string and then wondering why it appears to have no effect.
+
+It also avoids wasting plot space for empty labels.
+
+It is still possible to switch these options off, for example with:
+
+`x_autoscale(false);`
+`y_label_on(false);`
+
 [h4 Number of Minor ticks]
 
 `x_num_minor_ticks()` and `x_num_minor_ticks()`


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk