Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55701 - sandbox/SOC/2007/visualization/libs/svg_plot/example
From: pbristow_at_[hidden]
Date: 2009-08-21 13:39:30


Author: pbristow
Date: 2009-08-21 13:39:28 EDT (Fri, 21 Aug 2009)
New Revision: 55701
URL: http://svn.boost.org/trac/boost/changeset/55701

Log:
Further docs updates.
Text files modified:
   sandbox/SOC/2007/visualization/libs/svg_plot/example/auto_1d_containers.cpp | 6 +-
   sandbox/SOC/2007/visualization/libs/svg_plot/example/auto_1d_plot.cpp | 76 +++++++++++++++++++--------------------
   sandbox/SOC/2007/visualization/libs/svg_plot/example/auto_2d_plot.cpp | 64 ++++----------------------------
   sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_autoscaling.cpp | 31 ++++++---------
   sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_axis_scaling.cpp | 24 +++--------
   sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_limits.cpp | 8 +--
   sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_uncertainty.cpp | 22 +++++------
   sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_values.cpp | 19 ++-------
   sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_x_external.cpp | 8 +--
   sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_fonts.cpp | 69 +++++++++++------------------------
   sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_limits.cpp | 14 ++++---
   sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_lines.cpp | 18 +++++----
   sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_tick_values.cpp | 35 +++++------------
   sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_uncertainty.cpp | 1
   sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_Hoaglin.cpp | 8 ---
   15 files changed, 141 insertions(+), 262 deletions(-)

Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/auto_1d_containers.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/auto_1d_containers.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/auto_1d_containers.cpp 2009-08-21 13:39:28 EDT (Fri, 21 Aug 2009)
@@ -76,7 +76,7 @@
   /*`This example uses two containers to demonstrate autoscaling.
   It is common to plot more than one set of data series together.
   Autoscaling must probably inspect all the containers of these series
- in order to find axis ranges that will be suitable for all of them.
+ in order to find axis ranges that will be *suitable for all of them*.
   */
   vector<double> my_data_1;
   // Initialize STL container my_data_1 with some entirely fictional data.
@@ -108,7 +108,7 @@
   //cout << endl << my_data.size() << " values in my_data_2. " << endl;
 
   /*`Next we need a new STL container, vector say, to hold our multiple containers of data series.
- They must all be the same STL container type, in this example, vector<double>.
+ They must all be the same STL container type, in this example, `vector<double>`.
     And we use pushback to add the containers.
   */
   vector<vector<double> > my_containers;
@@ -142,7 +142,7 @@
   /*`If we want, we can check the autoscale range used.*/
   cout << "x_range() " << my_1d_plot.x_range() << endl; // x_range() 0, 15
   /*`And even all the (hundreds of) plot settings (useful for diagnosis why your plot doesn't meet your expectations).*/
- //show_1d_plot_settings(my_1d_plot);
+ //show_1d_plot_settings(my_1d_plot);
 
 //] [/auto_1d_containers_2]
 

Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/auto_1d_plot.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/auto_1d_plot.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/auto_1d_plot.cpp 2009-08-21 13:39:28 EDT (Fri, 21 Aug 2009)
@@ -110,17 +110,16 @@
 
     /*`It may be useful to display that range chosen by autoscaling. */
     cout << "x_range() " << my_1d_plot.x_range() << endl; // x_range()
+//] [/auto_1d_plot_2]
   }
   catch(const std::exception& e)
   { // Error, warning and information messages are displayed by the catch block.
     std::cout <<
       "\n""Message from thrown exception was:\n " << e.what() << std::endl;
   }
-//] [/auto_1d_plot_2]
 
 //[auto_1d_plot_3
 /*`Other STL containers can also be used, for example set, or multiset (allowing duplicates):*/
-
   try
   { // Ensure error, warning and information messages are displayed by the catch block.
 
@@ -166,27 +165,26 @@
   double max_value = *(--my_data.end());
   cout << "my_set min " << min_value << ", max = " << max_value << endl;
 
-/*`Function scale_axis is used by autoscale, but is also available for use direct by the user.
+/*`Function `scale_axis` is used by autoscale, but is also available for use direct by the user.
 It accepts parameters controlling the scaling and updates 4 items. Its signature is:
 
- ``void scale_axis(double min_value, double max_value, // Input range
- double* axis_min_value, double* axis_max_value, double* axis_tick_increment, int* auto_ticks, // All 4 updated.
- bool check_limits, // Whether to check all values for infinity, NaN etc.
- bool origin, // If true, ensures that zero is a tick value.
- double tight, // Allows user to avoid a small fraction over a tick using another tick.
- int min_ticks, // Minimum number of ticks.
- int steps); // Round up and down to 2, 4, 6, 8, 10, or 5, 10 or 2, 5, 10 systems.
- ``
-
- */
+ void scale_axis(
+ double min_value, // Input range min
+ double max_value, // Input range max
+ double* axis_min_value, double* axis_max_value, double* axis_tick_increment, int* auto_ticks, // All 4 updated.
+ bool check_limits, // Whether to check all values for infinity, NaN etc.
+ bool origin, // If true, ensures that zero is a tick value.
+ double tight, // Allows user to avoid a small fraction over a tick using another tick.
+ nt min_ticks, // Minimum number of ticks.
+ */
   double axis_min_value; // Values to be updated by autoscale.
   double axis_max_value;
   double axis_tick_increment;
   int axis_ticks;
 
- /*`min_value` and `max_value` could be provided by the user program:
- usually these values are derived in some way from the user data.
- Several examples follow.*/
+/*` `min_value` and `max_value` could be provided by the user program:
+usually these values are derived in some way from the user data.
+Several examples follow:*/
 
   // Scaling using first and last values in container,
   // assuming the data are ordered in ascending value,
@@ -227,11 +225,10 @@
     true, 3., false, tol100eps, 6); // Display range.
   cout << "scaled min " << axis_min_value << ", max = " << axis_max_value
     << ", increment " << axis_tick_increment << ", axis ticks " << axis_ticks << endl;
-
- /*`
+/*`
 However autoscaling may go wrong if the data could contain values that are outside normal limits.
 Infinity (+ and -), and maximum value, and NaN (Not A Number),
-are separated by the plot program to allow them to be shown,
+are separated by the plot program to allow them to be shown
 but separate from 'normal' values. These values similarly can distort automatic scaling:
 a single infinity would result in useless scaling!
 When the plot range is set, the maximum and minimum values are checked,
@@ -239,9 +236,9 @@
 However, when autoscaling, it is more useful to ignore 'limit' values.
 But this means checking all values individually. If it known that all values are normal,
 for example because they come from some measuring equipment that is known only to produce normal values,
-it will be much quicker to use 'std::min_max_element' which can take advantange of knowledge of the container.
+it will be much quicker to use `std::min_max_element` which can take advantange of knowledge of the container.
 
-The function 'autoscale_check_limits(bool)' is provided to control this.
+The function `autoscale_check_limits(bool)` is provided to control this.
 If set true, all values will be checked, and those at 'limits' will be ignored in autoscaling.
 The default is true, to check all values.
 
@@ -260,12 +257,13 @@
 
   my_1d_plot.x_autoscale(false); // Ensure autoscale values are *not* recalculated for the plot.
 
-/*`There are also some parameters which can fine-tune the autoscaling to produce more
-aesthetically pleasing ranges. One can:
-* enforce the inclusion of zero on the plot.
-* Specify a minimum number of major ticks.
-* Specify the steps between major ticks, default 0, or 2 for 2, 4, 6, 8, 10, 5 for 1, 5, 10, or 10 (2, 5, 10).
-* Avoid values that are a tiny amount over the minimum or maximum from causing
+/*`There are also some parameters which can fine-tune the autoscaling
+to produce more aesthetically pleasing ranges. One can:
+
+# enforce the inclusion of zero on the plot.
+# Specify a minimum number of major ticks.
+# Specify the steps between major ticks, default 0, or 2 for 2, 4, 6, 8, 10, 5 for 1, 5, 10, or 10 (2, 5, 10).
+# Avoid values that are a tiny amount over the minimum or maximum from causing
   an apparently unnecessary tick at the minimum or maximum.
 */
 
@@ -355,8 +353,8 @@
 6 good values, 1 limit values.
 limit value: 1.#INF
 x_range() 0, 7
-7 values in container: 0.2 1.1 4.2 3.3 5.4 6.5 1.#INF
-8 values in container: 1.2 2.3 3.4 4.5 5.6 6.7 7.8 8.9
+7 values in container: 0.2 1.1 4.2 3.3 5.4 6.5 1.#INF
+8 values in container: 1.2 2.3 3.4 4.5 5.6 6.7 7.8 8.9
 0.2 1.1 4.2 3.3 5.4 6.5 : 6 values used.
 1.1 4.2 3.3 5.4 : 4 values used.
 0.2 1.1 4.2 3.3 5.4 6.5 1.#INF : 7 values used.
@@ -389,10 +387,10 @@
 image_border_margin() 10
 image_border_width() 1
 coord_precision 3
-copyright_date
-copyright_holder
-description
-document_title
+copyright_date
+copyright_holder
+description
+document_title
 image_x_size 500
 image_y_size 200
 legend_on false
@@ -401,7 +399,7 @@
 legend_background_color blank
 legend_border_color RGB(255,255,0)
 legend_color blank
-legend_title
+legend_title
 legend_title_font_size 14
 legend_width 0
 legend_lines true
@@ -426,12 +424,12 @@
 title ""
 title_color blank
 title_font_alignment 2
-title_font_decoration
+title_font_decoration
 title_font_family Verdana
 title_font_rotation 0
 title_font_size 18
-title_font_stretch
-title_font_style
+title_font_stretch
+title_font_style
 x_value_precision 3
 x_value_ioflags 200 IOS format flags (0x200) dec.
 x_max 5.5
@@ -442,11 +440,11 @@
 x_axis_value_color RGB(0,0,0)
 x_axis_width 1
 x_label_on true
-x_label
+x_label
 x_label_color blank
 x_label_font_family Verdana
 x_label_font_size 14
-x_label_units
+x_label_units
 x_label_units_on false
 x_major_labels_side left
 x_values_font_size 10

Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/auto_2d_plot.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/auto_2d_plot.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/auto_2d_plot.cpp 2009-08-21 13:39:28 EDT (Fri, 21 Aug 2009)
@@ -38,7 +38,7 @@
 #include <boost\math\special_functions\fpclassify.hpp>
   using boost::math::isfinite;
 
- // demo of getting the max and min of x and y
+ // Getting the max and min of x and y data points.
 template <class T> // T an STL container: array, vector ...
 void s(const T& container, // Container Data series to plot - entire container.
                // (not necessarily ordered, so will find min and max).
@@ -62,8 +62,6 @@
   cout << "s x_min " << *x_min << ", x_max " << *x_max << endl; // x_min 1, x_max 7.3
   cout << "s y_min " << *y_min << ", y_max " << *y_max << endl; // y_min 3.2, y_max 9.1
 } // template <class T> int scale_axis T an STL container: array, vector ...
-
-
 //] [/auto_2d_plot_1]
 
 int main()
@@ -112,19 +110,17 @@
   my_plot.autoscale_check_limits(false); // Skip checks for speed.
 
   /*`The possible cost is that it will fail at run-time if there are any infinite or NaNs.
-
- We could also chose to autoscale either of the axes separately, for example:*/
+We could also chose to autoscale either of the axes separately, for example:*/
 
   my_plot.y_autoscale(0.4, 9.3); // autoscale using two doubles.
 
- /*`which will chose a neater scale from 0 to 10 for the Y axis. */
-
+/*`which will chose a neater scale from 0 to 10 for the Y axis. */
+
   my_plot.write("./auto_2d_plot2.svg"); // And write another SVG image to a file.
 
- /*`We can show the ranges chosen by autoscaling; */
+/*`We can show the ranges chosen by autoscaling; */
   cout << "X min " << my_plot.x_range().first << ", X max " << my_plot.x_range().second << endl;
   cout << "Y min " << my_plot.y_range().first << ", Y max " << my_plot.y_range().second << endl;
-
 //] [/auto_2d_plot_2]
   }
   catch(const std::exception& e)
@@ -138,54 +134,12 @@
 
 /*
 //[auto_2d_plot_output
-
 Output:
 
-auto_2d_plot.cpp
-Linking...
-Embedding manifest...
-Autorun "j:\Cpp\SVG\debug\auto_2d_plot.exe"
-2 goods, 2.1 5.4
-3 goods, 7.3 9.1
-limit value: 99.99 1.#QNAN
-limit value: 999 1.#INF
-limit value: 999.9 1.#INF
-x_min 1.1, x_max 7.3
-y_min 3.2, y_max 9.1
-limits 3
-1 8
-3 10
-Build Time 0:21
-
-
-Linking...
-Embedding manifest...
-Autorun "j:\Cpp\SVG\debug\auto_2d_plot.exe"
+Autorun "j:\Cpp\SVG\Debug\auto_2d_plot.exe"
+Checked: x_min 1.1, x_max 7.3, y_min 3.2, y_max 9.1, 3 'good' values, 3 values at limits.
 X min 1, X max 8
 Y min 3, Y max 10
-Build Time 0:03
-
-
+X min 1, X max 8
+Y min 0, Y max 10
 //] [/auto_2d_plot_output]
-
-
-Parked pro tem.
-
-
-// double tol100eps = 1000 * numeric_limits<double>::epsilon(); // suitable tight value.
-
- // double axis_min_value; // Values to be updated by autoscale.
- // double axis_max_value;
- // double axis_tick_increment;
- // int axis_ticks;
-
- // multiset<double> my_set;
- //// Initialize my_set with some entirely fictional data.
- // my_set.insert(1.2);
- // my_set.insert(2.3);
- // my_set.insert(3.4);
-
- // // Feed STL 1D container to scale_axis.
- // scale_axis(my_set, &axis_min_value, &axis_max_value, &axis_tick_increment, &axis_ticks, false, tol100eps, 6, 0);
-
-*/

Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_autoscaling.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_autoscaling.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_autoscaling.cpp 2009-08-21 13:39:28 EDT (Fri, 21 Aug 2009)
@@ -61,7 +61,6 @@
   using boost::svg::show_all; // Multiple STL containers.
   using boost::svg::range; // Find min and max of a STL container.
   using boost::svg::range_all;// Find min and max of multipler STL containers.
-
 //] [/demo_1d_autoscaling_1]
 
 double tol100eps = 1000 * numeric_limits<double>::epsilon(); // suitable tight value.
@@ -83,7 +82,7 @@
   my_data.push_back(5.4); // [4]
   my_data.push_back(6.5); // [5]
   show(my_data); // Show entire container contents,
- // 6 values in container: 0.2 1.1 4.2 3.3 5.4 6.5
+ // 6 values in container: 0.2 1.1 4.2 3.3 5.4 6.5
 
   /*`Construct a plot , and add some data to the plot. */
 
@@ -91,12 +90,11 @@
   my_1d_plot.title("Demo 1D autoscaling").x_label("X values"); // Add a title and X axis label.
   my_1d_plot.plot(my_data, "Auto 1D my_data"); // Add whole data series from my_data.
 
- /*`Use x_autoscale to scale the axis, in this most common and simplest case, using all the values.*/
- my_1d_plot.x_autoscale(my_data);
+ /*`Use `x_autoscale` to scale the axis, in this most common and simplest case, using all the values.*/
+ my_1d_plot.x_autoscale(my_data);
 
   /*` and finally write the SVG to a file.*/
   my_1d_plot.write("demo_1d_autoscaling_1.svg"); // Write the plot to file.
-
 //] [/demo_1d_autoscaling_2]
 
 
@@ -119,11 +117,11 @@
   // Show the set.
   multiset<double>::const_iterator si;
   show(my_set); // for two different types of container.
- // 8 values in container: 1.2 2.3 3.4 4.5 5.6 6.7 7.8 8.9
+ // 8 values in container: 1.2 2.3 3.4 4.5 5.6 6.7 7.8 8.9
 
   svg_1d_plot my_1d_plot; // Construct a plot with all the default constructor values.
 
- /*`and also override the default controls of scale_axis function used by autoscaling.*/
+ /*`and also override the default controls of `scale_axis` function used by autoscaling.*/
   // Set some autoscaling parameters:
   my_1d_plot.x_with_zero(true); // Always include zero in the axis range, even if the data values don't.
   my_1d_plot.x_min_ticks(10); // Ensure more than the default minimum number of ticks.
@@ -141,7 +139,7 @@
   (Remember values in set are sorted).
   */
   my_1d_plot.x_autoscale(++my_set.begin(),--my_set.end());
- /*`This also sets autoscale(true), but note that x_range() is still not updated.
+ /*`This also sets `autoscale(true)`, but note that `x_range()` is still not updated.
   If we want, we can display the ranges chosen by autoscale:
   */
   cout << " x_auto_min_value " << my_1d_plot.x_auto_min_value()
@@ -157,25 +155,22 @@
    my_1d_plot.plot(++my_set.begin(),--my_set.end(), "Auto 1D my_set"); // Add 'top and tailed' data series from my_set.
  //my_1d_plot.plot(my_set, "Auto 1D my_set"); // Add whole data series from my_set.
   my_1d_plot.write("demo_1d_autoscaling_2.svg"); // Write the plot to file.
-
+
   /*`If we want, we can check the autoscale range used, noting that zero *is* included because we demanded it.*/
   cout << "x_range() " << my_1d_plot.x_range() << endl; // x_range() 0, 8
   //show_1d_plot_settings(my_1d_plot); // If required.
   }
+ /*`try'n'catch blocks are very useful to display any plot error messages.
+ Otherwise any exceptions thrown will just terminate - silently and most unhelpfully.
+ */
   catch(const std::exception& e)
   {
- /*` Try & catch blocks are very useful to display any plot error messages.
- Otherwise any exceptions thrown will just terminate - silently and unhelpfully.
- */
     cout <<"\n""Message from thrown exception was:\n " << e.what() << endl;
   }
- } // // Autoscaling with my_set
-
  //] [/demo_1d_autoscaling_3]
-
+ } // Autoscaling with my_set
   return 0;
 } // int main()
-
 /*
 
 //[demo_1d_autoscaling_output
@@ -184,8 +179,8 @@
 Linking...
 Embedding manifest...
 Autorun "j:\Cpp\SVG\debug\demo_1d_autoscaling.exe"
-6 values in container: 0.2 1.1 4.2 3.3 5.4 6.5
-8 values in container: 1.2 2.3 3.4 4.5 5.6 6.7 7.8 8.9
+6 values in container: 0.2 1.1 4.2 3.3 5.4 6.5
+8 values in container: 1.2 2.3 3.4 4.5 5.6 6.7 7.8 8.9
 x_with_zero, 10 x_min_ticks, 0 x_steps, 0.01 tightness.
  x_auto_min_value 0, x_auto_max _value 8, x_auto_tick_interval 0.5
 x_range() 0, 8

Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_axis_scaling.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_axis_scaling.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_axis_scaling.cpp 2009-08-21 13:39:28 EDT (Fri, 21 Aug 2009)
@@ -27,7 +27,7 @@
 
 /*`This example shows the use of functions scale_axis to find suitable axis limits.
 Normally one would use autoscaling, but there are conceivable circumstances when
-one would want to check on the algorithms choice of axis
+one would want to check on the scale_axis algorithm's choice of axis,
 and perhaps intervene in the process.
 
 First some includes to use Boost.Plot
@@ -69,7 +69,6 @@
   using boost::svg::show_all; // Multiple STL containers.
   using boost::svg::range; // Find min and max of a STL container.
   using boost::svg::range_all;// Find min and max of multipler STL containers.
-
 //] [/demo_1d_axis_scaling_1]
 
 void scale_axis(double min_value, double max_value, // Input range
@@ -86,7 +85,7 @@
   using namespace boost::svg;
   try
   {
- //[demo_1d_axis_scaling_2
+//[demo_1d_axis_scaling_2
   /*`This example uses a few types of containers to demonstrate axis_scaling.
   axis_scaling must inspect the container in order to find axis ranges that will be suitable.
   First we create a container and fill with some fictional data.
@@ -101,11 +100,9 @@
   my_data.push_back(6.5); // [5]
   show(my_data); // Show entire container contents,
   // 6 values in container: 0.2 1.1 4.2 3.3 5.4 6.5
-
 //] [/demo_1d_axis_scaling_2]
 
 //[demo_1d_axis_scaling_3
-
   multiset<double> my_set;
   // Initialize my_set with some entirely fictional data.
   my_set.insert(1.2);
@@ -120,7 +117,6 @@
   multiset<double>::const_iterator si;
   show(my_set); // for two different types of container.
   // 8 values in container: 1.2 2.3 3.4 4.5 5.6 6.7 7.8 8.9
-
 /*` Show can also display just a part of the container contents.
 */
   // show(&my_data[0], &my_data[my_data.size()]); // pointers - wrong! > all data ;-)
@@ -155,7 +151,7 @@
 
 /*` and to apply these values to the axis_scaling algorithm using by plot to choose the axes limits and ticks.
 */
- double axis_min_value; // Values to be updated by function scale_axis.
+ double axis_min_value; // Values to be updated by function `scale_axis`.
   double axis_max_value;
   double axis_tick_increment;
   int axis_ticks;
@@ -166,7 +162,7 @@
   cout << "Axis_scaled 2 min " << axis_min_value << ", max = " << axis_max_value << ", increment " << axis_tick_increment << endl;
 /*`It is also possible to use this with containers that use iterators and whose contents are ordered in ascending value,
 axis_scaling using first and last in container, for example, set, map, multimap, or a sorted vector or array.
-A number of variations are shown below, mianly by way of testing.
+A number of variations are shown below, mainly by way of testing.
 */
   scale_axis(*my_data.begin(),*(--my_data.end()),
     &axis_min_value, &axis_max_value, &axis_tick_increment, &axis_ticks,
@@ -210,7 +206,6 @@
     .x_major_interval(axis_tick_increment);
 
   //my_1d_plot.x_autoscale(false); // Ensure autoscale values are *not* recalculated for the plot.
-
   //] [/demo_1d_axis_scaling_4]
 
   //[demo_1d_axis_scaling_5
@@ -265,7 +260,7 @@
   using boost::svg::detail::operator<<; // Needed for output a pair.
   cout << "x_range() " << my_1d_plot.x_range() << endl; // x_range() 1, 5.5
 
- //show_1d_plot_settings(my_1d_plot);
+ //show_1d_plot_settings(my_1d_plot); // For *all* settings.
 //] [/demo_1d_axis_scaling_5]
   }
   catch(const std::exception& e)
@@ -273,19 +268,14 @@
     std::cout <<
       "\n""Message from thrown exception was:\n " << e.what() << std::endl;
   }
-
-
-
   return 0;
 } // int main()
-
 /*
-
 //[demo_1d_axis_scaling_output
 
 Autorun "j:\Cpp\SVG\Debug\demo_1d_axis_scaling.exe"
-6 values in container: 0.2 1.1 4.2 3.3 5.4 6.5
-8 values in container: 1.2 2.3 3.4 4.5 5.6 6.7 7.8 8.9
+6 values in container: 0.2 1.1 4.2 3.3 5.4 6.5
+8 values in container: 1.2 2.3 3.4 4.5 5.6 6.7 7.8 8.9
 0.2 1.1 4.2 3.3 5.4 : 5 values used.
 1.1 4.2 3.3 5.4 : 4 values used.
 0.2 1.1 4.2 3.3 5.4 6.5 : 6 values used.

Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_limits.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_limits.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_limits.cpp 2009-08-21 13:39:28 EDT (Fri, 21 Aug 2009)
@@ -36,13 +36,12 @@
 
 #include <limits>
   using std::numeric_limits;
-
 //] [demo_1d_limits_1]
 
 int main()
 {
 //[demo_1d_limits_2
-/*`Some fictional data is pushed into an STL container, here vector<double>, including a NaN and + and - infinity:*/
+/*`Some fictional data is pushed into an STL container, here `vector<double>`, including a NaN and + and - infinity:*/
   vector<double> my_data;
   my_data.push_back(-1.6);
   my_data.push_back(2.0);
@@ -68,11 +67,11 @@
 
 /*`To put a value label against each data point, switch on the option:
 */
- my_1d_plot.x_values_on(true); // Add a label for the X-axis.
+ my_1d_plot.x_values_on(true); // Add data point value labels for the X-axis.
 
 /*`To change the default colors (lightgray and whitesmoke) for the 'at limit' point marker
 to something more conspicuous for this demonstration:
-*/
+*/
     my_1d_plot.limit_color(blue);
     my_1d_plot.limit_fill_color(pink);
 
@@ -87,7 +86,6 @@
 */
     cout << "limit points stroke color " << my_1d_plot.limit_color() << endl;
     cout << "limit points fill color " << my_1d_plot.limit_fill_color() << endl;
-
 //] [demo_1d_limits_2]
   }
   catch(const std::exception& e)

Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_uncertainty.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_uncertainty.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_uncertainty.cpp 2009-08-21 13:39:28 EDT (Fri, 21 Aug 2009)
@@ -39,7 +39,6 @@
   using std::ostream_iterator;
 #include <algorithm>
   using std::copy;
-
 //] [/demo_1d_uncertainty_1]
 
 int main()
@@ -63,15 +62,16 @@
   B_times.push_back(unc(6.9)); // Only value known - no information available about uncertainty.
 
   vector<unc> C_times;
- C_times.push_back(unc(0.6, 0.1F, 5));
- C_times.push_back(unc(1.4, 0.2F, 11));
+ C_times.push_back(unc(2.6, 0.1F, 5));
+ C_times.push_back(unc(5.4, 0.2F, 11));
 
   /*`Echo the values input: */
   copy(A_times.begin(), A_times.end(), ostream_iterator<unc>(std::cout, " "));
   cout << endl;
   copy(B_times.begin(), B_times.end(), ostream_iterator<unc>(std::cout, " "));
   cout << endl;
- /*`The constructor initializes a new 1D plot, called `my_plot`, and also sets all the very many defaults for axes, width, colors, etc.
+ /*`The constructor initializes a new 1D plot, called `my_plot`,
+ and also sets all the very many defaults for axes, width, colors, etc.
 */
   svg_1d_plot my_plot;
 /*`A few (member) functions that set are fairly self-explanatory:
@@ -81,9 +81,8 @@
 * `x_range(-1, 11)` sets the axis limits from -1 to +11 (instead of the default -10 to +10).
 * `background_border_color(blue)` sets just one of the very many options.
 */
- my_plot.autoscale_check_limits(false); // default is true.
- my_plot.autoscale_plusminus(3); // default is 3.
-
+ my_plot.autoscale_check_limits(false); // default is true.
+ my_plot.autoscale_plusminus(3); // default is 3.
 
   my_plot
     .plot_window_on(true)
@@ -102,7 +101,7 @@
     .x_plusminus_on(true)
     .x_df_on(true)
     .x_df_color(green)
- .x_autoscale(A_times)
+ .x_autoscale(B_times) // Note that this might not be right for A and C_times.
     ;
 /*`
 Then we add our data series,
@@ -114,13 +113,12 @@
 while C_times use an ellipse whose width (x radius) is from the uncertainty.
 All the data points are also labelled with their value,
 and uncertainty and degrees of freedom if known.
-
 */
 
   my_plot.plot(A_times, "A").shape(round).size(10).stroke_color(red).fill_color(green);
   my_plot.plot(B_times, "B").shape(vertical_line).stroke_color(blue);
   my_plot.plot(C_times, "C").shape(unc_ellipse).fill_color(lightyellow).stroke_color(magenta);
-
+
 /*`Finally, we can write the SVG to a file of our choice.
 */
   my_plot.write("./demo_1d_uncertainty.svg");
@@ -137,8 +135,8 @@
 Linking...
 Embedding manifest...
 Autorun j:\Cpp\SVG\debug\demo_1d_uncertainty.exe
-3.1±0.02 (8) 4.2±0.01 (14)
-2.1±0.001 (30) 7.8±0.0025 (21) 3.4±0.03 6.9
+3.1±0.02 (8) 4.2±0.01 (14)
+2.1±0.001 (30) 7.8±0.0025 (21) 3.4±0.03 6.9
 Build Time 0:03
 //] [/demo_1d_uncertainty_output]
 */

Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_values.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_values.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_values.cpp 2009-08-21 13:39:28 EDT (Fri, 21 Aug 2009)
@@ -1,11 +1,11 @@
 /*! \file demo_1d_values.cpp
     \brief Demonstration of showing the 1D values.
     \details Showing the 1D values of items from the data set.
-
+
     Some of the many possible formatting options are demonstrated,
     including controlling the precision and iosflags,
     and prefix and suffix also useful for giving units.
-
+
     Quickbook markup to include in documentation.
     \date 19 Jul 2009
     \author Paul A. Bristow
@@ -50,14 +50,12 @@
 
 #include <vector>
   using std::vector;
-
 //] [demo_1d_values_1]
 
 int main()
 {
-
 //[demo_1d_values_2
-/*`Some fictional data is pushed into an STL container, here vector<double>:*/
+/*`Some fictional data is pushed into an STL container, here `vector<double>`:*/
   vector<double> my_data;
   my_data.push_back(-1.6);
   my_data.push_back(2.0);
@@ -132,8 +130,7 @@
 */
     my_1d_plot.write("demo_1d_values.svg");
 
-/*`If chosen settings do not have the effect that you expect, it may be helpful to display them!
-
+/*`If chosen settings do not have the effect that you expect, it may be helpful to display some of them!
 (All the myriad settings can be displayed with `show_1d_plot_settings(my_1d_plot)`.)
 */
     //show_1d_plot_settings(my_1d_plot);
@@ -172,14 +169,6 @@
 my_1d_plot.x_values_precision() 2
  my_1d_plot.x_values_ioflags() 1020
 Build Time 0:03
-
-
 //] [demo_1d_values_output]
-
- //my_1d_plot.x_values_rotation(uphill); // Orientation for the X-axis value labels.
- //my_1d_plot.x_values_rotation(horizontal); // Orientation for the X-axis value labels.
- //my_1d_plot.x_values_rotation(backup); // Orientation for the X-axis value labels.
- my_1d_plot.x_values_rotation(downhill); // Orientation for the X-axis value labels.
-
 */
 

Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_x_external.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_x_external.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_x_external.cpp 2009-08-21 13:39:28 EDT (Fri, 21 Aug 2009)
@@ -23,10 +23,9 @@
 // top = +1 //!< X-axis free above top of X-axis (case of all Y definitely > 0).
 // };
 
-//[demo_1d_x_external_1
-
 int main()
 {
+//[demo_1d_x_external_1
 
 /*`Following previous examples, we set up two containers for two data series.
 */
@@ -48,7 +47,7 @@
          .x_range(-1, 10);
 
 /*`We add tastelessly color the grids for both major and minor ticks, and switch both grids on.
-*/
+*/
   my_plot.x_major_grid_color(pink)
          .x_minor_grid_color(lightgray);
 
@@ -56,7 +55,7 @@
          .x_minor_grid_on(true);
 
 /*`Also we specify the position of the labelling of the X-axis.
-It can be controlled using values in the enum x_axis_intersect.
+It can be controlled using values in the `enum x_axis_intersect`.
 ``
   enum x_axis_intersect
   { //! \enum x_axis_intersect
@@ -77,7 +76,6 @@
   my_plot.write("./demo_1d_x_external.svg");
   return 0;
 } // int main()
-
 //] [/demo_1d_x_external_1]
 
 /*

Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_fonts.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_fonts.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_fonts.cpp 2009-08-21 13:39:28 EDT (Fri, 21 Aug 2009)
@@ -29,7 +29,7 @@
 
 A font family may or may not be available for a particular internet browser,
 so it is inevitable that the exact appearance of a SVG plot may vary when
-viewed with different browsers. If a font family is not recognised, then
+viewed with different browsers. If a font family is not recognised, then
 a default (for that browser) will be used instead.
 
 The font families available for browsers do not seem to be listed,
@@ -43,21 +43,22 @@
 
 The following font families work with Firefox 3.5:
 
-arial", "impact", "courier", "lucida console", "Lucida sans unicode", "verdana", "calibri", "century", "lucida calligraphy", "tahoma", "vivaldi"
-"informal roman", "lucida handwriting", "lucida bright", "helvetica"
-"arial narrow" is narrow, so may be useful to fit a long title or label.
-"arial black" is black!
+ "arial", "impact", "courier", "lucida console", "Lucida sans unicode",
+ "verdana", "calibri", "century", "lucida calligraphy", "tahoma", "vivaldi"
+ "informal roman", "lucida handwriting", "lucida bright", "helvetica"
+ "arial narrow" is narrow, so may be useful to fit a long title or label.
+ "arial black" is black!
 
 These do NOT work and are substituted:
 
-"comic sans", "sans" "bauhaus" "brush script" "segeo condensed" = Serif
+ "comic sans", "sans" "bauhaus" "brush script" "segeo condensed" = Serif
 
 The narrow, wide, bold and italic features produce rather variable and unpredictable results
 - the rendering may be 'fuzzy' or ill-formed: so these are not recommended. For example,
 
-"Times New Roman Bold" "Times New Roman Italic" are substituted by "Times New Roman"
+ "Times New Roman Bold" "Times New Roman Italic" are substituted by "Times New Roman"
 
-But to get narrow characters "arial narrow" works well, allowing a longer title or label.
+But to get narrow characters "arial narrow" works well, squeezing in a longer title or label.
 
 The font sizes are also changes from the defaults. This should change the positioning,
 but the calculations are complex and necessarily approximate.
@@ -69,12 +70,10 @@
 But it will still often be necessary to change the std::iosflags and std::precision,
 and/or the number of major ticks and/or font size and type to avoid tick value label collisions.
 
-Unicode symbols can be found at http://en.wikipedia.org/wiki/Unicode_symbols.
+Unicode symbols can be found at [@http://en.wikipedia.org/wiki/Unicode_symbols Unicode symbols].
 The 4 hex digit value needs to be wrapped with prefix &#x and suffix ; like &#xDDDD;
 Rendering of Unicode symbols is not entirely predictable, but usually works well
 to provide a wide range of greek and math symbols.
-
-
 */
 //] [/demo_2d_fonts_1]
 
@@ -109,10 +108,9 @@
 
   try
   { // try'n'catch blocks are needed to ensure error messages from any exceptions are shown.
- //[demo_2d_fonts_2
+//[demo_2d_fonts_2
 
-/*` The code below shows plotting the sqrt function
-selecting the range of the axis by a user choice.
+/*`The code below shows plotting the sqrt function selecting the range of the axis by a user choice.
 */
     {
       svg_2d_plot my_plot; // Construct a 2D plot.
@@ -134,7 +132,7 @@
            .x_axis_label_color(green)
            .x_label_font_family("helvetica")
            .x_label_font_size(40)
- .x_ticks_values_color(red) //
+ .x_ticks_values_color(red) //
            .x_ticks_values_font_family("Times New Roman")
            .x_ticks_values_font_size(14)
            .x_ticks_values_precision(0)
@@ -152,7 +150,7 @@
            .y_label_font_size(40)
            .y_axis_label_color(blue)
          ;
-
+
       // Add a container of data to the plot, choosing a color.
       my_plot.plot(data1, "Function (&#x221A;)").stroke_color(red).shape(round).size(3).bezier_on(true).line_color(pink);
 
@@ -164,21 +162,19 @@
       cout << "my_plot.x_ticks_values_precision() " << my_plot.x_ticks_values_precision() << endl;
       cout << "my_plot.x_ticks_values_ioflags() 0x" << hex << my_plot.x_ticks_values_ioflags() << dec << endl;
     }
-
     // Axis label rotation default is horizontal.
     {
       svg_2d_plot my_plot; // Construct another 2D plot to try other variations of font sizes.
       my_plot.x_range(0, +20.)
              .y_range(0., 5.)
              .x_label("X axis label font default size 14")
- .y_label("Y axis label font default size 14")
+ .y_label("Y axis label font default size 14")
              //.x_label_font_size(10)
              //.y_label_font_size(10)
              ;
       my_plot.plot(data1, "Function (&#x221A;)").stroke_color(red).shape(round).size(10).line_on(false).line_color(green);
       my_plot.write("./demo_2d_fonts_1.svg"); // Write another plot to file.
     }
-
     {
       svg_2d_plot my_plot; // Construct another 2D plot to try other variations of font sizes.
       my_plot.x_range(0, +20.)
@@ -190,7 +186,6 @@
       my_plot.plot(data1, "Function (&#x221A;)").stroke_color(red).shape(round).size(10).line_on(false).line_color(green);
       my_plot.write("./demo_2d_fonts_2.svg"); // Write another plot to file.
     }
-
     {
       svg_2d_plot my_plot; // Construct another 2D plot to try other variations of font sizes.
       my_plot.x_range(0, +20.)
@@ -202,7 +197,6 @@
       my_plot.plot(data1, "Function (&#x221A;)").stroke_color(red).shape(round).size(10).line_on(false).line_color(green);
       my_plot.write("./demo_2d_fonts_3.svg"); // Write another plot to file.
     }
-
     {
       svg_2d_plot my_plot; // Construct another 2D plot to try other variations of font sizes.
       my_plot.x_range(0, +20.)
@@ -218,7 +212,6 @@
       my_plot.plot(data1, "Function (&#x221A;)").stroke_color(red).shape(round).size(10).line_on(false).line_color(green);
       my_plot.write("./demo_2d_fonts_4.svg"); // Write another plot to file.
     }
-
 // Now alter the rotation of the axis labels.
     {
       svg_2d_plot my_plot; // Construct another 2D plot to try other variations of font sizes.
@@ -234,7 +227,6 @@
       my_plot.plot(data1, "Function (&#x221A;)").stroke_color(red).shape(round).size(10).line_on(false).line_color(green);
       my_plot.write("./demo_2d_fonts_5.svg"); // Write another plot to file.
     }
-
     {
       svg_2d_plot my_plot; // Construct another 2D plot to try other variations of font sizes.
       my_plot.x_range(0, +20.)
@@ -282,7 +274,6 @@
       my_plot.plot(data1, "Function (&#x221A;)").stroke_color(red).shape(round).size(10).line_on(false).line_color(green);
       my_plot.write("./demo_2d_fonts_8.svg"); // Write another plot to file.
     }
-
     {
       svg_2d_plot my_plot; // Construct another 2D plot to try other variations of font sizes.
       my_plot.x_range(0, +20.)
@@ -295,7 +286,6 @@
       my_plot.plot(data1, "Function (&#x221A;)").stroke_color(red).shape(round).size(10).line_on(false).line_color(green);
       my_plot.write("./demo_2d_fonts_9.svg"); // Write another plot to file.
     }
-
     {
       svg_2d_plot my_plot; // Construct another 2D plot to try other variations of font sizes.
       my_plot.x_range(0, +20.)
@@ -311,7 +301,6 @@
       my_plot.plot(data1, "Function (&#x221A;)").stroke_color(red).shape(round).size(10).line_on(false).line_color(green);
       my_plot.write("./demo_2d_fonts_10.svg"); // Write another plot to file.
     }
-
     {
       svg_2d_plot my_plot; // Construct another 2D plot to try other variations of font sizes.
       my_plot.x_range(0, +20.)
@@ -326,7 +315,6 @@
       my_plot.plot(data1, "Function (&#x221A;)").stroke_color(red).shape(round).size(10).line_on(false).line_color(green);
       my_plot.write("./demo_2d_fonts_11.svg"); // Write another plot to file.
     }
-
     {
       svg_2d_plot my_plot; // Construct another 2D plot to try other variations of font sizes.
       my_plot.x_range(0, +20.)
@@ -343,38 +331,25 @@
       my_plot.plot(data1, "Function (&#x221A;)").stroke_color(red).shape(round).size(10).line_on(false).line_color(green);
       my_plot.write("./demo_2d_fonts_12.svg"); // Write another plot to file.
     }
-
-
-
-
-
   }
   catch(const std::exception& e)
   {
     std::cout <<
       "\n""Message from thrown exception was:\n " << e.what() << std::endl;
   }
-
   return 0;
 } // int main()
-
-
 //] [/demo_2d_fonts_2]
 
-
-//] [demo_2d_fonts_output]
-
+//[demo_2d_fonts_output
 /*`
-
 Output:
 
-Autorun "j:\Cpp\SVG\Debug\demo_2d_fonts.exe"
-my_plot.x_ticks_values_color() RGB(255,0,0)
-my_plot.x_ticks_values_font_family() Verdana
-my_plot.x_ticks_values_font_size() 12
-my_plot.x_ticks_values_precision() 0
-my_plot.x_ticks_values_ioflags() 0x2000
-
+ Autorun "j:\Cpp\SVG\Debug\demo_2d_fonts.exe"
+ my_plot.x_ticks_values_color() RGB(255,0,0)
+ my_plot.x_ticks_values_font_family() Verdana
+ my_plot.x_ticks_values_font_size() 12
+ my_plot.x_ticks_values_precision() 0
+ my_plot.x_ticks_values_ioflags() 0x2000
 */
-
 //] [/demo_2d_fonts_output]

Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_limits.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_limits.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_limits.cpp 2009-08-21 13:39:28 EDT (Fri, 21 Aug 2009)
@@ -47,12 +47,9 @@
 #include <utility>
   using std::make_pair;
 
-
 int main()
 {
-
 //[demo_2d_limits_2
-
   /*`Some fictional data is pushed into an STL container, here map:*/
 
   map<double, double> my_data;
@@ -117,7 +114,7 @@
 
 /*`To change the default colors (lightgray and whitesmoke) for the 'at limit' point marker
 to something more conspicuous for this demonstration:
-*/
+*/
     my_2d_plot.limit_color(blue);
     my_2d_plot.limit_fill_color(pink);
 
@@ -132,7 +129,7 @@
     cout << "limit points stroke color " << my_2d_plot.limit_color() << endl;
     cout << "limit points fill color " << my_2d_plot.limit_fill_color() << endl;
 
-//] [demo_2d_limits_2]
+//] [/demo_2d_limits_2]
   }
   catch(const std::exception& e)
   {
@@ -148,7 +145,12 @@
 
 Output:
 
-
+Autorun "j:\Cpp\SVG\Debug\demo_2d_limits.exe"
+3 normal data values in series.
+9 'at limits' data values in series.
+limit points stroke color RGB(0,0,255)
+limit points fill color RGB(255,192,203)
 
 */
+//} //[/demo_2d_limits_output]
 

Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_lines.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_lines.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_lines.cpp 2009-08-21 13:39:28 EDT (Fri, 21 Aug 2009)
@@ -43,6 +43,7 @@
    using std::cout;
    using std::endl;
    using std::boolalpha;
+//] [/demo_2d_lines_1]
 
 int main()
 {
@@ -69,14 +70,14 @@
   my_data[4.1] = 4.3;
   my_data[5.0] = 5.3;
   my_data[6.1] = 5.9;
-
+
   /*`
   First construct, size and draw a simple plot ready to add some sample lines.
   */
   svg_2d_plot my_plot;
   my_plot.size(400, 400);
   my_plot.plot(my_data, "my_data").fill_color(red);
-
+
   /*`
   First draw a line using SVG coordinates (rather than the Cartesian coordinates used for user's data - see below).
   Note that for SVG coordinates, Y increases *down* the page, so Y = 0 is the top and Y = 300 is the bottom.
@@ -93,20 +94,17 @@
   my_plot.draw_plot_line(-10, -10, +10, +10, blue);
 
 /*`If you have calculated a confidence interval, you might want to add curved line(s) showing it (still using the Cartesian coordinates).
-For example, you can draw a curve (quadratic) through two X, Y pairs using a Bezier curve with the middle point as control point.
+For example, you can draw a curve (quadratic) through two X, Y pairs using a Bezier curve with the middle point as control point.
 */
   my_plot.draw_plot_curve(-6, -8, 0, +1, +8, +6, red);
 
 /*`Finally write the SVG image file.
 [note At present, notes and lines must come after all plot commands to be put in the correct place.]
 */
-
   my_plot.write("./demo_2d_lines");
-
   //show_2d_plot_settings(my_plot);
-
 //] [/demo_2d_lines_2]
-
+
   }
   catch (const std::exception& e)
   {
@@ -117,7 +115,11 @@
 } // int main()
 
 /*
-
 Output :
 
+demo_2d_lines.cpp
+Linking...
+Embedding manifest...
+Autorun "j:\Cpp\SVG\Debug\demo_2d_lines.exe"
+
 */

Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_tick_values.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_tick_values.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_tick_values.cpp 2009-08-21 13:39:28 EDT (Fri, 21 Aug 2009)
@@ -20,10 +20,8 @@
 // and comments: don't change any of the special comment markups!
 
 //[demo_2d_tick_values_1
-
 /*`
 An example to demonstrate some options for controlling the layout and color of tick values.
-
 */
 //] [/demo_2d_tick_values_1]
 
@@ -43,7 +41,7 @@
 #include <map>
   using std::map; // 2D data container.
 #include <fstream> // for file streaming, ifstream & ofstream.
- using std::ifstream;
+ using std::ifstream;
 #include <string>
   using std::string;
   using std::getline;
@@ -59,15 +57,14 @@
 #include <ios>
   using std::noskipws;
 
- double f(double x)
- { // A sample function to generate some X, Y pairs.
- return sqrt(x);
- }
+double f(double x)
+{ // A sample function to generate some X, Y pairs.
+ return sqrt(x);
+}
 
 int main()
 { // Construct one STL containers for the data series to plot.
 
-
   map<double, double> data1; // record number and value.
 
   for(double i = 0.; i <= 20.; i += 1.)
@@ -77,19 +74,15 @@
 
   try
   { // try'n'catch blocks are needed to ensure error messages from any exceptions are shown.
+//[demo_2d_tick_values_2
 
-
- //[demo_2d_tick_values_2
-
-/*` The code below shows plotting the sqrt function
+/*`
+The code below shows plotting the sqrt function
 selecting the range of the axis by a user choice.
 
 [note Unicode symbols can be found at http://en.wikipedia.org/wiki/Unicode_symbols.
 The 4 hex digit value needs to be wrapped with prefix &#x and suffix ; like &#xDDDD;]
 */
-
- /*`
-*/
     svg_2d_plot my_plot; // Construct a 2D plot.
 
     my_plot.legend_on(true) // Set title and legend, and X and Y axis range.
@@ -102,7 +95,7 @@
            .x_label_font_size(30)
 
            .x_num_minor_ticks(4) // MAJOR, minor, minor, minor, minor, MAJOR
- .x_ticks_values_color(red) //
+ .x_ticks_values_color(red) //
            .x_ticks_values_font_family("Times New Roman")
            .x_ticks_values_font_size(20)
            .x_ticks_values_precision(0)
@@ -129,13 +122,10 @@
           ;
 
     my_plot.x_label("x abcd1234(&#x221A;)").y_label("sqrt(x) "); // Note chaining.
-
+
     // Add a container of data to the plot, choosing a color.
     my_plot.plot(data1, "Function (&#x221A;)").stroke_color(red).shape(round).size(3).bezier_on(true).line_color(pink);
 
-/*`
-
-*/
     my_plot.write("./demo_2d_tick_values.svg"); // Write the plot to another file.
 
     // Show the ticks styling:
@@ -152,8 +142,8 @@
     cout << "my_plot.y_ticks_values_color() " << my_plot.y_ticks_values_color() << endl;
     cout << "my_plot.y_ticks_values_precision() " << my_plot.y_ticks_values_precision() << endl;
     cout << "my_plot.y_ticks_values_ioflags() 0x" << hex << my_plot.y_ticks_values_ioflags() << dec << endl;
-
   }
+//] [/demo_2d_tick_values_2]
   catch(const std::exception& e)
   {
     std::cout <<
@@ -163,8 +153,5 @@
   return 0;
 } // int main()
 
-// cout << "my_plot.x_ticks_values_color() " << my_plot.x_ticks_values_color() << endl;
-
-//] [/demo_2d_tick_values_2]
 
 

Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_uncertainty.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_uncertainty.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_uncertainty.cpp 2009-08-21 13:39:28 EDT (Fri, 21 Aug 2009)
@@ -67,7 +67,6 @@
 
 #include <iterator>
    using std::ostream_iterator;
-
 //] [/demo_2d_uncertainty_1]
 
   enum side

Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_Hoaglin.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_Hoaglin.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_Hoaglin.cpp 2009-08-21 13:39:28 EDT (Fri, 21 Aug 2009)
@@ -198,7 +198,6 @@
 #include <iostream>
 using std::cout;
 using std::endl;
-
 //] [demo_Hoaglin_1]
 
 int main()
@@ -250,8 +249,7 @@
     svg_boxplot& b = H_boxplot.median_values_on(true)
     .outlier_values_on(true)
     .extreme_outlier_values_on(true)
- .quartile_definition(8)
- ;
+ .quartile_definition(8);
 /*`Show the quartile definition just assigned:
 */
     cout << "boxplot.quartile_definition() = " << b.quartile_definition() << endl; // 8
@@ -292,10 +290,6 @@
 /*`Write the entire SVG plot to a file.
 */
   H_boxplot.write("demo_Hoaglin.svg");
-
-/*`You can view the plot at [@demo_Hoaglin.svg].
-*/
-
 //] [demo_Hoaglin_2]
   }
   catch(const std::exception& e)


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