|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r50801 - in sandbox/SOC/2007/visualization: . boost/svg_plot boost/svg_plot/detail libs/svg_plot/doc libs/svg_plot/doc/html libs/svg_plot/doc/html/svg_plot libs/svg_plot/doc/html/svg_plot/behavior libs/svg_plot/doc/html/svg_plot/interface libs/svg_plot/doc/html/svg_plot/plot_defaults libs/svg_plot/doc/html/svg_plot/svg_boxplot_tutorial libs/svg_plot/doc/html/svg_plot/tutorial_2d_code_simple libs/svg_plot/doc/html/svg_plot/tutorial_code_1d_simple libs/svg_plot/example libs/svg_plot/test
From: pbristow_at_[hidden]
Date: 2009-01-27 07:04:58
Author: pbristow
Date: 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
New Revision: 50801
URL: http://svn.boost.org/trac/boost/changeset/50801
Log:
Much work on Doxygenation, but still not complete.
Text files modified:
sandbox/SOC/2007/visualization/Jamrules | 2
sandbox/SOC/2007/visualization/boost/svg_plot/detail/FP_compare.hpp | 82 +-
sandbox/SOC/2007/visualization/boost/svg_plot/detail/auto_axes.hpp | 176 ++++--
sandbox/SOC/2007/visualization/boost/svg_plot/detail/axis_plot_frame.hpp | 1018 +++++++++++++++++++++------------------
sandbox/SOC/2007/visualization/boost/svg_plot/detail/functors.hpp | 19
sandbox/SOC/2007/visualization/boost/svg_plot/detail/numeric_limits_handling.hpp | 25
sandbox/SOC/2007/visualization/boost/svg_plot/detail/pair.hpp | 10
sandbox/SOC/2007/visualization/boost/svg_plot/detail/svg_boxplot_detail.hpp | 60 +
sandbox/SOC/2007/visualization/boost/svg_plot/detail/svg_style_detail.hpp | 85 +-
sandbox/SOC/2007/visualization/boost/svg_plot/detail/svg_tag.hpp | 363 +++++++------
sandbox/SOC/2007/visualization/boost/svg_plot/quantile.hpp | 69 ++
sandbox/SOC/2007/visualization/boost/svg_plot/show_1d_settings.hpp | 149 +++--
sandbox/SOC/2007/visualization/boost/svg_plot/show_2d_settings.hpp | 160 +++--
sandbox/SOC/2007/visualization/boost/svg_plot/stylesheet.hpp | 27
sandbox/SOC/2007/visualization/boost/svg_plot/svg.hpp | 422 ++++++++++------
sandbox/SOC/2007/visualization/boost/svg_plot/svg_1d_plot.hpp | 194 ++++--
sandbox/SOC/2007/visualization/boost/svg_plot/svg_2d_plot.hpp | 45 +
sandbox/SOC/2007/visualization/boost/svg_plot/svg_boxplot.hpp | 353 +++++++------
sandbox/SOC/2007/visualization/boost/svg_plot/svg_color.hpp | 132 +++--
sandbox/SOC/2007/visualization/boost/svg_plot/svg_fwd.hpp | 21
sandbox/SOC/2007/visualization/boost/svg_plot/svg_style.hpp | 906 ++++++++++++++++++----------------
sandbox/SOC/2007/visualization/boost/svg_plot/svg_test.cpp | 3
sandbox/SOC/2007/visualization/libs/svg_plot/doc/1d_autoscale_containers.qbk | 10
sandbox/SOC/2007/visualization/libs/svg_plot/doc/1d_simple_tutorial.qbk | 46 +
sandbox/SOC/2007/visualization/libs/svg_plot/doc/1d_tutorial.qbk | 7
sandbox/SOC/2007/visualization/libs/svg_plot/doc/Jamfile.v2 | 160 +++--
sandbox/SOC/2007/visualization/libs/svg_plot/doc/acknowledgements.qbk | 7
sandbox/SOC/2007/visualization/libs/svg_plot/doc/how_to_use.qbk | 55 +
sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/index.html | 156 +++--
sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/acknowledgements.html | 16
sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/behavior.html | 18
sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/behavior/behavior_limits.html | 38
sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/behavior/behavior_stylesheets.html | 29
sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/color.html | 50 -
sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/howtouse.html | 25
sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/interface.html | 20
sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/interface/svg_1d_plot_interface.html | 49 -
sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/interface/svg_2d_plot_interface.html | 56 +-
sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/interface/svg_boxplot_interface.html | 108 +--
sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/interface/svg_interface.html | 35
sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/plot_defaults.html | 19
sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/plot_defaults/1d_defaults.html | 25
sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/plot_defaults/2d_defaults.html | 25
sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/svg_boxplot_tutorial.html | 20
sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/svg_boxplot_tutorial/svg_boxplot_tutorial_simple.html | 63 +-
sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/todo.html | 18
sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_2d_code_simple.html | 20
sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_2d_code_simple/2d_simple_code_example.html | 49 -
sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_2d_code_simple/2d_special.html | 63 +-
sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_2d_code_simple/full_2d_layout.html | 27
sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_code_1d_simple.html | 19
sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_code_1d_simple/1d_special.html | 41
sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_code_1d_simple/full_1d_layout.html | 27
sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_code_1d_simple/tutorial_code_1d_example.html | 75 +-
sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_stylesheet.html | 26
sandbox/SOC/2007/visualization/libs/svg_plot/doc/interface.qbk | 83 +-
sandbox/SOC/2007/visualization/libs/svg_plot/doc/stylesheet_tutorial.qbk | 2
sandbox/SOC/2007/visualization/libs/svg_plot/doc/svg_interface.qbk | 12
sandbox/SOC/2007/visualization/libs/svg_plot/doc/svg_plot.qbk | 53 +
sandbox/SOC/2007/visualization/libs/svg_plot/doc/svg_tutorial.qbk | 1
sandbox/SOC/2007/visualization/libs/svg_plot/example/1d_x_external.cpp | 30
sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_values.cpp | 8
sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_plot.cpp | 3
sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_simple.cpp | 36
sandbox/SOC/2007/visualization/libs/svg_plot/test/1d_tests.cpp | 34
65 files changed, 3248 insertions(+), 2737 deletions(-)
Modified: sandbox/SOC/2007/visualization/Jamrules
==============================================================================
--- sandbox/SOC/2007/visualization/Jamrules (original)
+++ sandbox/SOC/2007/visualization/Jamrules 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -11,5 +11,5 @@
path-global BOOST_ROOT : . ;
# The current version of Boost.
-BOOST_VERSION ?= 1.34.1 ;
+BOOST_VERSION ?= 1.37.0 ;
Modified: sandbox/SOC/2007/visualization/boost/svg_plot/detail/FP_compare.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/detail/FP_compare.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/detail/FP_compare.hpp 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,3 +1,8 @@
+/*! \file FP_compare.hpp
+ \brief Two types of floating-point comparison "Very close" and "Close enough" to a chosen tolerance.
+ \author Paul A. Bristow
+*/
+
// Copyright Paul A. Bristow 2008
// Distributed under the Boost Software License, Version 1.0.
@@ -21,8 +26,8 @@
template<typename FPT> class smallest;
enum floating_point_comparison_type
-{ // Two types of comparison.
- FPC_STRONG, // "Very close" - Knuth equation 1' the default.
+{ //! enum floating_point_comparison_type Two types of floating-point comparison "Very close" and "Close enough".
+ FPC_STRONG, // "Very close" - Knuth equation 1' the default.
FPC_WEAK // "Close enough" - equation 2'.
// equations in Dougles E. Knuth, Seminumerical algorithms (3rd Ed) section 4.2.4, Vol II,
// pp 213-225, Addison-Wesley, 1997, ISBN: 0201896842.
@@ -53,20 +58,17 @@
template<typename FPT> FPT
fpt_abs(FPT arg)
-{ // abs function (just in case abs is not defined for FPT).
+{ //! abs function (just in case abs is not defined for User-defined FPT).
return arg <static_cast<FPT>(0) ? -arg : arg;
}
template<typename FPT> FPT
safe_fpt_division(FPT f1, FPT f2)
-{ // Safe from under and overflow.
- // Both f1 and f2 must be unsigned here.
-
+{ //! Division safe from underflow and overflow. (Both f1 and f2 must be unsigned here).
if( (f2 < static_cast<FPT>(1)) && (f1 > f2 * boost::math::tools::max_value<FPT>()) )
{ // Avoid overflow.
return boost::math::tools::max_value<FPT>();
}
-
if( (f1 == static_cast<FPT>(0))
|| ((f2 > static_cast<FPT>(1)) && (f1 < f2 * boost::math::tools::min_value<FPT>()) )
)
@@ -76,14 +78,12 @@
return f1 / f2;
} // safe_fpt_division(FPT f1, FPT f2)
-// Check two floating-point values are close within a chosen tolerance.
template<typename FPT = double>
class close_to
-{
+{ //! Test if two floating-point values are close within a chosen tolerance.
public:
-
- // One constructor for fraction tolerance only.
+ // One constructor for fraction tolerance only. (Percent is NOT implemented).
template<typename FPT>
explicit close_to(FPT tolerance,
floating_point_comparison_type fpc_type = FPC_STRONG)
@@ -101,11 +101,12 @@
:
fraction_tolerance_(2 * boost::math::tools::epsilon<FPT>()),
strong_or_weak_(FPC_STRONG)
- { // Default is two epsilon.
+ { //! Default is two epsilon.
}
bool operator()(FPT left, FPT right) const
- {
+ { //! \brief Test if two floating-point values are close within a chosen tolerance.
+ //! \details Tolerance can be interpreted as Knuth's "Very close" (equation 1), the default, or "Close enough" (equation 2).
FPT diff = fpt_abs(left - right);
FPT d1 = safe_fpt_division(diff, fpt_abs(right));
FPT d2 = safe_fpt_division(diff, fpt_abs(left));
@@ -116,33 +117,34 @@
}
FPT size()
- { // Get function.
+ { //! Get fraction_tolerance_.
return fraction_tolerance_;
}
floating_point_comparison_type strength()
- { // Get function.
+ { // Get strength of comparison, Knuth's "Very close" (equation 1), the default, or "Close enough" (equation 2).
return strong_or_weak_;
}
private:
- FPT fraction_tolerance_;
- floating_point_comparison_type strong_or_weak_;
+ FPT fraction_tolerance_; //! tolerance as a fraction.
+ floating_point_comparison_type strong_or_weak_; //! Knuth's "Very close" (equation 1), the default, or "Close enough" (equation 2).
}; // class close_to
-// Check floating-point value is smaller than a chosen small value.
-
-// David Monniaux, http://arxiv.org/abs/cs/0701192v4,
-// It is somewhat common for beginners to add a comparison check to 0 before
-// computing a division, in order to avoid possible division-by-zero exceptions or
-// the generation of infinite results. A first objection to this practise is that, anyway,
-// computing 1/x for x very close to zero will generate very large numbers
-// that will most probably result in overflows later.
-// Another objection, which few programmers know about and that we wish to draw attention
-// to, is that it may actually fail to work, depending on what the compiler
-// does that is, the program may actually test that x 6= 0, then, further down,
-// find that x = 0 without any apparent change to x!
+/* \details
+ Check floating-point value is smaller than a chosen small value.
+ David Monniaux, http://arxiv.org/abs/cs/0701192v4,
+ It is somewhat common for beginners to add a comparison check to 0 before
+ computing a division, in order to avoid possible division-by-zero exceptions or
+ the generation of infinite results. A first objection to this practise is that, anyway,
+ computing 1/x for x very close to zero will generate very large numbers
+ that will most probably result in overflows later.
+ Another objection, which few programmers know about and that we wish to draw attention
+ to, is that it may actually fail to work, depending on what the compiler
+ does that is, the program may actually test that x == 0, then, further down,
+ find that x = 0 without any apparent change to x!
+ */
template<typename FPT = double>
class smallest
@@ -152,7 +154,7 @@
explicit smallest(FPT s)
:
smallest_(s)
- { // Constructor.
+ { //! Default constructor.
}
smallest()
@@ -169,7 +171,7 @@
template<typename FPT>
bool operator()(FPT fp_value, FPT s)
- {
+ { //! True if value is smaller than a smallest value s.
if (fpt_abs(fp_value) == static_cast<FPT>(0))
{ // Test for zero first in case FPT is actually an integer type zero,
// when the comparison < below would fail because
@@ -181,36 +183,32 @@
template<typename FPT>
bool operator()(FPT fp_value)
- {
-
+ { //! True if value is smaller than chosen smallest value.
if (fpt_abs(fp_value) == static_cast<FPT>(0))
{ // Test for zero first in case FPT is actually an integer type,
- // when the comparison < below would fail because
- // smallest could become zero.
+ // when the comparison < below would fail because smallest could become zero.
return true;
}
return fpt_abs(fp_value) < fpt_abs(smallest_);
} // bool operator()
FPT size()
- { // Get function.
+ { //! Get chosen smallest value.
return smallest_;
}
private:
- // Smallest value that will be counted as effectively zero.
- FPT smallest_;
-
+ FPT smallest_; //!< Chosen smallest value that will be counted as effectively zero.
}; // class smallest
-// Define two convenient typedefs.
+// Define two convenience typedefs.
// Since double and the default smallest value 2 * min_value = 4.45015e-308
// is a very common requirement, provide an convenience alias for this:
-typedef smallest<double> tiny; // Allow tiny as a shorthand for 1e-308
+typedef smallest<double> tiny; //! Allow tiny as a shorthand for 1e-308.
// Since double and the default smallest value 2 * min_value = 4.45015e-308
// is a very common requirement, provide an convenience alias for this:
-typedef close_to<double> neareq; // Allow tiny as a shorthand for epsilon
+typedef close_to<double> neareq; //! Allow tiny as a shorthand for epsilon.
#endif // BOOST_FLOATING_POINT_COMPARISON_HPP
Modified: sandbox/SOC/2007/visualization/boost/svg_plot/detail/auto_axes.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/detail/auto_axes.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/detail/auto_axes.hpp 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,6 +1,19 @@
-// auto_axes.hpp
+/*!
+ \file auto_axes.hpp
+ \brief Scalable Vector Graphic (SVG) autoscaling of axes.
+ \details Inspect container or data values to find minimum and maximum,
+ avoiding values that are NaN and/or 'at limit'.
+ scale axis using max and min values (calculated or user provided)
+ optionally to include the orgin, and to set the ticks.
+ Provide fine control over any overlap at the edges of the axes to avoid a tiny
+ amount over the limit resulting in an ugly extra major tick.
+ Also allow optional forcing of the ticks to be multiples of 1, 2, 5, 10.
+
+ \version 1.0
+ \author Paul A. Bristow
+ */
-// Copyright Paul A. Bristow 2006 - 2008.
+// Copyright Paul A. Bristow 2006 - 2009.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0.
@@ -10,11 +23,15 @@
#ifndef BOOST_SVG_AUTO_AXES_HPP
#define BOOST_SVG_AUTO_AXES_HPP
-#include <boost\svg_plot\detail\FP_compare.hpp> // is_small & is_close
+#if defined (_MSC_VER)
+# pragma warning (push)
+# pragma warning (disable: 4100) // 'check_limits' : unreferenced formal parameter
+#endif
-#include <boost\math\special_functions\fpclassify.hpp> // infinite
- template <class T> bool boost::math::isfinite(T t);
+#include <boost\svg_plot\detail\FP_compare.hpp> // is_small & is_close
+#include <boost\math\special_functions\fpclassify.hpp>
+// for template <class FPT> bool boost::math::isfinite(FPT t);
#include <boost/algorithm/minmax_element.hpp>
using boost::minmax_element;
// minmax_element finds both min and max elements more efficiently than separately.
@@ -33,6 +50,24 @@
namespace boost
{
+ namespace math
+ {
+ // This is only needed to avoid a warning from Doxygen
+ // which can't find the function if declared as
+ // template <class FPT> bool boost::math::isfinite(FPT t);
+ // because of the leading boost::math::
+ /*!
+ \brief If a floating-point value is finite, return true.
+ \param[in] t floating-point value.
+ \tparam FPT floating-point type (float, double, long double, or user-defined)
+ \return true if is finite, false if + or - infinite or any NaN.
+ */
+ template <class FPT> bool isfinite(FPT t);
+ } // namespace math
+} // namespace boost
+
+namespace boost
+{
namespace svg
{
@@ -40,31 +75,41 @@
// Show and show_all to display size and contents of STL containers.
// range and range_all to find the min and max of STL containers.
-// _all versions deal with container of containers.
+// _all versions deal with a container of containers.
// Roundup and Rounddown to 2, 4, 6, 8, 10, or 5, 10 or 2, 5, 10 systems functions:
- double roundup10(double value);
- double rounddown10(double value);
- double roundup5(double value);
- double rounddown5(double value);
- double roundup2(double value);
- double rounddown2(double value);
-
- void scale_axis(double min_value, double max_value, // Scale axis from Input range min & max.
- double* axis_min_value, double* axis_max_value, double* axis_tick_increment, int* auto_ticks, // All 4 updated.
- // NO check_limits parameter.
- bool origin, // do not include the origin unless the range min_value <= 0 <= max_value.
- double tight, // tightest - fraction of 'overrun' allowed before another tick used.
- // for visual effect up to about 0.001 might suit a 1000 pixel wide image,
- // allowing values just 1 pixel over the tick to be shown.
- int min_ticks, // Minimum number of major ticks.
- int steps); // Round up and down to 2, 4, 6, 8, 10, or 5, 10 or 2, 5, 10 systems.
+//! Round value up to nearest multiple of 10.
+double roundup10(double value);
+ //! Round value down to nearest multiple of 10.
+double rounddown10(double value);
+//! Round value up to nearest multiple of 5.
+double roundup5(double value);
+ //! Round value down to nearest multiple of 5.
+double rounddown5(double value);
+ //! Round value up to nearest multiple of 2.
+double roundup2(double value);
+//! Round value down to nearest multiple of 2.
+double rounddown2(double value);
+
+void scale_axis(
+ double min_value, double max_value, // Scale axis from Input range min & max.
+ double* axis_min_value, double* axis_max_value, double* axis_tick_increment, int* auto_ticks, // All 4 updated.
+ // NO check_limits parameter.
+ bool origin, // do not include the origin unless the range min_value <= 0 <= max_value.
+ double tight, // tightest - fraction of 'overrun' allowed before another tick used.
+ // for visual effect up to about 0.001 might suit a 1000 pixel wide image,
+ // allowing values just 1 pixel over the tick to be shown.
+ int min_ticks, // Minimum number of major ticks.
+ int steps); // Round up and down to 2, 4, 6, 8, 10, or 5, 10 or 2, 5, 10 systems.
template <typename iter>
int mnmx(iter begin, iter end, double* min, double* max)
-{ // Inspect all values between begin and (before) end to work out min and max.
- // Similar to boost::minmax_element, but ignoring at 'limit': non-finite, +-infinity, max & min, & NaN).
- // If can't find a max and a min, then will throw exception in x_range.
+{ //! \brief Inspect values to find min and max.
+ /*! \details Inspect all values between begin and (before) end to work out min and max.
+ Similar to boost::minmax_element, but ignoring at 'limit': non-finite, +-infinity, max & min, & NaN).
+ If can't find a max and a min, then throw a runtime_error exception.
+ \tparam iter STL container iterator.
+ */
*max = std::numeric_limits<double>::quiet_NaN();
*min = std::numeric_limits<double>::quiet_NaN();
using boost::svg::detail::is_limit; // either x and/or y not a proper data value.
@@ -76,7 +121,7 @@
limits++;
pos++;
}
- if (pos == end)
+ if (pos == end)
{ // ALL values are at limit!
throw std::runtime_error("Autoscale could not find any useful values to scale axis!");
//cout << "all values at limit!" << endl;
@@ -116,54 +161,45 @@
//cout << "min " << *min << ", max " << *max << endl; //
//cout << "limits " << limits << endl;
}
- if (goods < 2)
+ if (goods < 2)
{
throw std::runtime_error("Autoscale could not find useful min & max to scale axis!");
}
- return goods; // If goods < 2,
+ return goods; // If goods < 2,
} // inmmax(iter begin, iter end, double* min, double* max)
+//! scale axis function to define axis marker ticks based on min & max parameters values.
-#if defined (_MSC_VER)
-# pragma warning (push)
-# pragma warning (disable: 4100) // 'check_limits' : unreferenced formal parameter
-#endif
-
-// scale axis function to define axis marker ticks based on two min & max values of the data.
-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, //! Minimum value.
+ double max_value, //! Maximum value.
+ 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 major ticks multiples.
{
-
- // int steps); // 0, or 2 for 2, 4, 6, 8, 10, 5 for 1, 5, 10, or 10 (2, 5, 10).
-
- // Must assume max and min are OK (can't ignore limit values)
+ // Must assume max and min are OK (can't ignore limit values).
// If either at limit then will be caught and exception thrown later by x_range.
- // So deliberately ignore check_limits parameter & supress any warning.
+ // So deliberately ignore check_limits parameter & suppress any warning.
scale_axis(min_value, max_value,
axis_min_value, axis_max_value, axis_tick_increment, auto_ticks, // All 4 updated.
origin, tight, min_ticks, steps); // Display range.
-}
-
-#if defined (BOOST_MSVC)
-# pragma warning(pop)
-#endif
+}
template <typename iter> // T an STL container: array, vector, set ...
-void scale_axis(iter begin, iter end, // Scale axis from data series (usually to plot), perhaps only part of container.
- // (not necessarily ordered, so will find min and 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 = false, // do not include the origin unless the range min_value <= 0 <= max_value.
- double tight = 0., // tightest - fraction of 'overrun' allowed before another tick used.
- // for visual effect up to about 0.001 might suit a 1000 pixel wide image,
- // allowing values just 1 pixel over the tick to be shown.
- int min_ticks = 6, // Minimum number of major ticks.
- int steps = 0) // 0, or 2 for 2, 4, 6, 8, 10, 5 for 1, 5, 10, or 10 (2, 5, 10).
+void scale_axis( //! Scale axis from data series (usually to plot), perhaps only part of container.
+ iter begin, iter end,
+ // (not necessarily ordered, so will find min and 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 = false, // do not include the origin unless the range min_value <= 0 <= max_value.
+ double tight = 0., // tightest - fraction of 'overrun' allowed before another tick used.
+ // for visual effect up to about 0.001 might suit a 1000 pixel wide image,
+ // allowing values just 1 pixel over the tick to be shown.
+ int min_ticks = 6, // Minimum number of major ticks.
+ int steps = 0) // 0, or 2 for 2, 4, 6, 8, 10, 5 for 1, 5, 10, or 10 (2, 5, 10).
{
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.
@@ -196,8 +232,10 @@
}
} // template <typename iter> void scale_axis(iter begin, iter end, ...
-template <class T> // T an STL container: array, vector ...
-void scale_axis(const T& container, // Entire Container Data series, usually to plot.
+template <class T>
+void scale_axis( //! scale axis using an Entire Container Data series, usually to plot.
+//! \tparam T an STL container: array, vector ...
+ const T& container,
// (not necessarily ordered, so will find min and 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.
@@ -237,8 +275,9 @@
origin, tight, min_ticks, steps); // Display range.
} // template <class T> int scale_axis T an STL container: array, vector ...
-template <class T> // Scale X and Y axis using T a 2D STL container: array, vector ...
-void scale_axis(const T& container, // Container Data series to plot - entire 2D container.
+template <class T>
+void scale_axis( //! Scale X and Y axis using T a 2D STL container: array, vector ...
+ const T& container, //! Container Data series to plot - entire 2D container.
// (not necessarily ordered, so will find min and max).
double* x_axis_min_value, double* x_axis_max_value, double* x_axis_tick_increment, int* x_auto_ticks,
double* y_axis_min_value, double* y_axis_max_value, double* y_axis_tick_increment, int* y_auto_ticks,
@@ -280,6 +319,7 @@
{ // Otherwise it is necessary to inspect all values individually.
// It seems that X and Y need to be examined in pairs, so sadly, we can't use:
// int good_x = mnmx(container.begin(), container.end(), &x_min, &x_max);
+ // or
// int good_y = mnmx(container.begin(), container.end(), &y_min, &y_max);
// Work out min and max, ignoring non-finite (+-infinity & NaNs).
@@ -293,7 +333,7 @@
limits++;
pos++;
}
- if (pos == container.end())
+ if (pos == container.end())
{ // ALL values are at limit!
//cout << "all values at limit" << endl;
throw std::runtime_error("Autoscale could not find any useful values to scale axes!");
@@ -810,4 +850,8 @@
} // svg
} // boost
+#if defined (BOOST_MSVC)
+# pragma warning(pop)
+#endif
+
#endif // BOOST_SVG_AUTO_AXES_HPP
Modified: sandbox/SOC/2007/visualization/boost/svg_plot/detail/axis_plot_frame.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/detail/axis_plot_frame.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/detail/axis_plot_frame.hpp 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,6 +1,14 @@
-// axis_plot_frame.hpp
+/*! \file axis_plot_frame.hpp
+
+\brief SVG Plot functions common to 1D, 2D and Boxplots.
+
+\details
+
+ \author Jacob Voytko and Paul A. Bristow
+*/
// Copyright Jacob Voytko 2007
+// Copyright Paul A. Bristow 2007, 2008, 2009
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0.
@@ -33,48 +41,51 @@
{
namespace svg
{
- //JV: G++ can't resolve names in these enums in axis_plot_frame
+ // JV: G++ can't resolve names in these enums in axis_plot_frame
// when they are in svg_2d_plot.hpp
- static const double sin45 = 0.707; // Use if axis value labels are sloping.
+ static const double sin45 = 0.707; // Use to calculate 'length' if axis value labels are sloping.
+
+ // x_axis_position_ and y_axis_position_ use x_axis_intersect & y_axis_intersect.
+ enum x_axis_intersect
+ { //! \enum x_axis_intersect If and how the X axes intersects Y axis.
+ bottom = -1, //!< X-axis free below bottom of end of Y-axis (case of all Y definitely < 0).
+ x_intersects_y = 0, //!< x_intersects_y when Y values include zero, so X intersects the Y axis.
+ top = +1 //!< X-axis free above top of X-axis (case of all Y definitely > 0).
+ };
+
+ enum y_axis_intersect
+ { //! \enum y_axis_intersect If and how the Y axes intersects X axis.
+ left = -1, //!< Y-axis free to left of end of X-axis (case of all X definitely < 0).
+ y_intersects_x = 0, //!< y_intersects_x when X values include zero, so intersects the X axis.
+ right = +1 //!< Y-axis free to left of end of X-axis (case of all X definitely > 0).
+ };
- // x_axis_position_ and y_axis_position_ use these.
- enum x_axis_intersect {bottom = -1, x_intersects_y = 0, top = +1};
- // bottom = X-axis free below bottom of end of Y-axis (case of all Y definitely < 0).
- // top = X-axis free above top of X-axis (case of all Y definitely > 0).
- // x_intersects_y when Y values include zero, so X intersects the Y axis.
-
- enum y_axis_intersect {left = -1, y_intersects_x = 0, right = +1};
- // left = Y-axis free to left of end of X-axis (case of all X definitely < 0).
- // right = Y-axis free to left of end of X-axis (case of all X definitely > 0).
- // y_intersects_x when X values include zero, so intersects the X axis.
enum legend_places
- { // Placing of legend box, if requested by legend_on(true).
- nowhere = 0,
- inside = -1, // Default place for inside is top left of plot window,
- // exact location controlled by legend_top_left().
- outside_left = 1, // Outside
- outside_right = +2, // Default for outside.
- outside_top = +3,
- outside_bottom = +4,
- somewhere = +5 // legend_top_left(x, y)
+ { //! \enum legend_places Placing of legend box, if requested by legend_on == true.
+ nowhere = 0, //!< Placing of legend box not requested or not calculated yet.
+ inside = -1, //!< Default place for inside is top left of plot window, (exact location controlled by legend_top_left()).
+ outside_left = 1, //!< Outside on the left of the graph.
+ outside_right = +2, //!< Outside right (Default).
+ outside_top = +3, //!< Outside at top.
+ outside_bottom = +4, //!< Outside at bottom.
+ somewhere = +5 //! legend_top_left(x, y)
};
namespace detail
{
template <class Derived>
class axis_plot_frame
- {
- // axis_plot_frame is used as base class, for example:
- // class svg_1d_plot : public detail::axis_plot_frame<svg_1d_plot>
- // class svg_2d_plot : public detail::axis_plot_frame<svg_2d_plot>
+ { /*! \class axis_plot_frame is used as base class, for example:\n
+ class svg_1d_plot : public detail::axis_plot_frame<svg_1d_plot>\n
+ class svg_2d_plot : public detail::axis_plot_frame<svg_2d_plot>
+ */
//protected:
public:
// --------------------------------------------------------------------
// We don't use the SVG coordinate transform because then text would
// be flipped. I'm considering using it to scale the image for resizes.
- // --------------------------------------------------------------------
// protected member functions (defined below):
@@ -100,7 +111,7 @@
// void clear_plot_background();
// void clear_grids();
void transform_point(double& x, double& y)
- { // Scale & shift both x & y to graph coordinate.
+ { //! Scale & shift both X & Y to graph coordinates.
x = derived().x_scale_ * x + derived().x_shift_;
y = derived().y_scale_ * y + derived().y_shift_;
adjust_limits(x, y); // In case either hits max, min, infinity or NaN.
@@ -110,20 +121,19 @@
// So more drastic action like throwing might be least worst action?
void transform_x(double & x)
- { // Scale and shift x only.
+ { //! Scale and shift X value only.
x = derived().x_scale_ * x + derived().x_shift_;
}
void transform_y(double & y)
- { // Scale and shift y only.
+ { //! Scale and shift Y value only.
y = derived().y_scale_ * y + derived().y_shift_;
}
void draw_x_minor_tick(double value, path_element& tick_path, path_element& grid_path)
- { // Draw X-axis minor ticks, and optional grid.
- // Value is NOT (yet) shown beside the minor tick.
+ { //! Draw X-axis minor ticks, and optional grid. (Value is NOT (yet) shown beside the minor tick).
double x(value); // Tick position and value label,
- transform_x(x); // convert to svg.
+ transform_x(x); // Convert to svg.
double y_bottom(0.); // Start on the horizontal X-axis line.
double y_top(derived().image.y_size()); // Image top.
@@ -201,8 +211,8 @@
} // void draw_x_minor_tick
void draw_x_major_tick(double value, path_element& tick_path, path_element& grid_path)
- { // draw ticks - and grid too if wanted.
- // If major_value_labels_side then value shown beside the major tick.
+ { //! Draw major ticks - and grid too if wanted.
+ //! If major_value_labels_side then value shown beside the major tick.
double x(value); //
transform_x(x); // x value in svg.
if((x < derived().plot_left_ - 0.01) || (x > derived().plot_right_ + 0.01))
@@ -419,7 +429,7 @@
} // draw_x_major_tick
void draw_x_axis()
- { // Draw horizontal X-axis line & plot window line to hold.
+ { //! Draw horizontal X-axis line & plot window line to hold.
if(derived().x_axis_.axis_line_on_)
{ // Want a horiztonal X-axis line drawn.
double xleft = derived().plot_left_;
@@ -526,17 +536,18 @@
} // void draw_x_axis()
// --------------------------------------------------------------------
- // Draw functions - legend & title (if any).
+ // Draw legend & title (if wanted).
// --------------------------------------------------------------------
void draw_title()
- {
- // Update title_info_ with position.
+ { /*! \fn \brief Draw title (for the whole plot).
+ \details Update title_info_ with position.
+ Assumes align = center_align.
+ and center_align will ensure that will center correctly
+ even if original string is made much longer because it contains Unicode like Ω
+ because the render engine does the centering.
+ */
derived().title_info_.x(derived().image.x_size() / 2.); // Center of image.
- // Assumes align = center_align.
- // And center_align will ensure that will center correctly
- // even if original string is long because contains Unicode like Ω
- // because the render engine does the centering.
double y;
y = derived().title_info_.style().font_size() * derived().text_margin_; // Leave a linespace above.
derived().title_info_.y(y);
@@ -544,15 +555,14 @@
} // void draw_title()
void size_legend_box()
- { // Calculate how big the legend box needs to be.
- // Store in legend_width_ and legend_height_
+ { //! Calculate how big the legend box needs to be.
if(derived().legend_on_ == false)
- { // No legend, so set values to show legend positions invalid?
+ { // No legend wanted, so set values to show legend positions invalid?
//derived().legend_left_ = -1.;
//derived().legend_right_ = -1.;
//derived().legend_top_ = -1.;
//derived().legend_bottom_ = -1.;
- derived().legend_height_ = 0.;
+ derived().legend_height_ = 0.; // At least set the size to zero.
derived().legend_width_ = 0.;
return;
}
@@ -617,7 +627,7 @@
} // void size_legend_box()
void place_legend_box()
- {
+ { //! Place legend box (if required).
if(derived().legend_on_ == true) // Legend box required.
{
derived().outside_legend_on_ = true; // Unless proves to be inside.
@@ -731,7 +741,7 @@
} // void calculate_legend_box()
void draw_legend()
- {
+ { //! Draw the legend border, text and marker lines and/or shapes.
// size_t num_points = derived().series.size();
//cout << derived().legend_box_.width() << ' ' << derived().legend_box_.margin() << endl;
@@ -817,11 +827,12 @@
} // void draw_legend()
void draw_x_label()
- {
+ { //! Draw the X-axis label text (for example, length), and append any required units (for example. km).
// X-label color is set in constructor thus:
// image.g(detail::PLOT_X_LABEL).style().stroke_color(black);
// and changed using x_label_color(color);
+
std::string label = derived().x_label_info_.text(); // x_axis_ label, and optional units.
if (derived().x_axis_.label_units_on_ && (derived().x_units_info_.text() != ""))
{ // Append the units, if any, user providing brackets () if required.
@@ -853,8 +864,8 @@
} // void draw_x_label()
void adjust_limits(double& x, double& y)
- { // If value reaches limit of max, min, infinity,
- // use the appropriate plot min or max.
+ { //! If value of a data point reaches limit of max, min, infinity,
+ //! use the appropriate plot min or max value instead.
if(detail::limit_max(x))
{
x = derived().plot_right_;
@@ -872,7 +883,7 @@
y = derived().plot_top_;
}
// If value is NaN, use zero instead.
- // TODO Do we want/get a different color or shape for NaNs??
+ // TODO Do we want/get a different color or shape for NaNs?
if(detail::limit_NaN(x))
{
x = 0.;
@@ -888,20 +899,22 @@
void draw_plot_point(double x, double y, // SVG coordinates.
g_element& g_ptr,
plot_point_style& sty)
- { // Draw a shape whose size and color are specified in plot_point_style.
+ { //! Draw a plot data point marker shape whose size and color are specified in plot_point_style.
int size = sty.size_;
double half_size = size / 2.;
- // For 1-D plots, the points do not *need* to be centered on the X-axis,
- // and putting them just above, or sitting on, the X-axis is much clearer.
- // For 2-D plots, the symbol center should, of course,
- // be *centered exactly* on x, y.
- // circle and ellipse are naturally centered on the point.
- // for rect x and y half_size offset centers square on the point.
- // But symbols are in a rectangular box and the offset is different for x & y
- // even assuming that the symbol is centered in the rectangle.
- // the vertical and horizontal ticks are deliberately offset above the axes.
- // TODO Not sure this is fully resolved.
+ /*! \details
+ For 1-D plots, the points do not *need* to be centered on the X-axis,
+ and putting them just above, or sitting on, the X-axis is much clearer.
+ For 2-D plots, the symbol center should, of course,
+ be *centered exactly* on x, y.
+ circle and ellipse are naturally centered on the point.
+ for rect x and y half_size offset centers square on the point.
+ But symbols are in a rectangular box and the offset is different for x & y
+ even assuming that the symbol is centered in the rectangle.
+ the vertical and horizontal ticks are deliberately offset above the axes.
+ TODO Not sure this is fully resolved.
+ */
switch(sty.shape_) // from enum point_shape none, round, square, point, egg
{
@@ -936,7 +949,6 @@
g_ptr.line(x, y - size, x + size, y ); // line left & right from axis.
// horizontal_line is pretty useless for 1-D because the horizontal line is on the X-axis.
break;
-
case symbol:
g_ptr.text(x, y + half_size, sty.symbols(), sty.style(), center_align, horizontal); // symbol(s), size and centre.
// TODO Need to provide way to set style.symbols when Boost.Parameter is unravelled.
@@ -994,7 +1006,8 @@
} // void draw_plot_point
void draw_plot_point_value(double x, double y, g_element& g_ptr, value_style& val_style, plot_point_style& point_style, double value)
- { // Write the value as string of a data point, X or Y.
+ { //! Write the data point (X or Y) value as a string, for example "1.23e-2", near the data point marker.
+ //! Unecessary e, +, & leading exponent zeros may be stripped, and the position and rotation controlled.
std::stringstream label;
label.precision(val_style.value_precision_);
label.flags(val_style.value_ioflags_);
@@ -1006,7 +1019,7 @@
stripped = label.str();
//plot_point_style& sty)
//int size = sty.size_;
- // was int marker_size = derived().series[0].point_style_.size_;
+ // was int marker_size = derived().series[0].point_style_.size_;
int marker_size = point_style.size_; // point marker size
int label_size = val_style.values_text_style_.font_size();
// Offset of value label from point must be related mainly to
@@ -1089,7 +1102,7 @@
} // void draw_plot_point_value(double x, double y, g_element& g_ptr, double value)
std::string sv(double v, const value_style& sty, bool unc = false)
- { // Build // Strip unecessary e, +, & leading exponent zeros, reducing to "1.2, 3.4" or "3.4e1, 5.6e1"...
+ { //! Strip from values any unecessary e, +, & leading exponent zeros, reducing to "1.2, 3.4" or "3.4e1, 5.6e1"...
std::stringstream label;
// Precision of uncertainty is usually less than precision of value,
// label.precision((unc) ? ((sty.value_precision_ > 3) ? sty.value_precision_-2 : 1) : sty.value_precision_);
@@ -1105,9 +1118,9 @@
} // std::string sv(double v, const value_style& sty)
void draw_plot_point_values(double x, double y, g_element& x_g_ptr, g_element& y_g_ptr, const value_style& x_sty, const value_style& y_sty, double vx, double vy)
- { // Write the *pair* of values as string of a data point.
+ { //! Write the *pair* of data point's values as a string.
- std::string label_xv = sv(vx, x_sty);
+ std::string label_xv = sv(vx, x_sty); //! Also trip unnecessary e, + and leading exponent zeros, if required.
std::string label_yv = sv(vy, y_sty);
std::string label_xu;
std::string label_yu;
@@ -1239,16 +1252,14 @@
}
} // void draw_plot_point_values(double x, double y, g_element& g_ptr, double value)
- // -----------------------------------------------------------------
- // Clear Functions.
- // When writing to multiple documents, the contents of the plot
- // may change significantly between. Rather than figuring out what
- // has and has not changed, just erase the contents of the
- // legend, title... in the document and start over.
- // -----------------------------------------------------------------
-
void clear_all()
- {
+ { //! Clear all layers of the plot.
+ /*! \details
+ When writing to multiple documents, the contents of the plot
+ may change significantly between. Rather than figuring out what
+ has and has not changed, just erase the contents of the
+ legend, title... in the document and start over.
+ */
clear_legend();
clear_background();
clear_x_axis();
@@ -1260,34 +1271,34 @@
}
void clear_background()
- {
+ { //! Clear the whole image background layer of the SVG plot.
derived().image.g(PLOT_BACKGROUND).clear();
}
void clear_title()
- {
+ { //! Clear the plot title layer of the SVG plot.
derived().image.g(PLOT_TITLE).clear();
}
void clear_points()
- {
+ { //! Clear the data points layer of the SVG plot.
derived().image.g(PLOT_DATA_POINTS).clear();
}
void clear_plot_background()
- {
+ { //! Clear the plot area background layer of the SVG plot.
derived().image.g(PLOT_WINDOW_BACKGROUND).clear();
}
void clear_legend()
- {
+ { //! Clear the legend layer of the SVG plot.
derived().image.g(PLOT_LEGEND_BACKGROUND).clear();
derived().image.g(PLOT_LEGEND_POINTS).clear();
derived().image.g(PLOT_LEGEND_TEXT).clear();
}
void clear_x_axis()
- {
+ { //! Clear the X axis layer of the SVG plot.
derived().image.g(PLOT_X_AXIS).clear();
derived().image.g(PLOT_X_MINOR_TICKS).clear();
derived().image.g(PLOT_X_MAJOR_TICKS).clear();
@@ -1296,12 +1307,15 @@
}
void clear_y_axis()
- {
+ { //! Clear the Y axis layer of the SVG plot.
derived().image.g(PLOT_Y_AXIS).clear();
+ derived().image.g(PLOT_Y_MINOR_TICKS).clear();
+ derived().image.g(PLOT_Y_MAJOR_TICKS).clear();
+ derived().image.g(PLOT_Y_LABEL).clear();
}
void clear_grids()
- {
+ { //! Clear the grids layer of the SVG plot.
derived().image.g(PLOT_X_MAJOR_GRID).clear();
derived().image.g(PLOT_X_MINOR_GRID).clear();
derived().image.g(PLOT_Y_MAJOR_GRID).clear();
@@ -1310,12 +1324,12 @@
private:
Derived& derived()
- {
+ { //! Uses Curiously Recurring Template Pattern to allow 1D and 2D to reuse common code.
+ //! See http://en.wikipedia.org/wiki/Curiously_Recurring_Template_Pattern .
return static_cast<Derived&>(*this);
- // http://en.wikipedia.org/wiki/Curiously_Recurring_Template_Pattern
}
const Derived& derived()const
- {
+ { //! const version of derived()
return static_cast<const Derived&>(*this);
}
public:
@@ -1417,7 +1431,7 @@
Derived& plot_border_width(double w);
Derived& image_border_margin(double w);
double image_border_margin();
- Derived& image_border_width(double w);
+ Derived& image_border_width(double w);
double image_border_width();
Derived& plot_window_x(double min_x, double max_x);
Derived& plot_window_y(double min_y, double max_y);
@@ -1438,7 +1452,7 @@
Derived& x_label_font_size(unsigned int i);
unsigned int x_label_font_size();
Derived& x_value_font_size(unsigned int i);
- unsigned int x_value_font_size();
+ unsigned int x_value_font_size();
Derived& x_label_font_family(const std::string& family);
const std::string& x_label_font_family();
Derived& x_axis_label_color(const svg_color& col);
@@ -1488,7 +1502,7 @@
Derived& y_label_color(const svg_color& col);
svg_color y_label_color();
Derived& x_major_tick_color(const svg_color& col);
- svg_color x_major_tick_color();
+ svg_color x_major_tick_color();
Derived& x_minor_tick_color(const svg_color& col);
svg_color x_minor_tick_color();
Derived& x_major_grid_color(const svg_color& col);
@@ -1604,23 +1618,27 @@
// class axis_plot_frame Member function Definitions (for .ipp file):
template <class Derived>
- template <class T> // T an STL container: array, vector ...
+ /*! \tparam Derived svg_1d_plot or svg_2d_plot
+ */
+ template <class T>
+ /*! \tparam T an STL container: array, vector, list, map ...
+ */
+
Derived& axis_plot_frame<Derived>::x_autoscale(const T& begin, const T& end)
- { // Data series using iterators to calculate autoscaled values.
+ { //! Data series (range accessed using iterators) to use to calculate autoscaled X-axis values.
scale_axis(begin, end,
&derived().x_auto_min_value_, &derived().x_auto_max_value_, &derived().x_auto_tick_interval_, &derived().x_auto_ticks_,
derived().autoscale_check_limits_,
derived().x_include_zero_, derived().x_tight_, derived().x_min_ticks_, derived().x_steps_);
- derived().x_autoscale_ = true; // Default to use calculated values.
+ derived().x_autoscale_ = true; //! Default to use calculated values.
return derived();
} // x_autoscale(const T& begin, const T& end)
-
template <class Derived>
template <class T> // T an STL container: array, vector ...
Derived& axis_plot_frame<Derived>::x_autoscale(const T& container) // Whole data series.
- { // to use to calculate autoscaled values.
+ { //! Data series (all values) to use to calculate autoscaled X-axis values.
//scale_axis(container.begin(), container.end(), // All the container.
scale_axis(container, // All the container.
&derived().x_auto_min_value_, &derived().x_auto_max_value_, &derived().x_auto_tick_interval_, &derived().x_auto_ticks_,
@@ -1631,250 +1649,285 @@
return derived();
} // x_autoscale(const T& container)
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::image_size(unsigned int x, unsigned int y)
- { // Might put default sizes here?
+ { //! Set SVG image size (SVG units, default pixels).
+ // Might put default sizes here?
// Check on sanity of these values?
derived().image.image_size(x, y);
return derived();
}
- template <class Derived>
+ template <class Derived>
unsigned int axis_plot_frame<Derived>::image_x_size()
- {
+ { //! Get SVG image X-axis size (SVG units, default pixels).
return derived().image.x_size();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::image_x_size(unsigned int i)
- {
+ { //! Set SVG image X-axis size (SVG units, default pixels).
derived().image.x_size(i);
return derived();
}
- template <class Derived>
+ template <class Derived>
unsigned int axis_plot_frame<Derived>::image_y_size()
- {
+ { //! Get SVG image Y-axis size (SVG units, default pixels).
return derived().image.y_size();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::image_y_size(unsigned int i)
- {
+ {//! Set SVG image Y-axis size (SVG units, default pixels).
derived().image.y_size(i);
return derived();
}
- template <class Derived>
+ template <class Derived>
svg_color axis_plot_frame<Derived>::background_color()
- {
+ { //! Get plot background color.
return derived().image.g(PLOT_BACKGROUND).style().fill_color();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::background_color(const svg_color& col)
- {
+ { //! Set plot background color.
derived().image.g(PLOT_BACKGROUND).style().fill_color(col);
return derived();
}
-
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::background_border_color(const svg_color& col)
- {
+ { //! Set plot background border color.
derived().image.g(PLOT_BACKGROUND).style().stroke_color(col);
+ /*!
+ /code
+ // background_border_color example:
+ svg_2d_plot my_plot(my_data, "My Data").background_border_color(red).background_color(azure);
+ /endcode
+ */
+
return derived();
}
- template <class Derived>
+ template <class Derived>
svg_color axis_plot_frame<Derived>::background_border_color()
- {
+ { //! Get plot background border color.
return derived().image.g(PLOT_BACKGROUND).style().stroke_color();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::background_border_width(double w)
- {
+ { //! Set plot background border width.
derived().image.g(PLOT_BACKGROUND).style().stroke_width(w);
return derived();
}
- template <class Derived>
+ template <class Derived>
double axis_plot_frame<Derived>::background_border_width()
- {
+ { //! Get plot background border width.
return derived().image.g(PLOT_BACKGROUND).style().stroke_width();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::description(const std::string d)
- { // Writes description to the document(for header as <desc>).
+ { //! Writes description to the document (for header as <desc> My Data <\desc>).
derived().image.description(d);
return derived();
}
- template <class Derived>
+ template <class Derived>
const std::string& axis_plot_frame<Derived>::description()
- { // Gets description of the document(for header as <desc>).
+ { //! Get description of the document (for header as <desc> ... <\desc>).
return derived().image.description();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::document_title(const std::string d)
- { // Writes document title to the document(for header as <title>)..
+ { //! Write document title to the SVG document (for header as <title> My Title <\title>).
derived().image.document_title(d);
return derived();
}
- template <class Derived>
+ template <class Derived>
std::string axis_plot_frame<Derived>::document_title()
- { // Get document title to the document(for header as <title>)..
+ { //! Get document title to the document (for header as <title> My Title <\title>).
return derived().image.document_title();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::copyright_holder(const std::string d)
- { // Writes copyright_holder to the document
- // (for header as <!-- SVG Plot Copyright Paul A. Bristow 2007 --> )
- // and as metadata: meta name="copyright" content="Paul A. Bristow" />
+ { //! Writes copyright_holder to the document
+ //! (for header as <!-- SVG Plot Copyright Paul A. Bristow 2007 --> )
+ //! and as metadata: meta name="copyright" content="Paul A. Bristow" />
derived().image.copyright_holder(d);
return derived();
}
- template <class Derived>
+ template <class Derived>
const std::string axis_plot_frame<Derived>::copyright_holder()
- { // Get copyright_holder.
+ { //! Get copyright_holder.
return derived().image.copyright_holder();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::copyright_date(const std::string d)
- { // Writes copyright_date to the document.
- // and as metadata <meta name="date" content="2007" />
+ { //! Writes copyright_date to the document.
+ //! and as metadata <meta name="date" content="2007" />
derived().image.copyright_date(d);
return derived();
}
- template <class Derived>
+ template <class Derived>
const std::string axis_plot_frame<Derived>::copyright_date()
- { // Get copyright_date.
+ { //! Get copyright_date.
return derived().image.copyright_date();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::license(std::string repro,
- std::string distrib ,
+ std::string distrib,
std::string attrib,
std::string commercial,
std::string derivative)
- { // Might check these are "permits", "requires", or "prohibits"?
+ { //! Set license conditions for reproduction, atribution, commercial use, and derivative works,
+ //! usually "permits", "requires", or "prohibits",
+ //! and set license_on == true.
+ // Might check these are "permits", "requires", or "prohibits"?
derived().image.license(repro, distrib, attrib, commercial, derivative);
return derived();
}
- template <class Derived>
+ template <class Derived>
bool axis_plot_frame<Derived>::license_on()
- {
+ { //! \return true if license conditions should be included in the SVG document.
+ //! \see axis_plot_frame::license
return derived().image.license_on();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::license_on(bool l)
- {
+ { //! Set if license conditions should be included in the SVG document.
+ //! \see axis_plot_frame::license
derived().image.license_on(l);
return derived();
}
- template <class Derived>
+ template <class Derived>
bool axis_plot_frame<Derived>::boost_license_on()
- {
+ { //! Get if the Boost license conditions should be included in the SVG document.
+ //! To set see axis_plot_frame::boost_license_on(bool).
return derived().image.boost_license_one();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::boost_license_on(bool l)
- {
+ { //! Set if the Boost license conditions should be included in the SVG document.
derived().image.boost_license_on(l);
return derived();
}
- template <class Derived>
+ template <class Derived>
const std::string axis_plot_frame<Derived>::license_reproduction()
- { // Get copyright_date.
+ { //! Get reproduction license conditions, usually "permits", "requires", or "prohibits".
return derived().image.reproduction();
}
- template <class Derived>
+ template <class Derived>
const std::string axis_plot_frame<Derived>::license_distribution()
- { // Get copyright_date.
+ { //! Get distribution license conditions, usually "permits", "requires", or "prohibits".
return derived().image.distribution();
}
- template <class Derived>
+ template <class Derived>
const std::string axis_plot_frame<Derived>::license_attribution()
- { // Get copyright_date.
+ { //! Get attribution license conditions, usually "permits", "requires", or "prohibits".
return derived().image.attribution();
}
- template <class Derived>
+ template <class Derived>
const std::string axis_plot_frame<Derived>::license_commercialuse()
- { // Get copyright_date.
+ { //! Get commercial use license conditions, usually "permits", "requires", or "prohibits".
return derived().image.commercialuse();
}
-
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::coord_precision(int digits)
- { // Precision of coordinates in decimal digits (default 3).
+ { //! Precision of SVG coordinates in decimal digits (default 3).
+ /*!
+ \details 3 decimal digits precision is sufficient for small images.
+ 4 or 5 decimal digits precision will give higher quality plots,
+ especially for larger images, at the expense of larger .svg files,
+ particularly if there are very many data points.
+ */
derived().image.coord_precision(digits);
return derived();
}
- template <class Derived>
+ template <class Derived>
int axis_plot_frame<Derived>::coord_precision()
- { //
+ { //! Get precision of SVG coordinates in decimal digits.
return derived().image.coord_precision();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_value_precision(int digits)
- { // Precision of X tick label values in decimal digits (default 3).
+ { //! Precision of X tick label values in decimal digits (default 3).
+ /*!
+ \details 3 decimal digits precision is sufficient for small images.
+ 4 or 5 decimal digits precision will give more cluttered plots.
+ If the range of labels is very small, then more digits will be essential.
+ */
+
derived().x_ticks_.value_precision_ = digits;
return derived();
}
- template <class Derived>
+ template <class Derived>
int axis_plot_frame<Derived>::x_value_precision()
- { //
+ { //! Get precision of X tick label values in decimal digits
return derived().x_ticks_.value_precision_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_value_ioflags(int flags)
- { // IO flags of X tick label values (default 0X201).
+ { //! Set iostream std::ios::fmtflags for X value label (default decimal == 0X201).
+ /*! \details
+ Mainly useful for changing to scientific, fixed or hexadecimal format.
+ For example: .x_value_ioflags(std::ios::dec | std::ios::scientific)
+ */
derived().x_ticks_.value_ioflags_ = flags;
return derived();
}
- template <class Derived>
+ template <class Derived>
int axis_plot_frame<Derived>::x_value_ioflags()
- { // ALL stream ioflags for control of format of X value labels.
+ { //! Get stream ioflags for control of format of X value labels.
return derived().x_ticks_.value_ioflags_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_labels_strip_e0s(bool cmd)
- {
+ { //! Set if to strip redundant zeros, signs and exponents, for example, reducing "1.2e+000" to "1.2"
+ //! This markedly reduces visual clutter, and is the default.
derived().x_ticks_.strip_e0s_ = cmd;
return derived();
}
- template <class Derived>
+ template <class Derived>
bool axis_plot_frame<Derived>::y_labels_strip_e0s()
- {
+ { //! Get if to strip redundant zeros, signs and exponents, for example, reducing "1.2e+000" to "1.2"
return derived().x_ticks_.strip_e0s_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::title(const std::string title)
- { // Plot title. TODO
+ { //! Set a title for plot.
+ /*! \details
+ The string may include Unicode for greek letter and symbols.
+ For example: my_plot.title("Plot of Ω function");
+ includes a greek omega.
+ */
+ // Plot title. TODO
// new text parent code pushback
// effectively concatenates with any existing title.
// So clear the existing string first but doesn't work,
@@ -1885,188 +1938,188 @@
return derived();
}
- template <class Derived>
+ template <class Derived>
const std::string axis_plot_frame<Derived>::title()
- {
+ { //! Get a title for plot, whose string may include Unicode for greek letter and symbols.
return derived().title_info_.text();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::title_font_size(unsigned int i)
- {
+ { //! Sets the font size for the title (svg units, default pixels).
derived().title_info_.style().font_size(i);
return derived();
}
- template <class Derived>
+ template <class Derived>
unsigned int axis_plot_frame<Derived>::title_font_size()
- {
+ { //! Get the font size for the title (svg units, default pixels).
return derived().title_info_.style().font_size();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::title_font_family(const std::string& family)
- {
+ { //! Set the font family for the title (for example: .title_font_family("Lucida Sans Unicode");
derived().title_info_.style().font_family(family);
return derived();
}
- template <class Derived>
+ template <class Derived>
const std::string& axis_plot_frame<Derived>::title_font_family()
- {
+ { //! Get the font family for the title
return derived().title_info_.style().font_family();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::title_font_style(const std::string& style)
- {
+ { //! Set the font style for the title (default normal).
derived().title_info_.style().font_style(style);
return derived();
}
- template <class Derived>
+ template <class Derived>
const std::string& axis_plot_frame<Derived>::title_font_style()
- {
+ { //! Get the font style for the title (default normal).
return derived().title_info_.style().font_style();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::title_font_weight(const std::string& weight)
- {
+ { //! Set the font weight for the title (default normal).
derived().title_info_.style().font_weight(weight);
return derived();
}
- template <class Derived>
+ template <class Derived>
const std::string& axis_plot_frame<Derived>::title_font_weight()
- {
+ {//! Get the font weight for the title.
return derived().title_info_.style().font_weight();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::title_font_stretch(const std::string& stretch)
- {
+ { //! Set the font stretch for the title (default normal), wider or narrow.
derived().title_info_.style().font_stretch(stretch);
return derived();
}
- template <class Derived>
+ template <class Derived>
const std::string& axis_plot_frame<Derived>::title_font_stretch()
- {
+ { //! Get the font stretch for the title.
return derived().title_info_.style().font_stretch();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::title_font_decoration(const std::string& decoration)
- {
+ { //! Set the font decoration for the title (default normal, or underline, overline or strike-thru).
derived().title_info_.style().font_decoration(decoration);
return derived();
}
- template <class Derived>
+ template <class Derived>
const std::string& axis_plot_frame<Derived>::title_font_decoration()
- {
+ { //! Get the font decoration for the title (default normal, or underline, overline or strike-thru).
return derived().title_info_.style().font_decoration();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::title_font_rotation(rotate_style rotate)
- { // Degrees (0 to 360).
+ { //! Set the rotation for the title font (degrees, 0 to 360).
derived().title_info_.rotation(rotate);
return derived();
}
- template <class Derived>
+ template <class Derived>
int axis_plot_frame<Derived>::title_font_rotation()
- {
+ { //! Get the rotation for the title font (degrees).
return derived().title_info_.rotation();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::title_font_alignment(align_style alignment)
- {
+ { //! Set the alignment for the title.
derived().title_info_.alignment(alignment);
return derived();
}
- template <class Derived>
+ template <class Derived>
align_style axis_plot_frame<Derived>::title_font_alignment()
- {
+ { //! Get the alignment for the title.
return derived().title_info_.alignment();
}
// Legend.
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::legend_width(double width)
- {
+ { //! Set the width for the legend.
derived().legend_width_ = width;
return derived();
}
- template <class Derived>
+ template <class Derived>
double axis_plot_frame<Derived>::legend_width()
- {
+ { //! Get the width for the legend.
return derived().legend_width_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::legend_title(const std::string title)
- {
+ { //! Set the title for the legend.
derived().legend_header_.text(title);
return derived();
}
- template <class Derived>
+ template <class Derived>
const std::string axis_plot_frame<Derived>::legend_title()
- {
+ { //! Get the title for the legend.
return derived().legend_header_.text();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::legend_font_weight(const std::string& weight)
- {
+ { //! Set the font weight for the legend title.
derived().legend_header_.style().font_weight(weight);
return derived();
}
- template <class Derived>
+ template <class Derived>
const std::string& axis_plot_frame<Derived>::legend_font_weight()
- {
+ { //! Get the font weight for the legend title.
return derived().legend_header_.style().font_weight();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::legend_font_family(const std::string& family)
- {
+ { //! Set the font family for the legend title.
derived().legend_header_.style().font_family(family);
return derived();
}
- template <class Derived>
+ template <class Derived>
const std::string& axis_plot_frame<Derived>::legend_font_family()
- {
+ { //! Get the font family for the legend title.
return derived().legend_header_.style().font_family();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::legend_title_font_size(unsigned int size)
- {
+ { //! Set the font size for the legend title (svg units, default pixels).
derived().legend_header_.style().font_size(size);
return derived();
}
- template <class Derived>
+ template <class Derived>
unsigned int axis_plot_frame<Derived>::legend_title_font_size()
- {
+ { //! Get the font size for the legend title (svg units, default pixels).
return derived().legend_header_.style().font_size();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::legend_top_left(double x, double y)
- { // Position of top left of legend box (svg coordinates).
- // Bottom right is controlled by contents, so cannot set it.
+ { //! Set position of top left of legend box (svg coordinates, default pixels).
+ //! Bottom right is controlled by contents, so the user cannot set it.
if((x < 0) || (x > derived().image.x_size()) || (y < 0) || (y > derived().image.y_size()))
{
throw std::runtime_error("Legend box position outside image!");
@@ -2076,90 +2129,90 @@
return derived();
}
- template <class Derived>
+ template <class Derived>
const std::pair<double, double> axis_plot_frame<Derived>::legend_top_left()
- {// Top left of legend box.
+ { //! Get svg coordinate (default pixels) of top left of legend box.
std::pair<double, double> r;
r.first = derived().legend_left_;
r.second = derived().legend_top_;
return r;
}
- template <class Derived>
+ template <class Derived>
const std::pair<double, double> axis_plot_frame<Derived>::legend_bottom_right()
- {// Bottom right of legend box.
+ { //! Get svg coordinate (default pixels) of Bottom right of legend box.
std::pair<double, double> r;
r.first = derived().legend_right_;
r.second = derived().legend_bottom_;
return r;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::legend_lines(bool is)
- { // If legend should include samples of the lines joining data points.
+ { //! Set true if legend should include samples of the lines joining data points.
+ //! \details This allows different series of data points to be distinguished by different color and/or width.
+ //! This is especially useful to show plots of different functions and/or different parameters in different colors.
derived().legend_lines_ = is;
return derived();
}
- template <class Derived>
+ template <class Derived>
bool axis_plot_frame<Derived>::legend_lines()
- {
+ {//! Get true if legend should include samples of the lines joining data points.
return derived().legend_lines_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::legend_on(bool cmd)
- {
+ { //! Set true if a legend is wanted.
derived().legend_on_ = cmd;
return derived();
}
- template <class Derived>
+ template <class Derived>
bool axis_plot_frame<Derived>::legend_on()
- {
+ { //! Get true if a legend is wanted.
return derived().legend_on_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::legend_place(legend_places l)
- {
+ { //! Set the position of the legend, \see boost::svg::legend_places
derived().legend_place_ = l;
return derived();
}
-
- template <class Derived>
+ template <class Derived>
legend_places axis_plot_frame<Derived>::legend_place()
- {
+ { //! Get the position of the legend, \see boost::svg::legend_places
return derived().legend_place_;
}
- template <class Derived>
+ template <class Derived>
bool axis_plot_frame<Derived>::legend_outside()
- {
+ { //! Get if the legend should be outside the plot area.
return derived().outside_legend_on_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::legend_header_font_size(int size)
- {
+ { //! Set legend header font size (svg units, default pixels).
derived().legend_header_.style().font_size(size);
return *this;
}
- template <class Derived>
+ template <class Derived>
int axis_plot_frame<Derived>::legend_header_font_size()
- {
+ { //! Get legend header font size (svg units, default pixels).
return derived().legend_header_.style().font_size();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::plot_window_on(bool cmd)
- {
+ { //! Set true if a plot window is wanted (or false if the whole image is to be used).
derived().plot_window_on_ = cmd;
-
if(cmd)
- { // Set plot window
+ { // Set plot window.
derived().image.g(detail::PLOT_WINDOW_BACKGROUND).style()
.fill_color(derived().plot_window_border_.fill_) // background color and
.stroke_color(derived().plot_window_border_.stroke_); // border color.
@@ -2168,69 +2221,71 @@
return derived();
}
- template <class Derived>
+ template <class Derived>
bool axis_plot_frame<Derived>::plot_window_on()
- {
+ {//! Get true if a plot window is wanted (or false if the whole image is to be used).
return derived().plot_window_on_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::plot_border_color(const svg_color& col)
- {
+ { //! Set the color for the plot window background.
derived().plot_window_border_.stroke_ = col;
derived().image.g(detail::PLOT_WINDOW_BACKGROUND).style().stroke_color(col);
return derived();
}
- template <class Derived>
+ template <class Derived>
svg_color axis_plot_frame<Derived>::plot_border_color()
- {
+ { //! Get the color for the plot window background.
return derived().image.g(detail::PLOT_WINDOW_BACKGROUND).style().stroke_color();
}
- template <class Derived>
+ template <class Derived>
double axis_plot_frame<Derived>::plot_border_width()
- {
+ { //! Get the width for the plot window border (svg units, default pixels).
return derived().image.g(detail::PLOT_WINDOW_BACKGROUND).style().stroke_width();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::plot_border_width(double w)
- {
+ { //! Set the width for the plot window border (svg units, default pixels).
derived().plot_window_border_.width_ = w;
derived().image.g(detail::PLOT_WINDOW_BACKGROUND).style().stroke_width(w);
return derived();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::image_border_margin(double w)
- {
+ { //! Set the margin around the plot window border (svg units, default pixels).
+ //! \details This prevents the plot window getting too close to other elements of the plot.
derived().image_border_.margin_ = w;
return derived();
}
- template <class Derived>
+ template <class Derived>
double axis_plot_frame<Derived>::image_border_margin()
- {
+ { //! Get the margin around the plot window border (svg units, default pixels).
return derived().image_border_.margin_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::image_border_width(double w)
- {
+ { //! Set the svg image border width (svg units, default pixels).
derived().image_border_.width_ = w;
return derived();
}
- template <class Derived>
+ template <class Derived>
double axis_plot_frame<Derived>::image_border_width()
- {
+ { //! Get the svg image border width (svg units, default pixels).
return derived().image_border_.width_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::plot_window_x(double min_x, double max_x)
- { // This is normally calculated from other plot values.
+ { //! Set the minimum and maximum (cartesian data units) for the plot window X axis.
+ //! This is normally calculated from other plot values.
if(max_x <= min_x)
{
throw std::runtime_error("plot_window X: x_max_ <= x_min_");
@@ -2244,9 +2299,10 @@
return derived();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::plot_window_y(double min_y, double max_y)
- { // This is normally calculated from other plot values.
+ { //! Set the minimum and maximum (cartesian data units) for the plot window Y axis.
+ //! This is normally calculated from other plot values.
if(max_y <= min_y)
{
@@ -2261,262 +2317,268 @@
return derived();
}
- template <class Derived>
- std::pair<double, double> axis_plot_frame<Derived>::plot_window_x()
- {
- std::pair<double, double> r;
- r.first = derived().plot_left_;
- r.second = derived().plot_right_;
- return r;
- }
+ //! Get the minimum and maximum (cartesian data units) for the plot window axes.
- template <class Derived>
+ template <class Derived>
double axis_plot_frame<Derived>::plot_window_x_left()
- {
+ { //! Get the left of the plot window.
return derived().plot_left_;
}
- template <class Derived>
+ template <class Derived>
double axis_plot_frame<Derived>::plot_window_x_right()
- {
+ { //! Get the right of the plot window.
return derived().plot_right_;
}
- template <class Derived>
+ template <class Derived>
double axis_plot_frame<Derived>::plot_window_y_top()
- {
+ { //! Get the top of the plot window.
return derived().plot_top_;
}
- template <class Derived>
+ template <class Derived>
double axis_plot_frame<Derived>::plot_window_y_bottom()
- {
+ { //! Get the top of the plot window.
return derived().plot_bottom_;
}
+ template <class Derived>
+ std::pair<double, double> axis_plot_frame<Derived>::plot_window_x()
+ { //! Get both the left and right (X axis) of the plot window.
+ std::pair<double, double> r;
+ r.first = derived().plot_left_;
+ r.second = derived().plot_right_;
+ return r;
+ }
- template <class Derived>
+ template <class Derived>
std::pair<double, double> axis_plot_frame<Derived>::plot_window_y()
- {
+ { //! Get both the top and bottom (Y axis) of the plot window.
std::pair<double, double> r;
r.first = derived().plot_top_;
r.second = derived().plot_bottom_;
return r;
}
- template <class Derived>
+ template <class Derived>
double axis_plot_frame<Derived>::x_minor_interval()
- {
+ { //! Get the interval between X minor ticks.
return derived().x_ticks_.minor_interval_; // interval
}
- template <class Derived>
+ template <class Derived>
double axis_plot_frame<Derived>::y_minor_interval()
- {
+ { //! Get the interval between Y minor ticks.
return derived().y_ticks_.minor_interval_; // interval
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_ticks_up_on(bool cmd)
- {
+ { //! Set true if X major ticks should mark upwards.
derived().x_ticks_.up_ticks_on_ = cmd;
return derived();
}
- template <class Derived>
+ template <class Derived>
bool axis_plot_frame<Derived>::x_ticks_up_on()
- {
+ { //! Get true if X major ticks should mark upwards.
return derived().x_ticks_.up_ticks_on_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_ticks_down_on(bool cmd)
- {
+ { //! Set true if X major ticks should mark downwards.
derived().x_ticks_.down_ticks_on_ = cmd;
return derived();
}
- template <class Derived>
+ template <class Derived>
bool axis_plot_frame<Derived>::x_ticks_down_on()
- {
+ { //! Get true if X major ticks should mark downwards.
return derived().x_ticks_.down_ticks_on_;
}
- // Only need y_ticks_left_on & y_ticks_right_on in 2D
+ // Only need y_ticks_left_on & y_ticks_right_on in 2D, so not defined here.
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_label_on(bool cmd)
- { // Show X-axis label text, or not.
- // Also switched on by setting label text.
- // (on the assumption that if label text is set, display is also wanted,
- // but can be switched off if *not* required).
+ { //! Set true if want to show X-axis label text.
+ //! \details Also switched on by setting label text.
+ //! (on the assumption that if label text is set, display is also wanted,
+ //! but can be switched off if *not* required).
derived().x_axis_.label_on_ = cmd;
return derived();
}
- template <class Derived>
+ template <class Derived>
bool axis_plot_frame<Derived>::x_label_on()
- {
+ { //! Get true if want to show X-axis label text.
return derived().x_axis_.label_on_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_label_font_size(unsigned int i)
- {
+ { //! Set X axis label font size (svg units, default pixels).
derived().x_label_info_.style().font_size(i);
return derived();
}
- template <class Derived>
+ template <class Derived>
unsigned int axis_plot_frame<Derived>::x_label_font_size()
- {
+ { //! Get X axis label font size (svg units, default pixels).
return derived().x_label_info_.style().font_size();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_value_font_size(unsigned int i)
- {
+ { //! Set X tick value label font size (svg units, default pixels).
derived().x_value_value.style().font_size(i);
return derived();
}
- template <class Derived>
+ template <class Derived>
unsigned int axis_plot_frame<Derived>::x_value_font_size()
- {
+ { //! Get X tick value label font size (svg units, default pixels).
return derived().x_value_value.style().font_size();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_label_font_family(const std::string& family)
- {
+ { //! Set X tick value label font family.
derived().x_label_info_.style().font_family(family);
return derived();
}
- template <class Derived>
+ template <class Derived>
const std::string& axis_plot_frame<Derived>::x_label_font_family()
- {
+ { //! Get X tick value label font family.
return derived().x_label_info_.style().font_family();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_axis_label_color(const svg_color& col)
- { // Set BOTH stroke and fill to the same color.
+ { //! Set X axis label color.
+ // Set BOTH stroke and fill to the same color.
derived().image.g(detail::PLOT_X_LABEL).style().fill_color(col);
derived().image.g(detail::PLOT_X_LABEL).style().stroke_color(col);
return *this;
}
- template <class Derived>
+ template <class Derived>
svg_color axis_plot_frame<Derived>::x_axis_label_color()
- { // But only return the stroke color.
+ { //! Get X axis label color.
+ // But only return the stroke color.
return derived().image.g(detail::PLOT_X_LABEL).style().stroke_color();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_axis_value_color(const svg_color& col)
- { // Set BOTH stroke and fill to the same color.
+ { //! Set X axis tick value label color.
+ // Set BOTH stroke and fill to the same color.
derived().image.g(detail::PLOT_VALUE_LABELS).style().fill_color(col);
derived().image.g(detail::PLOT_VALUE_LABELS).style().stroke_color(col);
return *this;
}
- template <class Derived>
+ template <class Derived>
svg_color axis_plot_frame<Derived>::x_axis_value_color()
- { // But only return the stroke color.
+ { //! Get X axis tick value label color.
+ // But only return the stroke color.
return derived().image.g(detail::PLOT_VALUE_LABELS).style().stroke_color();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_ticks_on_window_or_axis(int cmd)
{ // External style, top = +1, bottom = -1 (default).
derived().x_ticks_.ticks_on_window_or_axis_ = cmd;
return derived();
}
- template <class Derived>
+ template <class Derived>
int axis_plot_frame<Derived>::x_ticks_on_window_or_axis()
- { // External style = true.
+ { //! Get true if X axis ticks wanted on the window (rather than on axis).
+ // External style = true.
return derived().x_ticks_.ticks_on_window_or_axis_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_label_units_on(bool cmd)
- {
+ { //! Set true if want X axis label to include units (as well as label like "length").
derived().x_axis_.label_units_on_ = cmd;
return derived();
}
- template <class Derived>
+ template <class Derived>
bool axis_plot_frame<Derived>::x_label_units_on()
- {
+ { //! Set true if want X axis label to include units (as well as label like "length").
return derived().x_axis_.label_units_on_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_major_value_labels_side(int cmd)
- {
+ { //! Set the side for X ticks major value labels.
derived().x_ticks_.major_value_labels_side_ = cmd;
return derived();
}
- template <class Derived>
+ template <class Derived>
int axis_plot_frame<Derived>::x_major_value_labels_side()
- {
+ { //! Get the side for X ticks major value labels.
return derived().x_ticks_.major_value_labels_side_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_major_label_rotation(rotate_style rot)
- {
+ { //! Set rotation for X ticks major value labels.
derived().x_ticks_.label_rotation_ = rot;
return derived();
}
- template <class Derived>
+ template <class Derived>
rotate_style axis_plot_frame<Derived>::x_major_label_rotation()
- {
+ { //! Get rotation for X ticks major value labels.
return derived().x_ticks_.label_rotation_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::title_on(bool cmd)
{
derived().title_on_ = cmd;
return derived();
}
- template <class Derived>
+ template <class Derived>
bool axis_plot_frame<Derived>::title_on()
{
return derived().title_on_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_major_grid_on(bool is)
{
derived().x_ticks_.major_grid_on_ = is;
return derived();
}
- template <class Derived>
+ template <class Derived>
bool axis_plot_frame<Derived>::x_major_grid_on()
{
return derived().x_ticks_.major_grid_on_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_minor_grid_on(bool is)
{
derived().x_ticks_.minor_grid_on_ = is;
return derived();
}
- template <class Derived>
+ template <class Derived>
bool axis_plot_frame<Derived>::x_minor_grid_on()
{
return derived().x_ticks_.minor_grid_on_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::axes_on(bool is)
{ // Draw *both* x and y axes (note plural).
derived().x_axis_.axis_line_on_ = is;
@@ -2524,33 +2586,33 @@
return derived();
}
- template <class Derived>
+ template <class Derived>
bool axis_plot_frame<Derived>::axes_on()
{ // Used X in preference to Y for 1D, but now require *both* x and y axis on.
return derived().x_axis_.axis_line_on_ && derived().y_axis_.axis_line_on_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_axis_on(bool is)
{ // Draw a horizontal x_axis_ line.
derived().x_axis_.axis_line_on_ = is;
return derived();
}
- template <class Derived>
+ template <class Derived>
bool axis_plot_frame<Derived>::x_axis_on()
{ // Use X in preference to Y for 1D
return derived().x_axis_.axis_line_on_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::y_axis_on(bool is)
{// Draw a vertical y_axis_ line.
derived().y_axis_.axis_line_on_ = is;
return derived();
}
- template <class Derived>
+ template <class Derived>
bool axis_plot_frame<Derived>::y_axis_on()
{ // Should be always false for 1D.
return derived().y_axis_.axis_line_on_;
@@ -2559,7 +2621,7 @@
// enums like PLOT_TITLE provide a std:string like "title"
// colors .stroke_color, .stroke_width and font are set in the appropriate g_element.
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::title_color(const svg_color& col)
{ // Function title_color could set both fill (middle) and stroke (outside),
// but just setting fill if simplest,
@@ -2569,7 +2631,7 @@
return derived();
}
- template <class Derived>
+ template <class Derived>
svg_color axis_plot_frame<Derived>::title_color()
{ // Function title_color could get either fill and stroke,
// return derived().image.g(PLOT_TITLE).style().stroke_color();
@@ -2599,7 +2661,7 @@
// return derived().image.g(PLOT_TITLE).style().stroke_width();
//}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::legend_color(const svg_color& col)
{
// derived().image.g(PLOT_LEGEND_TEXT).style().stroke_color(col);
@@ -2607,7 +2669,7 @@
return derived();
}
- template <class Derived>
+ template <class Derived>
svg_color axis_plot_frame<Derived>::legend_color()
{ // Function legend_color sets only stroke, assuming that 'filled' text is not being used.
// (It produces much lower quality fonts on some browsers).
@@ -2615,7 +2677,7 @@
// return derived().image.g(PLOT_LEGEND_TEXT).style().stroke_color();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::legend_background_color(const svg_color& col)
{
derived().legend_box_.fill(col);
@@ -2623,19 +2685,19 @@
return derived();
}
- template <class Derived>
+ template <class Derived>
svg_color axis_plot_frame<Derived>::legend_background_color()
{
return derived().image.g(PLOT_LEGEND_BACKGROUND).style().fill_color();
}
- template <class Derived>
+ template <class Derived>
bool axis_plot_frame<Derived>::legend_box_fill_on()
{
return derived().legend_box_.fill_on();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::legend_border_color(const svg_color& col)
{
derived().legend_box_.stroke(col);
@@ -2643,27 +2705,27 @@
return derived();
}
- template <class Derived>
+ template <class Derived>
svg_color axis_plot_frame<Derived>::legend_border_color()
{
return derived().legend_box_.stroke();
// return derived().image.g(PLOT_LEGEND_BACKGROUND).style().stroke_color();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::plot_background_color(const svg_color& col)
{
derived().image.g(PLOT_WINDOW_BACKGROUND).style().fill_color(col);
return derived();
}
- template <class Derived>
+ template <class Derived>
svg_color axis_plot_frame<Derived>::plot_background_color()
{
return derived().image.g(PLOT_WINDOW_BACKGROUND).style().fill_color();
}
- template <class Derived>
+ template <class Derived>
const std::string axis_plot_frame<Derived>::x_axis_position()
{ // Return the position of the X-axis.
switch(derived().x_axis_position_)
@@ -2679,33 +2741,33 @@
}
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_axis_color(const svg_color& col)
{ // Note only stroke color is set.
derived().image.g(PLOT_X_AXIS).style().stroke_color(col);
return derived();
}
- template <class Derived>
+ template <class Derived>
svg_color axis_plot_frame<Derived>::x_axis_color()
{
return derived().image.g(PLOT_X_AXIS).style().stroke_color();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::y_axis_color(const svg_color& col)
{
derived().image.g(PLOT_Y_AXIS).style().stroke_color(col);
return derived();
}
- template <class Derived>
+ template <class Derived>
svg_color axis_plot_frame<Derived>::y_axis_color()
{
return derived().image.g(PLOT_Y_AXIS).style().stroke_color();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_label_color(const svg_color& col)
{ // add fill as well PAB Oct 07
derived().image.g(PLOT_X_LABEL).style().fill_color(col);
@@ -2714,26 +2776,26 @@
}
// Browsers could implement better.
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_label_width(double width)
{ // width of text is effectively the boldness.
derived().image.g(PLOT_X_LABEL).style().stroke_width(width);
return derived();
}
- template <class Derived>
+ template <class Derived>
double axis_plot_frame<Derived>::x_label_width()
{
return derived().image.g(PLOT_X_LABEL).style().stroke_width();
}
- template <class Derived>
+ template <class Derived>
svg_color axis_plot_frame<Derived>::x_label_color()
{
return derived().image.g(PLOT_X_LABEL).style().fill_color();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::y_label_color(const svg_color& col)
{
derived().image.g(PLOT_Y_LABEL).style().fill_color(col);
@@ -2741,120 +2803,120 @@
return derived();
}
- template <class Derived>
+ template <class Derived>
svg_color axis_plot_frame<Derived>::y_label_color()
{
return derived().image.g(PLOT_Y_LABEL).style().fill_color();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_major_tick_color(const svg_color& col)
{
derived().image.g(PLOT_X_MAJOR_TICKS).style().stroke_color(col);
return derived();
}
-
- template <class Derived>
+
+ template <class Derived>
svg_color axis_plot_frame<Derived>::x_major_tick_color()
{
return derived().image.g(PLOT_X_MAJOR_TICKS).style().stroke_color();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_minor_tick_color(const svg_color& col)
{
derived().image.g(PLOT_X_MINOR_TICKS).style().stroke_color(col);
return derived();
}
- template <class Derived>
+ template <class Derived>
svg_color axis_plot_frame<Derived>::x_minor_tick_color()
{
return derived().image.g(PLOT_X_MINOR_TICKS).style().stroke_color();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_major_grid_color(const svg_color& col)
{
derived().image.g(PLOT_X_MAJOR_GRID).style().stroke_color(col);
return derived();
}
- template <class Derived>
+ template <class Derived>
svg_color axis_plot_frame<Derived>::x_major_grid_color()
{
return derived().image.g(PLOT_X_MAJOR_GRID).style().stroke_color();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_major_grid_width(double w)
{
derived().image.g(PLOT_X_MAJOR_GRID).style().stroke_width(w);
return derived();
}
- template <class Derived>
+ template <class Derived>
double axis_plot_frame<Derived>::x_major_grid_width()
{
return derived().image.g(PLOT_X_MAJOR_GRID).style().stroke_width();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_minor_grid_color(const svg_color& col)
{
derived().image.g(PLOT_X_MINOR_GRID).style().stroke_color(col);
return derived();
}
- template <class Derived>
+ template <class Derived>
svg_color axis_plot_frame<Derived>::x_minor_grid_color()
{
return derived().image.g(PLOT_X_MINOR_GRID).style().stroke_color();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_minor_grid_width(double w)
{
derived().image.g(PLOT_X_MINOR_GRID).style().stroke_width(w);
return derived();
}
- template <class Derived>
+ template <class Derived>
double axis_plot_frame<Derived>::x_minor_grid_width()
{
return derived().image.g(PLOT_X_MINOR_GRID).style().stroke_width();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_axis_width(double width)
{
derived().image.g(PLOT_X_AXIS).style().stroke_width(width);
return derived();
}
- template <class Derived>
+ template <class Derived>
double axis_plot_frame<Derived>::x_axis_width()
{
return derived().image.g(PLOT_X_AXIS).style().stroke_width();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::data_lines_width(double width)
{
derived().image.g(PLOT_DATA_LINES).style().stroke_width(width);
return derived();
}
- template <class Derived>
+ template <class Derived>
double axis_plot_frame<Derived>::data_lines_width()
{
return derived().image.g(PLOT_DATA_LINES).style().stroke_width();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_label(const std::string& str)
{
derived().x_label_info_.text(str);
@@ -2863,13 +2925,13 @@
return derived();
}
- template <class Derived>
+ template <class Derived>
std::string axis_plot_frame<Derived>::x_label()
{
return derived().x_label_info_.text();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_label_units(const std::string& str)
{
derived().x_units_info_.text(str);
@@ -2877,14 +2939,14 @@
return derived();
}
- template <class Derived>
+ template <class Derived>
std::string axis_plot_frame<Derived>::x_label_units()
{
return derived().x_units_info_.text();
}
// y_label not needed in 1D.
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::y_label(const std::string& str)
{
derived().y_label_info_.text(str);
@@ -2892,13 +2954,13 @@
return derived();
}
- template <class Derived>
+ template <class Derived>
std::string axis_plot_frame<Derived>::y_label()
{
return derived().y_label_info_.text();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::y_label_units(const std::string& str)
{
derived().y_units_info_.text(str);
@@ -2906,59 +2968,59 @@
return derived();
}
- template <class Derived>
+ template <class Derived>
std::string axis_plot_frame<Derived>::y_label_units()
{
return derived().y_units_info_.text();
}
-
- template <class Derived>
+
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_values_on(bool b)
{ // Show values near data points.
derived().x_values_on_ = b;
return derived();
}
- template <class Derived>
+ template <class Derived>
bool axis_plot_frame<Derived>::x_values_on()
{ // Label data points with X values.
return derived().x_values_on_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_values_font_size(unsigned int i)
{
derived().x_values_style_.values_text_style_.font_size(i);
return derived();
}
- template <class Derived>
+ template <class Derived>
unsigned int axis_plot_frame<Derived>::x_values_font_size()
{
return derived().x_values_style_.values_text_style_.font_size();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_values_font_family(const std::string& family)
{
derived().x_values_style_.values_text_style_.font_family(family);
return derived();
}
- template <class Derived>
+ template <class Derived>
const std::string& axis_plot_frame<Derived>::x_values_font_family()
{
return derived().x_values_style_.values_text_style_.font_family();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_major_interval(double inter)
{
derived().x_ticks_.major_interval_ = inter;
return derived();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_values_color(const svg_color& col)
{ // Function could set both fill (middle) and stroke (outside),
// but just setting fill if simplest,
@@ -2968,98 +3030,98 @@
return derived();
}
- template <class Derived>
+ template <class Derived>
svg_color axis_plot_frame<Derived>::x_values_color()
{ // Function could get either fill and stroke,
// return derived().image.g(PLOT_X_POINT_VALUES).style().stroke_color();
return derived().image.g(PLOT_X_POINT_VALUES).style().fill_color();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_values_rotation(rotate_style rotate)
{ // Degrees (0 to 360).
derived().x_values_style_.value_label_rotation_ = rotate;
return derived();
}
- template <class Derived>
+ template <class Derived>
int axis_plot_frame<Derived>::x_values_rotation()
{
return derived().x_values_style_.value_label_rotation_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_values_precision(int p)
{ // set iostream precision
derived().x_values_style_.value_precision_ = p;
return derived();
}
- template <class Derived>
+ template <class Derived>
int axis_plot_frame<Derived>::x_values_precision()
{
return derived().x_values_style_.value_precision_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_values_ioflags(std::ios_base::fmtflags f)
{ // set iostream format flags
derived().x_values_style_.value_ioflags_ = f;
return derived();
}
- template <class Derived>
+ template <class Derived>
std::ios_base::fmtflags axis_plot_frame<Derived>::x_values_ioflags()
{
return derived().x_values_style_.value_ioflags_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_plusminus_on(bool b)
{ // set if uncertainty to be append to X values labels.
derived().x_values_style_.plusminus_on_ = b;
return derived();
}
- template <class Derived>
+ template <class Derived>
bool axis_plot_frame<Derived>::x_plusminus_on()
{
return derived().x_values_style_.plusminus_on_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_df_on(bool b)
{ // set if uncertainty to be append to X values labels.
derived().x_values_style_.df_on_ = b;
return derived();
}
- template <class Derived>
+ template <class Derived>
bool axis_plot_frame<Derived>::x_df_on()
{
return derived().x_values_style_.df_on_;
}
-
- template <class Derived>
+
+ template <class Derived>
double axis_plot_frame<Derived>::x_major_interval()
{
return derived().x_ticks_.major_interval_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_major_tick_length(double length)
{
derived().x_ticks_.major_tick_length_ = length;
return derived();
}
- template <class Derived>
+ template <class Derived>
double axis_plot_frame<Derived>::x_major_tick_length()
{
return derived().x_ticks_.major_tick_length_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_major_tick_width(double width)
{
derived().x_ticks_.major_tick_width_ = width; // Redundant?
@@ -3067,26 +3129,26 @@
return derived();
}
- template <class Derived>
+ template <class Derived>
double axis_plot_frame<Derived>::x_major_tick_width()
{
return derived().image.g(PLOT_X_MAJOR_TICKS).style().stroke_width();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_minor_tick_length(double length)
{
derived().x_ticks_.minor_tick_length_ = length;
return derived();
}
- template <class Derived>
+ template <class Derived>
double axis_plot_frame<Derived>::x_minor_tick_length()
{
return derived().x_ticks_.minor_tick_length_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_minor_tick_width(double width)
{
derived().x_ticks_.minor_tick_width_ = width;
@@ -3095,46 +3157,46 @@
}
- template <class Derived>
+ template <class Derived>
double axis_plot_frame<Derived>::x_minor_tick_width()
{
// return derived().x_minor_tick_width_; // should be the same but store in stroke_width is definitive.
return derived().image.g(PLOT_X_MINOR_TICKS).style().stroke_width();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_major_tick(double d)
{ // Interval (Cartesian units) between major ticks.
derived().x_ticks_.major_interval_ = d;
}
- template <class Derived>
+ template <class Derived>
double axis_plot_frame<Derived>::x_major_tick()
{ // Interval (Cartesian units) between major ticks.
return derived().x_ticks_.major_interval_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_minor_interval(double interval)
{ // aka x_minor_tick
derived().x_ticks_.minor_interval_ = interval;
return derived();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_num_minor_ticks(unsigned int num)
{
derived().x_ticks_.num_minor_ticks_ = num;
return derived();
}
- template <class Derived>
+ template <class Derived>
unsigned int axis_plot_frame<Derived>::x_num_minor_ticks()
{ // NB NOT float or double!
return derived().x_ticks_.num_minor_ticks_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_range(double min_x, double max_x)
{
if (!boost::math::isfinite(min_x))
@@ -3164,7 +3226,7 @@
return derived();
}
- template <class Derived>
+ template <class Derived>
std::pair<double, double> axis_plot_frame<Derived>::x_range()
{ // Need to use boost::svg::detail::operator<< to display this.
std::pair<double, double> r;
@@ -3173,7 +3235,7 @@
return r;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_min(double min_x)
{
// Not useful to check here that x_max_ > x_min_ because may not have set x_min_ yet.
@@ -3181,13 +3243,13 @@
return derived();
}
- template <class Derived>
+ template <class Derived>
double axis_plot_frame<Derived>::x_min()
{
return derived().x_axis_.min_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_max(double x)
{
// Not useful to check here that x_max_ > x_min_ because may not have set x_min_ yet.
@@ -3195,32 +3257,32 @@
return derived();
}
- template <class Derived>
+ template <class Derived>
double axis_plot_frame<Derived>::x_max()
{
return derived().x_axis_.max_;
}
- template <class Derived>
+ template <class Derived>
bool axis_plot_frame<Derived>::autoscale_check_limits()
{
return derived().autoscale_check_limits_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::autoscale_check_limits(bool b)
{ // Default is true, but can switch off checks for speed.
derived().autoscale_check_limits_ = b;
return derived();
}
- template <class Derived>
+ template <class Derived>
bool axis_plot_frame<Derived>::x_autoscale()
{ // Get autoscale setting.
return derived().x_autoscale_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_autoscale(bool b)
{ // set whether to use autoscaled values.
if (b && derived().x_auto_tick_interval_ < 0)
@@ -3231,13 +3293,13 @@
return derived();
}
- template <class Derived>
+ template <class Derived>
bool axis_plot_frame<Derived>::autoscale()
{ // AKA x_autoscale.
return derived().x_autoscale_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::autoscale(bool b)
{ // AKA x_autoscale - set whether to use X autoscaled values.
// Used by boxplot too.
@@ -3249,7 +3311,7 @@
return derived();
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_autoscale(std::pair<double, double> p)
{ // Use X min & max pair values to autoscale.
scale_axis(p.first, p.second, // double min and max from pair.
@@ -3279,7 +3341,7 @@
- //
+ //
//template <class Derived, class T> // T an STL container: array, vector ...
//Derived& axis_plot_frame<Derived>::x_autoscale(const T& begin, const T& end)
//{ // Data series using iterators to calculate autoscaled values.
@@ -3305,7 +3367,7 @@
// return derived();
//} // x_autoscale(const T& container)
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_with_zero(bool b)
{ // Set autoscale to include zero (default = false).
// Must preceed x_autoscale(data) call.
@@ -3313,13 +3375,13 @@
return derived();
}
- template <class Derived>
+ template <class Derived>
bool axis_plot_frame<Derived>::x_with_zero()
{ //
return derived().x_include_zero_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_min_ticks(int min_ticks)
{ // Set autoscale to include at least min_ticks (default = 6).
// Must preceed x_autoscale(data) call.
@@ -3327,13 +3389,13 @@
return derived();
}
- template <class Derived>
+ template <class Derived>
int axis_plot_frame<Derived>::x_min_ticks()
{ //
return derived().x_min_ticks_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_steps(int steps)
{ // Set autoscale to set ticks in steps 2,4,6,8,10, or 1,5,10 or 2,5,10.
// default = 0 (none)
@@ -3342,13 +3404,13 @@
return derived();
}
- template <class Derived>
+ template <class Derived>
int axis_plot_frame<Derived>::x_steps()
{ //
return derived().x_steps_;
}
- template <class Derived>
+ template <class Derived>
Derived& axis_plot_frame<Derived>::x_tight(double tight)
{ // Set autoscale to include permit data points slightly outside both end ticks.
// default 0.
@@ -3357,32 +3419,32 @@
return derived();
}
- template <class Derived>
+ template <class Derived>
double axis_plot_frame<Derived>::x_tight()
{ //
return derived().x_tight_;
}
- template <class Derived>
+ template <class Derived>
double axis_plot_frame<Derived>::x_auto_min_value()
{
return derived().x_auto_min_value_;
}
- template <class Derived>
+ template <class Derived>
double axis_plot_frame<Derived>::x_auto_max_value()
{
return derived().x_auto_max_value_;
}
- template <class Derived>
+ template <class Derived>
double axis_plot_frame<Derived>::x_auto_tick_interval()
{
return derived().x_auto_tick_interval_;
}
-
- template <class Derived>
+
+ template <class Derived>
int axis_plot_frame<Derived>::x_auto_ticks()
{
return derived().x_auto_ticks_;
Modified: sandbox/SOC/2007/visualization/boost/svg_plot/detail/functors.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/detail/functors.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/detail/functors.hpp 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,4 +1,11 @@
-// functors.hpp
+/*! \file functors.hpp
+
+ \author Jacob Voytko
+
+ \brief Functors to convert data to doubles.
+ \details SVG plot assumes all data are convertible to double before being plotted.
+ The functors are used to convert both 1D and 2D (pairs of data values) to be converted.
+*/
// Copyright Jacob Voytko 2007
@@ -6,7 +13,6 @@
// Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
-// -----------------------------------------------------------------
#ifndef BOOST_SVG_DETAIL_FUNCTORS_HPP
#define BOOST_SVG_DETAIL_FUNCTORS_HPP
@@ -15,11 +21,8 @@
namespace svg {
namespace detail {
-// -----------------------------------------------------------------
-// This functor allows any data convertible to doubles to be plotted.
-// -----------------------------------------------------------------
class boost_default_convert
-{
+{ //! This functor allows any data convertible to doubles to be plotted.
public:
typedef double result_type;
@@ -31,11 +34,9 @@
}; // class boost_default_convert
// -----------------------------------------------------------------
-// This functor allows any data convertible to type
-// std::pair<double, double> to be plot
// -----------------------------------------------------------------
class boost_default_2d_convert
-{
+{ //! This functor allows any data convertible to type std::pair<double, double> to be plotted.
public:
typedef std::pair<double, double> result_type;
double i;
Modified: sandbox/SOC/2007/visualization/boost/svg_plot/detail/numeric_limits_handling.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/detail/numeric_limits_handling.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/detail/numeric_limits_handling.hpp 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,4 +1,12 @@
-// numeric_limits_handling.hpp
+/*! \file numeric_limits_handling.hpp
+ \brief Functions to check if data values are NaN or infinity or denormalised.
+ \details
+ Since only double is used, template versions are not needed,
+ and TR1 should provide max, min, denorm_min, infinity and isnan,
+ but older compilers and libraries may not provide all these.
+
+ \author Jacob Voytko and Paul A. Bristow
+*/
// Copyright Jacob Voytko 2007
// Copyright Paul A. Bristow 2007
@@ -7,7 +15,6 @@
// Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
-// -----------------------------------------------------------------
#ifndef BOOST_SVG_NUMERIC_LIMITS_HANDLING_DETAIL_HPP
#define BOOST_SVG_NUMERIC_LIMITS_HANDLING_DETAIL_HPP
@@ -15,9 +22,6 @@
#include <boost/math/special_functions/fpclassify.hpp>
// TODO use the boost version instead to be more portable?
-// Since only double is used, template versions are not needed,
-// and TR1 should provide max, min, denorm_min, infinity and isnan,
-// but older comilers and libraries may not provide all these.
// using boost::math::fpclassify
// boost::math::
@@ -29,7 +33,6 @@
// using std::numeric_limits;
#include <cmath> // Why?
-
// Allows NaNs to be displayed differently from just too big or too small values.
namespace boost
@@ -44,13 +47,13 @@
// Not clear why min or denorm min are not just ignored as almost zero (which is an OK value).
inline bool limit_max(double a)
-{ // At max value or _infinity.
+{ //! At max value or _infinity.
return (a ==(std::numeric_limits<int>::max)() // Avoid macro max trap!
|| a == std::numeric_limits<double>::infinity());
}
inline bool limit_min(double a)
-{// At min value, denorm_min or -infinity.
+{ //! At min value, denorm_min or -infinity.
return (
(a == -(std::numeric_limits<int>::max)()) // Avoid macro min trap!
@@ -62,7 +65,7 @@
}
inline bool limit_NaN(double a)
-{ // Separate test for NaNs.
+{ //! Separate test for NaNs.
#if defined (BOOST_MSVC)
return _isnan(a) ? true : false;
// Ternary operator used to remove warning of casting int to bool.
@@ -72,12 +75,12 @@
}
inline bool is_limit(double a)
-{ // Is at some limit -
+{ //! Is at some limit.
return limit_max(a) || limit_min(a) || limit_NaN(a);
}
inline bool pair_is_limit(std::pair<double, double> a)
-{ // Check on both x and y data points. Return false if either or both are at limit.
+{ //! Check on both x and y data points. Return false if either or both are at limit.
return limit_max(a.first) || limit_min(a.first) || limit_NaN(a.first)
|| limit_max(a.second) || limit_min(a.second) || limit_NaN(a.second);
}
Modified: sandbox/SOC/2007/visualization/boost/svg_plot/detail/pair.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/detail/pair.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/detail/pair.hpp 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,4 +1,10 @@
-// pair.hpp
+/*! \file pair.hpp
+ \brief Provides a private implementation of operator<< for std::pair that
+ outputs pairs with a comma separated format, for example: 1.2, 3.4
+ \details Hidden in namespace detail to avoid clashes with other implementations of std::pair operator<<.
+
+ \author Paul A. Bristow
+ */
// Copyright Paul A. Bristow 2006 - 2008.
@@ -19,7 +25,7 @@
{
namespace detail
{
- // Hidden in namespace detail to avoid clashes with other implementations of std::pair operator<<.
+ // Hidden in namespace detail to avoid clashes with other implementations of std::pair operator<<.
//std::ostream& operator<< (std::ostream&, const std::pair<double, double>&);
//template<class T1, class T2> std::ostream& operator<< (std::ostream&, std::pair<T1, T1>&);
Modified: sandbox/SOC/2007/visualization/boost/svg_plot/detail/svg_boxplot_detail.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/detail/svg_boxplot_detail.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/detail/svg_boxplot_detail.hpp 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,4 +1,14 @@
-// svg_boxplot_detail.hpp
+/*! \file svg_boxplot_detail.hpp
+ \author Jacob Voytko and Paul A. Bristow
+
+ \brief Boost.Plot SVG Box plot Implemention details.
+ \details See svg_boxplot.hpp for user functions.
+ See also svg_style_detail.hpp for enum plot_doc_structure.
+ Caution: these two enum and ids must match because
+ the enum value is used to index the array of id strings.
+ void set_ids() copies all strings to matching image.get_g_element(i).id()
+ So add any new id items to both!
+ */
// Copyright Jacob Voytko 2007
// Copyright Paul A. Bristow 2008
@@ -11,36 +21,38 @@
#ifndef BOOST_SVG_BOXPLOT_DETAIL_HPP
#define BOOST_SVG_BOXPLOT_DETAIL_HPP
-// See also svg_style_detail.hpp for enum plot_doc_structure.
-// Caution: these two enum and ids must match because
-// the enum value is used to index the array of id strings.
-// void set_ids() copies all strings to matching image.get_g_element(i).id()
-// Add any new id items to both!
-
-namespace boost{
-namespace svg{
+namespace boost {
+namespace svg {
namespace boxplot
{
enum boxplot_doc_structure
- {
- PLOT_BACKGROUND, // the whole svg image.
- PLOT_WINDOW_BACKGROUND, // the smaller plot window (if used).
- X_AXIS, Y_AXIS,
- X_TICKS,
- Y_MAJOR_TICKS, Y_MINOR_TICKS,
- Y_MAJOR_GRID, Y_MINOR_GRID,
- VALUE_LABELS,
- Y_LABEL, X_LABEL,
- BOX_AXIS, BOX,
- MEDIAN, WHISKER, MILD_OUTLIERS, EXTREME_OUTLIERS,
- DATA_VALUE_LABELS, //
- PLOT_TITLE,
- PLOT_NOTES, // Free text and shapes to annotate diagram.
+ { //! \enum boxplot_doc_structure groups that form the boxplot svg document structure. Order controls the painting order, later ones overwriting earlier layers.
+ PLOT_BACKGROUND = 0, //!< the whole svg image. (Must be zero to index array document_ids[])
+ PLOT_WINDOW_BACKGROUND, //!< the smaller plot window (if used).
+ X_AXIS, //!< X axis group element.
+ Y_AXIS, //!< Y axis group element.
+ X_TICKS, //!< X ticks group element.
+ Y_MAJOR_TICKS, //!< Y majro ticks group element.
+ Y_MINOR_TICKS, //!< Y minor ticks group element.
+ Y_MAJOR_GRID, //!< Y major grid group element.
+ Y_MINOR_GRID, //!< Y minor grid group element.
+ VALUE_LABELS, //!< axis values labels group element.
+ Y_LABEL, //!< Y labels group element.
+ X_LABEL, //!< X labels group element.
+ BOX_AXIS, //!< Box axis group element.
+ BOX, //!< box group element.
+ MEDIAN, //!< median group element.
+ WHISKER, //!< whisker group element.
+ MILD_OUTLIERS, //!< mild outliers group element.
+ EXTREME_OUTLIERS, //!< extreme outliers group element.
+ DATA_VALUE_LABELS, //!< Data values labels group element.
+ PLOT_TITLE, //!< Whole plot title text group element.
+ PLOT_NOTES, //!< Free text and shapes to annotate diagram.
BOXPLOT_DOC_CHILDREN
};
std::string document_ids[] = // TODO change to document_ids_ because private member data.
- { //
+ { //! String descriptors used in SVG XML (matching enum boxplot_doc_structure).
"imageBackground", // the whole svg image.
"plotBackground", // the smaller plot window (if used).
"X-axis", "Y-axis",
Modified: sandbox/SOC/2007/visualization/boost/svg_plot/detail/svg_style_detail.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/detail/svg_style_detail.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/detail/svg_style_detail.hpp 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,15 +1,17 @@
-// svg_style.hpp
+/*! \file svg_style.hpp
+ \brief Plot document structure whose order controls the painting order, later ones overwriting earlier layers.
+
+ \author Jacob Voytko and Paul A. Bristow
+*/
// Copyright Jacob Voytko 2007
-// Copyright Paul A. Bristow 2008
+// Copyright Paul A. Bristow 2008
// Use, modification and distribution are subject to 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)
-// -----------------------------------------------------------------
-
#ifndef BOOST_SVG_SVG_STYLE_DETAIL_HPP
#define BOOST_SVG_SVG_STYLE_DETAIL_HPP
@@ -26,46 +28,59 @@
{
namespace detail
{
-
// Caution: these two enum and ids must match because
// the enum value is used to index the array of id strings.
// void set_ids() copies all strings to matching image.get_g_element(i).id()
// Add any new id items to both!
+
enum plot_doc_structure
-{ // Order control the painting order, later ones overwriting earlier layers.
- PLOT_BACKGROUND = 0, // Must be zero to index array document_ids[]
- PLOT_WINDOW_BACKGROUND, // the smaller plot window (if used).
- PLOT_Y_MINOR_GRID, PLOT_Y_MAJOR_GRID, // 2, 3
- PLOT_X_MINOR_GRID, PLOT_X_MAJOR_GRID,
- PLOT_Y_AXIS, PLOT_X_AXIS, // the X and Y axis lines.
- PLOT_Y_MINOR_TICKS, PLOT_X_MINOR_TICKS,
- PLOT_Y_MAJOR_TICKS, PLOT_X_MAJOR_TICKS,
- PLOT_VALUE_LABELS, // tick values 10, 20, 30 ...
- PLOT_Y_LABEL, PLOT_X_LABEL, // axis text labels "length (cm)"
- PLOT_DATA_LINES, // lines joing data points.
- PLOT_DATA_POINTS, // normal data point markers.
- PLOT_LIMIT_POINTS, // at limit or NaN data point markers.
- PLOT_LEGEND_BACKGROUND, // legend box.
- PLOT_LEGEND_POINTS, // data series point markers, circle, cross...
- PLOT_LEGEND_TEXT, // text describing each data series.
- PLOT_TITLE, // of the whole plot.
- PLOT_X_POINT_VALUES, PLOT_Y_POINT_VALUES, // Data point value labels.
- PLOT_FUNCTIONS, // Lines and curves, often to show a fit to the data.
- PLOT_NOTES, // Free text and shapes to annotate diagram.
- SVG_PLOT_DOC_CHILDREN // Last enum value used as count of children (22).
+{ //! \enum plot_doc_structure Plot document structure whose order controls the painting order, later ones overwriting earlier layers.
+ PLOT_BACKGROUND = 0, //! Must be zero to index array document_ids[]
+ PLOT_WINDOW_BACKGROUND, //! the smaller plot window (if used).
+ PLOT_Y_MINOR_GRID, //! Y minor grid.
+ PLOT_Y_MAJOR_GRID, //! Y major grid.
+ PLOT_X_MINOR_GRID, //! X minor grid.
+ PLOT_X_MAJOR_GRID, //! X major grid.
+ PLOT_Y_AXIS, //! X axis line.
+ PLOT_X_AXIS, //! Y axis line.
+ PLOT_Y_MINOR_TICKS, //! Y minor ticks.
+ PLOT_X_MINOR_TICKS, //! X minor ticks
+ PLOT_Y_MAJOR_TICKS, //! Y major ticks.
+ PLOT_X_MAJOR_TICKS, //! X major ticks.
+ PLOT_VALUE_LABELS, //! tick values labels, for example 10, 20, 30 ...
+ PLOT_Y_LABEL, //! Y axis text labels "length (cm)".
+ PLOT_X_LABEL, //! X axis text labels "height (m)".
+ PLOT_DATA_LINES, //! Lines joining data points.
+ PLOT_DATA_POINTS, //! Normal data point markers.
+ PLOT_LIMIT_POINTS, //! 'At limit or NaN' data point markers.
+ PLOT_LEGEND_BACKGROUND, //! Legend box.
+ PLOT_LEGEND_POINTS, //! Legend data series point markers, circle, cross...
+ PLOT_LEGEND_TEXT, //! Legend text describing each data series.
+ PLOT_TITLE, //! Title of the whole plot.
+ PLOT_X_POINT_VALUES, //! X Data point value labels.
+ PLOT_Y_POINT_VALUES, //! Y Data point value labels.
+ PLOT_FUNCTIONS, //! Lines and curves, often to show a fit to the data.
+ PLOT_NOTES, //! Free text and shapes to annotate a plot.
+ SVG_PLOT_DOC_CHILDREN //! Last enum value used as count of children (22).
};
std::string document_ids[]= // TODO change to document_ids_ because private member data.
-{ //
+{ // Care: must match enum plot_doc_structure.
"imageBackground", // the whole svg image.
- "plotBackground", // // the smaller plot window (if used).
- "yMinorGrid", "yMajorGrid",
- "xMinorGrid", "xMajorGrid",
- "yAxis", "xAxis", // the X and Y axis lines.
- "yMinorTicks", "xMinorTicks",
- "yMajorTicks", "xMajorTicks",
+ "plotBackground", // the smaller plot window (if used).
+ "yMinorGrid",
+ "yMajorGrid",
+ "xMinorGrid",
+ "xMajorGrid",
+ "yAxis",
+ "xAxis", // the X and Y axis lines.
+ "yMinorTicks",
+ "xMinorTicks",
+ "yMajorTicks",
+ "xMajorTicks",
"plotLabels", // TODO tickValueLabels better name???
- "yLabel", "xLabel", // axis text labels "length (cm)"
+ "yLabel",
+ "xLabel", // axis text labels "length (cm)"
"plotLines", // normal data point markers.
"plotPoints", // normal data point markers.
"limitPoints", // at limit or NaN data point markers
@@ -78,7 +93,7 @@
"plotNotes", // Free text and shapes to annotate diagram.
"plotDocChildren" // This last string is not used.
}; // std::string document_ids
-
+
} // namespace detail
} // namespace svg
} // namespace boost
Modified: sandbox/SOC/2007/visualization/boost/svg_plot/detail/svg_tag.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/detail/svg_tag.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/detail/svg_tag.hpp 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,4 +1,11 @@
-// svg_tag.hpp
+/* \file svg_tag.hpp
+
+ \author Jacob Voytko and Paul A. Bristow
+
+ \brief Boost.Plot SVG plot Implemention details.
+ \details See svg.hpp etc for user functions.
+ svg_tag.hpp defines all classes that can occur in the SVG parse tree.
+*/
// Copyright Jacob Voytko 2007, 2008
// Copyright Paul A Bristow 2007, 2008
@@ -7,15 +14,10 @@
// Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
-// -----------------------------------------------------------------
#ifndef BOOST_SVG_TAG_HPP
#define BOOST_SVG_TAG_HPP
-// -----------------------------------------------------------------------------
-// File svg_tag.hpp defines all classes that can occur in the SVG parse tree.
-// -----------------------------------------------------------------------------
-
#include <boost/ptr_container/ptr_container.hpp>
// using boost::vec_ptr;
#include <boost/array.hpp>
@@ -43,7 +45,7 @@
// rect_element, circle_element, line_element, text_element,
// polyline_element, polygon_element, path_element, clip_path_element,
class text_parent; // Ancestor to both tspan and strings for the text_element class.
- class text_element_text;
+ class text_element_text;
class tspan_element; // Within a text_element, adjust text and font properties.
class text_element; // text with position, size, font, (& styles) & orientation.
class rect_element; // clipping path restricts the region to which paint can be applied.
@@ -71,27 +73,27 @@
// for grouping together related graphics elements, for example:
// <g stroke="rgb(255,0,0)" <rect x="0" y="0" width="500" height="600"/> </g>
- // --------------------------------------------------------------------------
- // svg_element is base class for all the leaf elements:
- // rect_element, circle_element, line_element, text_element,
- // polygon_element, polyline_element, path_element, clip_path_element,
- // g_element
- //
- // g_element ('g' element is a container element
- // for grouping together related graphics elements).
- // http://www.w3.org/TR/SVG/struct.html#NewDocument 5.2.1 Overview
- // --------------------------------------------------------------------------
-
class svg_element
- { // Base class.
+ { //! \class svg_element Base class for all the leaf elements.
+ /*! \details
+ svg_element is base class for all the leaf elements:\n
+ rect_element, circle_element, line_element, text_element,
+ polygon_element, polyline_element, path_element, clip_path_element,
+ g_element.\n
+
+ g_element ('g' element is a container element
+ for grouping together related graphics elements).\n
+ See http://www.w3.org/TR/SVG/struct.html#NewDocument 5.2.1 Overview.
+ */
+
protected:
- svg_style style_info_; // Colors fill, stroke, width, get by function style.
- std::string id_name_; // set & get by function id.
- std::string class_name_; // set & get by class id.
- std::string clip_name_; // set & get by function clip_id.
+ svg_style style_info_; //! Colors fill, stroke, width, get by function style.
+ std::string id_name_; //! SVG id name, set & get by function id.
+ std::string class_name_; //! SVG class name, set & get by function class id.
+ std::string clip_name_; //! SVG clip path name, set & get by function clip_id.
void write_attributes(std::ostream& s_out)
- { // group_element id and clip-path.
+ { //! Output group_element id and clip-path.
if(id_name_.size() != 0)
{ // Example: id="imageBackground"
s_out << " id=\"" << id_name_ << "\""; // Prefix with space.
@@ -101,18 +103,20 @@
s_out << " class=\"" << class_name_ << "\"";
}
if(clip_name_.size() != 0)
- { // Example: clip-path="url(#plot_window)"
+ { // Example: clip-path="url(#plot_window)"
s_out << " clip-path=\"url(#" << clip_name_ << ")\""; // Prefix with space.
}
- // Inherited classes add other references, 5.3.1, like color, fill, stroke, gradients...
- // Example id: <g id="yMinorGrid" ></g>
- // Example class: <g class="grid_style"></g>
- // Example URI: fill="url(#Gradient01) // local URL
+ /*! \details
+ Classes inherited from svg_element add other references, 5.3.1, like color, fill, stroke, gradients...
+ Example id: <g id="yMinorGrid" ></g>
+ Example class: <g class="grid_style"></g>
+ Example URI: fill="url(#Gradient01) // local URL
+ */
} // void write_attributes(std::ostream& s_out)
public:
- svg_element(const svg_style& style_info,
+ svg_element(const svg_style& style_info,
const std::string& id_name = "",
const std::string& class_name = "",
const std::string& clip_name = "")
@@ -134,65 +138,74 @@
}
bool operator==(const svg_element& lhs)
- { // might be useful for Boost.Test.
+ { //! Compare svg_elements, useful for Boost.Test.
return lhs.id_name_ == id_name_;
}
+ bool operator!=(const svg_element& lhs)
+ { //! Compare svg_elements for inequality, useful for Boost.Test.
+ return lhs.id_name_ != id_name_;
+ }
+
// Set and get member functions.
svg_style& style()
- { // Indirect access to colors & width via style().stroke_color(), fill_color(), width()
+ { //! Get reference to svg_style to provide indirect access to colors & width via style().stroke_color(), fill_color(), width()
return style_info_;
}
const svg_style& style() const
- { // const version.
+ { //! Get reference to const svg_style to provide indirect access to colors & width via style().stroke_color(), fill_color(), width() (const version).
return style_info_;
}
void id(const std::string& id)
- { // Unique name for an element.
- // http://www.w3.org/TR/SVG/struct.html#IDAttribute
- // 5.10.1 Attributes common to all elements: id and xml:base
- // The id and xml:base attributes are available on all SVG elements:
- // Attribute definitions:
- // id = "name"
- // Standard XML attribute for assigning a unique name to an element.
- // Refer to the "Extensible Markup Language (XML) 1.0" Recommendation [XML10].
- // xml:base = "<uri>"
- // Specifies a base URI other than the base URI of the document or external entity.
- // Refer to the "XML Base" specification [XML-BASE].
- // A group of elements, as well as individual objects,
- // can be given a name using the id attribute.
- // Named groups are needed for several purposes such as animation and re-usable objects.
+ { //! Provide a unique name for an element.
+ /*! \details
+ See http://www.w3.org/TR/SVG/struct.html#IDAttribute
+ 5.10.1 Attributes common to all elements: id and xml:base
+ The id and xml:base attributes are available on all SVG elements:
+ Attribute definitions:
+ id = "name"
+ Standard XML attribute for assigning a unique name to an element.
+ Refer to the "Extensible Markup Language (XML) 1.0" Recommendation [XML10].
+ xml:base = "<uri>"
+ Specifies a base URI other than the base URI of the document or external entity.
+ Refer to the "XML Base" specification [XML-BASE].
+ A group of elements, as well as individual objects,
+ can be given a name using the id attribute.
+ Named groups are needed for several purposes such as animation and re-usable objects.
+ Example: id="plotBackground"
+ */
id_name_ = id;
- // Example: id="plotBackground"
- }
+ }
std::string id()
- { // Unique name for an element.
+ { //! Get the unique name for an element, for example id() ="plotBackground".
return id_name_;
}
void class_id(const std::string& class_id)
- { // Non-unique identifier for an element.
- // http://www.w3.org/TR/2001/REC-SVG-20010904/styling.html#ClassAttribute
- // 6.12 Attributes common to all elements: id and xml:base
- // Example: class="info"
+ { //! Class class id, non-unique identifier for an element.
+ /*! \details
+ http://www.w3.org/TR/2001/REC-SVG-20010904/styling.html#ClassAttribute
+ 6.12 Attributes common to all elements: id and xml:base
+ Example: class="info"
+ */
class_name_ = class_id;
}
std::string class_id()
- { // Unique name for an element.
+ { //! Class id, non-unique identifier for an element.
return class_name_;
}
void clip_id(const std::string& id)
- { // Named clip, for example: g_ptr.clip_id(plot_window_clip_);
+ { //! Set name of a clip path, for example: g_ptr.clip_id(plot_window_clip_);
clip_name_ = id;
}
std::string clip_id()
- {
+ { //! Get name of a clip path, for example: g_ptr.clip_id(plot_window_clip_);
return clip_name_;
}
}; // class svg_element
@@ -205,12 +218,12 @@
// Represents a line
// -----------------------------------------------------------------
class line_element: public svg_element
- {
+ { //! Line from (x1_, x2_) to (y1_, y2_)
private:
- double x1_; // Line from (x1_, x2_) to (y1_, y2_)
- double x2_;
- double y1_;
- double y2_;
+ double x1_; //! Line from (x1_, x2_) to (y1_, y2_)
+ double x2_; //! Line from (x1_, x2_) to (y1_, y2_)
+ double y1_; //! Line from (x1_, x2_) to (y1_, y2_)
+ double y2_; //! Line from (x1_, x2_) to (y1_, y2_)
public:
line_element(double x1, double y1, double x2, double y2)
@@ -219,21 +232,21 @@
}
line_element(double x1, double y1,
- double x2, double y2,
- const svg_style& style_info,
- const std::string& id_name="",
+ double x2, double y2,
+ const svg_style& style_info,
+ const std::string& id_name="",
const std::string& class_name="",
- const std::string& clip_name = "")
+ const std::string& clip_name = "")
: x1_(x1), y1_(y1), x2_(x2), y2_(y2),
svg_element(style_info, id_name, class_name, clip_name)
{
}
void write(std::ostream& rhs)
- {
+ { //! output line from (x1_, x2_) to (y1_, y2_)
+ //! \details Example: <line x1="5" y1="185" x2="340" y2="185"/>
rhs << "<line x1=\"" << x1_ << "\" y1=\"" << y1_
<< "\" x2=\"" << x2_ << "\" y2=\"" << y2_ << "\"/>";
- // Example: <line x1="5" y1="185" x2="340" y2="185"/>
}
}; // class line_element
@@ -271,7 +284,7 @@
svg_element(style_info, id_name, class_name, clip_name)
{ // Constructor defines all private data (no defaults).
}
-
+
double x() const
{
return x_;
@@ -327,7 +340,7 @@
{ //
os << "rect(" << r.x() << ", " << r.y()
<< ", " << r.width() << ", " << r.height() << ")" ;
- // Usage: rect_element r(20, 20, 50, 50); cout << r << endl;
+ // Usage: rect_element r(20, 20, 50, 50); cout << r << endl;
// Outputs: rect(20, 20, 50, 50)
return os;
} // std::ostream& operator<<
@@ -390,7 +403,7 @@
const std::string& id_name="",
const std::string& class_name="",
const std::string& clip_name="")
- : cx(cx), cy(cy), rx(rx), ry(ry),
+ : cx(cx), cy(cy), rx(rx), ry(ry),
svg_element(style_info, id_name, class_name, clip_name)
{ // Define all private data.
}
@@ -420,7 +433,9 @@
// ----------------------------------------------------------------------
enum align_style
{
- left_align, right_align, center_align
+ left_align, //!< Align text to left.
+ right_align, //!< Align text to right.
+ center_align //!< Center text.
};
class text_parent
@@ -432,12 +447,12 @@
public:
virtual void write(std::ostream& /* o_str */)
{
- }
+ }
text_parent(const std::string& text): text_(text)
{
}
- text_parent(const text_parent& rhs): text_(rhs.text_)
+ text_parent(const text_parent& rhs): text_(rhs.text_)
{
}
}; // class text_parent
@@ -458,7 +473,7 @@
}; // class text_element_text
class tspan_element : public text_parent, public svg_element
-{ // See 10.5 tspan element http://www.w3.org/TR/SVG/text.html#TSpanElement
+{ // See 10.5 tspan element http://www.w3.org/TR/SVG/text.html#TSpanElement
private:
double x_; // Absolute positions.
double y_;
@@ -466,7 +481,7 @@
double dy_;
int rotate_; // of a 1st single character of text.
// A list of shifts or rotations for several characters is not yet implemented.
-
+
double text_length_; // Allows the author to provide exact alignment.
// dx_, dy_, and rotate_ can all be omitted, usually meaning no shift or rotation,
@@ -490,7 +505,7 @@
tspan_element(const tspan_element& rhs);
// TODO all may need refactoring to separate declaration from definition - as example below.
-
+
//tspan_element(const tspan_element& rhs)
// :
// x_(rhs.x_), y_(rhs.y_), dx_(rhs.dx_), dy_(rhs.dy_), rotate_(rhs.rotate_),
@@ -505,34 +520,34 @@
//tspan_element(const tspan_element&);
//tspan_element& text(const std::string& text);
//tspan_element& dx(double dx);
- //tspan_element& dy(double dy);
- //tspan_element& rotation(int rotation);
+ //tspan_element& dy(double dy);
+ //tspan_element& rotation(int rotation);
//tspan_element& x(double x);
//tspan_element& y(double y);
//tspan_element& text_length(double text_length);
- tspan_element& text(const std::string& text)
- {
- text_=text;
+ tspan_element& text(const std::string& text)
+ {
+ text_=text;
return *this;
}
- tspan_element& dx(double dx)
- {
- dx_ = dx;
+ tspan_element& dx(double dx)
+ {
+ dx_ = dx;
return *this;
}
- tspan_element& dy(double dy)
- {
- dy_ = dy;
+ tspan_element& dy(double dy)
+ {
+ dy_ = dy;
return *this;
}
- tspan_element& rotation(int rotation)
+ tspan_element& rotation(int rotation)
{ // Note implementation so far only rotates the 1st character in string.
// text_element rotation rotates the whole text string, so it *much* more useful.
- rotate_ = rotation;
+ rotate_ = rotation;
return *this;
}
@@ -582,7 +597,7 @@
tspan_element& font_weight(const std::string& w)
{ // svg font-weight: normal | bold | bolder | lighter | 100 | 200 .. 900
- // Examples: "bold", "normal"
+ // Examples: "bold", "normal"
// http://www.croczilla.com/~alex/conformance_suite/svg/text-fonts-02-t.svg
// tests conformance. Only two weights are supported by Firefox, Opera, Inkscape
style_.font_weight(w);
@@ -619,7 +634,7 @@
double text_length() { return text_length_; }
unsigned int font_size()
- {
+ {
return style_.font_size();
}
@@ -661,7 +676,7 @@
style_info_.write(os); // fill, stroke, width...
// All of the conditional writes within tspan_element.
-
+
// First, all elements that can be tested based on their value.
if(rotate_ != 0)
{
@@ -739,11 +754,11 @@
text_style style_; // font variants.
align_style align_; // left_align, right_align, center_align
rotate_style rotate_; // horizontal, upward, downward, upsidedown
-
+
void _generate_text(std::ostream& os)
{
- for(ptr_vector<text_parent>::iterator i = data_.begin();
- i != data_.end();
+ for(ptr_vector<text_parent>::iterator i = data_.begin();
+ i != data_.end();
++i)
{
(*i).write(os);
@@ -813,7 +828,7 @@
text_element& rotation(rotate_style rot)// TODO Change name to rotate???
{ // Degrees: horizontal = 0, upward = -90, downward, upsidedown
- // Generates: transform = "rotate(-45 100 100 )"
+ // Generates: transform = "rotate(-45 100 100 )"
rotate_ = rot;
return *this;
}
@@ -884,7 +899,7 @@
:
x_(rhs.x_), y_(rhs.y_), style_(rhs.style_), align_(rhs.align_), rotate_(rhs.rotate_)
{ // Copy constructor.
- data_ = (const_cast<text_element&>(rhs)).data_.release();
+ data_ = (const_cast<text_element&>(rhs)).data_.release();
}
text_element& operator=(const text_element& rhs)
@@ -892,9 +907,9 @@
x_ = rhs.x_;
y_ = rhs.y_;
data_.clear(); // Copy data_
- data_.insert(data_.end(), rhs.data_.begin(), rhs.data_.end());
+ data_.insert(data_.end(), rhs.data_.begin(), rhs.data_.end());
style_ = rhs.style_;
- align_ = rhs.align_;
+ align_ = rhs.align_;
rotate_ = rhs.rotate_;
return *this; // ADDed PAB.
}
@@ -978,8 +993,8 @@
std::ostream& operator<< (std::ostream& os, text_element& t)
{ //
t.write(os);
- // Usage: text_element t(20, 30, "sometest", left_align, horizontal); cout << t << endl;
- // Outputs:
+ // Usage: text_element t(20, 30, "sometest", left_align, horizontal); cout << t << endl;
+ // Outputs:
return os;
} // std::ostream& operator<<
@@ -1296,8 +1311,8 @@
path = (const_cast<path_element&>(rhs)).path.release();
}
- path_element(const svg_style& style_info,
- const std::string& id_name="",
+ path_element(const svg_style& style_info,
+ const std::string& id_name="",
const std::string& class_name="",
const std::string& clip_name="")
:
@@ -1305,7 +1320,7 @@
{
}
- path_element()
+ path_element()
{
// fill now got from the parent svg fill color.
}
@@ -1419,7 +1434,7 @@
}
path_element& S(double x1, double y1, double x, double y)
- { //
+ { //
path.push_back(new s_path(x1, y1, x, y, false));
return *this;
}
@@ -1552,7 +1567,7 @@
poly_points.push_back(new poly_path_point(x3, y3));
poly_points.push_back(new poly_path_point(x4, y4));
}
-
+
polygon_element (double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, double x5, double y5, bool f = true)
:
fill(f)
@@ -1589,7 +1604,7 @@
}
}
/*
- template<int n>
+ template<int n>
polygon_element (boost::array<const poly_path_point, n>& points, bool f = true)
:
fill(f)
@@ -1604,7 +1619,7 @@
}
// And non-const poly_path_point version, in case needed.
- template<int n>
+ template<int n>
polygon_element (boost::array<poly_path_point, n>& points, bool f = true)
:
fill(f)
@@ -1646,14 +1661,14 @@
} // void write(std::ostream& o_str)
std::ostream& operator<< (std::ostream& os)
- { // May be needed for Boost.Test.
+ { // May be needed for Boost.Test.
for(ptr_vector<poly_path_point>::iterator i = poly_points.begin(); i != poly_points.end(); ++i)
{
os << (*i); // x, y coordinates as " (1, 2)"
}
// using os << "(" << p.x << ", " << p.y << ")" ;
// Usage: polygon_element p(1, 2, 3, 4, 5, 6);
- // my_polygon.operator<<(cout);
+ // my_polygon.operator<<(cout);
// But NOT cout << my_polygon << endl;
// Outputs: (1, 2)(3, 4)(5, 6)
return os;
@@ -1739,7 +1754,7 @@
for(ptr_vector<poly_path_point>::iterator i = poly_points.begin(); i!= poly_points.end(); ++i)
{
(*i).write(o_str); // x, y coordinates as " 1,2"
- }
+ }
o_str << "\"";
write_attributes(o_str);
style_info_.write(o_str);
@@ -1763,18 +1778,26 @@
return os;
} // std::ostream& operator<<
+ /*! \class g_element
+ \brief g_element (group element) is the node element of our document tree.
+ 'g' element is a container element for grouping together <g /></g>.
+
+
+ \details g_element ('g' element is a container element
+ for grouping together related graphics elements).\n
+ See http://www.w3.org/TR/SVG/struct.html#NewDocument 5.2.1 Overview.
+
+ 'g' element is a container element for grouping together <g /></g>.
+ related graphics elements, for example:
+ <g id="background" fill="rgb(255,255,255)"><rect width="500" height="350"/></g>
+ */
- // -------------------------------------------------------------------
- // g_element (group element) is the node element of our document tree.
- // 'g' element is a container element for grouping together <g /></g>
- // related graphics elements, for example:
- // <g id="background" fill="rgb(255,255,255)"><rect width="500" height="350"/></g>
- // -------------------------------------------------------------------
class g_element: public svg_element
{
private:
- ptr_vector<svg_element> children; // of this group element node,
- // containg graphics elements like text, circle line, polyline...
+ ptr_vector<svg_element> children; /*! Children of this group element node,
+ containg graphics elements like text, circle line, polyline...
+ */
std::string clip_name;
bool clip_on;
public:
@@ -1789,12 +1812,16 @@
}
size_t size()
- {
+ { //! \return Number of child nodes.
return children.size();
}
void write(std::ostream& os)
- {
+ { /*! Output all children of a group element.
+ Example:
+ <g fill="rgb(255,255,255)" id="background"><rect x="0" y="0" width="500" height="350"/></g>
+ */
+
if (children.size() > 0)
{ // Avoid useless output like: <g id="legendBackground"></g>
// TODO check this doesn't mean that useful style is lost?
@@ -1805,12 +1832,10 @@
os << ">" ;
for(unsigned int i = 0; i < children.size(); ++i)
{
- children[i].write(os);
+ children[i].write(os);
}
os << "</g>" << std::endl;
}
- // Example:
- // <g fill="rgb(255,255,255)" id="background"><rect x="0" y="0" width="500" height="350"/></g>
} // void write(std::ostream& rhs)
g_element& g(int i)
@@ -1818,35 +1843,40 @@
return *(static_cast<g_element*>(&children[i]));
}
- // Returns a reference to the new child node just created.
g_element& g()
- { // was add_g_element
+ { //! Add a new group element.
+ //! \return A reference to the new child node just created.
+ // was add_g_element
children.push_back(new g_element());
return *(static_cast<g_element*>(&children[children.size()-1]));
}
line_element& line(double x1, double y1, double x2, double y2)
- {
+ { //! Add a new line element.
+ //! \return A reference to the new child node just created.
children.push_back(new line_element(x1, y1, x2, y2));
- return *(static_cast<line_element*>(&children[children.size()-1]));
+ return *(static_cast<line_element*>(&children[children.size()-1]));
}
rect_element& rect(double x1, double y1, double x2, double y2)
- {
+ { //! Add a new rect element.
+ //! \return A reference to the new child node just created.
children.push_back(new rect_element(x1, y1, x2, y2));
- return *(static_cast<rect_element*>(&children[children.size()-1]));
+ return *(static_cast<rect_element*>(&children[children.size()-1]));
}
circle_element& circle(double x, double y, unsigned int radius = 5)
- {
+ { //! Add a new circle element.
+ //! \return A reference to the new child node just created.
children.push_back(new circle_element(x, y, radius));
- return *(static_cast<circle_element*>(&children[children.size()-1]));
+ return *(static_cast<circle_element*>(&children[children.size()-1]));
}
ellipse_element& ellipse(double rx, double ry, double cx, double cy)
- {
+ { //! Add a new ellipse element.
+ //! \return A reference to the new child node just created.
children.push_back(new ellipse_element(rx, ry, cx, cy));
- return *(static_cast<ellipse_element*>(&children[children.size()-1]));
+ return *(static_cast<ellipse_element*>(&children[children.size()-1]));
}
text_element& text(double x = 0., double y = 0.,
@@ -1854,89 +1884,100 @@
const text_style& style = no_style, // Use svg implementation's defaults.
const align_style& align = left_align,
const rotate_style& rotate = horizontal)
- {
+ { //! Add a new text element.
+ //! \return A reference to the new child node just created.
children.push_back(new text_element(x, y, text, style, align, rotate));
- return *(static_cast<text_element*>(&children[children.size()-1]));
+ return *(static_cast<text_element*>(&children[children.size()-1]));
}
// push_back info about polygon shapes:
+
// Polygon for shapes with many vertices.
polygon_element& polygon(double x, double y, bool f = true)
- {
+ { //! Add a new polygon element.
+ //! \return A reference to the new child node just created.
children.push_back(new polygon_element(x, y, f));
- return *(static_cast<polygon_element*>(&children[children.size()-1]));
+ return *(static_cast<polygon_element*>(&children[children.size()-1]));
}
//JVTODO: Replace with template version
polygon_element& polygon(std::vector<poly_path_point>& v, bool f = true)
- { // push_back a complete many-sided polygon to the document.
+ { //! Add a new complete polygon element.
+ //! \return A reference to the new child node just created.// push_back a complete many-sided polygon to the document.
children.push_back(new polygon_element(v, f));
- return *(static_cast<polygon_element*>(&children[children.size()-1]));
+ return *(static_cast<polygon_element*>(&children[children.size()-1]));
}
-
+
//JVTODO: Replace with template version
polyline_element& polyline(std::vector<poly_path_point>& v)
- { // push_back a complete many-sided polygon to the document.
+ { //! Add a new complete polyline.
+ //! \return A reference to the new child node just created.
children.push_back(new polyline_element(v));
- return *(static_cast<polyline_element*>(&children[children.size()-1]));
+ return *(static_cast<polyline_element*>(&children[children.size()-1]));
}
- polyline_element& polyline(double x, double y) // 1st point only, add others later with .P(x, y).
- {
+ polyline_element& polyline(double x, double y)
+ { //! Add a new polyline element, but 1st point only, add others later with .P(x, y)...
+ //! \return A reference to the new child node just created.
children.push_back(new polyline_element(x, y));
- return *(static_cast<polyline_element*>(&children[children.size()-1]));
- }
-
- void push_back(svg_element* g)
- {
- children.push_back(g);
+ return *(static_cast<polyline_element*>(&children[children.size()-1]));
}
polygon_element& triangle(double x1, double y1, double x2, double y2, double x3, double y3, bool f = true)
- {
+ { //! Add a new triangle element.
+ //! \return A reference to the new child node just created.
children.push_back(new polygon_element(x1, y1, x2, y2, x3, y3, f));
return *(static_cast<polygon_element*>(&(children[(unsigned int)(children.size()-1)])));
}
polygon_element& rhombus(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, bool f = true)
- {
+ { //! Add a new rhombus element.
+ //! \return A reference to the new child node just created.
children.push_back(new polygon_element(x1, y1, x2, y2, x3, y3, x4, y4, f = true));
return *(static_cast<polygon_element*>(&(children[(unsigned int)(children.size()-1)])));
}
polygon_element& pentagon(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, double x5, double y5, bool f = true)
- { // push_back a complete pentagon to the document.
+ { //! Add a new pentagon element.
+ //! \return A reference to the new child node just created. // push_back a complete pentagon to the document.
children.push_back(new polygon_element(x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, f));
return *(static_cast<polygon_element*>(&(children[(unsigned int)(children.size()-1)])));
}
polygon_element& hexagon(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, double x5, double y5, double x6, double y6, bool f = true)
- { // push_back a complete 6-sided star to the document.
+ { //! Add a new hexagon element.
+ //! \return A reference to the new child node just created. // push_back a complete 6-sided star to the document.
children.push_back(new polygon_element(x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, x6, y6, f));
return *(static_cast<polygon_element*>(&(children[(unsigned int)(children.size()-1)])));
}
- // These return a reference to the last child node just pushed.
- // (Unlike the above functions that return a g_element&).
polygon_element& polygon()
- {
+ { //! Add a new polygon element.
+ //! \return A reference to the new child node just created.
children.push_back(new polygon_element()); // Empty polygon,
// to which poly_path_points can be added later using member function P.
return *(static_cast<polygon_element*>(&(children[(unsigned int)(children.size()-1)])));
}
polyline_element& polyline()
- {
+ { //! Add a new polyline element.
+ //! \return A reference to the new child node just created.
children.push_back(new polyline_element()); // Empty polyline.
return *(static_cast<polyline_element*>(&(children[(unsigned int)(children.size()-1)])));
}
path_element& path()
- {
+ { //! Add a new path element.
+ //! \return A reference to the new child node just created.
children.push_back(new path_element()); // Empty path.
return *(static_cast<path_element*>(&(children[(unsigned int)(children.size()-1)])));
}
+ void push_back(svg_element* g)
+ { //! Add a new g_element.
+ children.push_back(g);
+ }
+
void clear()
{
children.clear();
Modified: sandbox/SOC/2007/visualization/boost/svg_plot/quantile.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/quantile.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/quantile.hpp 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,4 +1,35 @@
-// quantile.hpp
+/*! \file quantile.hpp
+ \author Paul A. Bristow
+
+ \brief Estimate p th quantile of data.
+
+ \details Estimate p th quantile of data using one of 5 definitions.
+ Default is the recommendation of Hyndman and Fan = definition #8.
+
+ Hyndman and Fan recommend their definition 8 (Maple's default definition),
+ which gives quartiles between those reported by Minitab and Excel. This
+ approach is approximately median unbiased for continuous distributions.
+
+ Hyndman and Fan, 1996, "Sample Quantiles in Statistical Packages", The American Statistician 50(4):361-365,1996
+ http://www.pcreview.co.uk/forums/thread-3494699.php // Excel - Interquartile Range Miscalculation
+
+ The interquartile range is calculated using the 1st & 3rd sample quartiles,
+ but there are various ways to calculate those quartiles.
+ Excel, S-Plus, etc use H&F definition 7, which returns SMALL(data,i) as
+ quantile(data,(i-1)/(n-1)) and interpolates in between. For a continuous
+ distribution, this will tend to give too narrow an interquartile range, since
+ there will tend to be a small fraction of the population beyond the extreme
+ sample observations. In particular, for odd n (=2*k+1), Excel calculates the
+ 1st (3rd) quartile as the median of the lower (upper) "half" of the sample
+ including the sample median (k+1 observations).
+
+ Minitab, etc use H&F definition 6, which calculates the 1st (3rd) quartile
+ as the median of the lower (upper) "half" of the sample. This "half" sample
+ excludes the sample median (k observations) for odd n (=2*k+1). This will
+ tend to be a better estimate for the population quartiles, but will tend to
+ give quartile estimates that are a bit too far from the center of the whole
+ sample (too wide an interquartile range).
+*/
// Copyright Paul A. Bristow 2008
@@ -7,16 +38,11 @@
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
-
#ifndef BOOST_SVG_QUANTILE_HPP
#define BOOST_SVG_QUANTILE_HPP
#include <vector>
-using std::vector;
-
-// Estimate p th quantile of data using one of 5 definitions.
-// Default is the recommendation of Hyndman and Fan = definition #8.
-// Use p = 0.25 and p = 0.75 to get quartiles for boxplots.
+ using std::vector;
namespace boost
{
@@ -79,9 +105,17 @@
double quantile(vector<double>& data, double p, int HF_definition = 8)
-{ // p=fraction of population, percentile, e.g. p=0.25 for 1st quartile.
- // Usually double p = 0.25, or p = 0.75 for boxplots
- // Data must be ordered minimum to maximum.
+{ //! Estimate quantile from data.
+ /*!
+ \param[in] data population for which to estimate quantile (percentile). Data must be ordered minimum to maximum.
+
+ \param[in] p fraction of population, for example, p = 0.25 for 1st quartile. (Usually p = 0.25, or p = 0.75 for boxplots).
+
+ \param[in] HF_definition algorithm to use for the estimation.
+ \return quantile estimated quantile from the population.
+
+ */
+
size_t n = data.size();
// The interquartile range is calculated using the 1st & 3rd sample quartiles,
// but there are various ways to calculate those quartiles.
@@ -90,7 +124,7 @@
// The American Statistician 50(4):361-365, (1996).
// have a particularly simple common form given by the VBA code given.
// You select among the methods according to which definition of m is chosen.
- // from Function quantile(data, p) in Visual Basic from
+ // from Function quantile(data, p) in Visual Basic from
// http://www.pcreview.co.uk/forums/thread-3494699.php
// Jerry W. Lewis
double m;
@@ -98,11 +132,11 @@
{ // Hyndman and Fan definitions:
case 4: // H&F 4 SAS (PCTLDEF=1), R (type=4), Maple (method=3)
m = 0; // Largest IQR
- break;
- case 5: // H&F 5: R (type=5), Maple (method=4), Wolfram Mathematica quartiles
- // http://support.wolfram.com/archive/mathematica/quartilesnotes.html
+ break;
+ case 5: // H&F 5: R (type=5), Maple (method=4), Wolfram Mathematica quartiles
+ // http://support.wolfram.com/archive/mathematica/quartilesnotes.html
// "Symmetric linear interpolation a common choice when the data represent a sample
- // from a continuous distribution and
+ // from a continuous distribution and
// you want an unbiased estimate of the quartiles of that distribution."
m = 0.5; // moderate IRQ
break;
@@ -167,17 +201,16 @@
} // double quantile(vector<double>& data, double p)
double median(vector<double>& data)
-{ // Median of data - assumed pre-sorted from min to max.
+{ //! Median of data - assumed pre-sorted from min to max.
size_t data_size = data.size();
double median_;
- if ((data_size % 2) == 0)
+ if ((data_size % 2) == 0)
{ // Even, so take the mean of middle two values.
median_ = (data[data_size / 2 - 1] // is even so divides exactly without rounding!
+ data[data_size / 2]) // plus next above the middle.
/ 2;
//median_ = (series[(unsigned int)((data_size) / 2) -1]
//+ series[(unsigned int)((data_size) / 2)])
- /// 2;
}
else
{ // Odd, so just take the middle value.
Modified: sandbox/SOC/2007/visualization/boost/svg_plot/show_1d_settings.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/show_1d_settings.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/show_1d_settings.hpp 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,4 +1,13 @@
-// show_1d_settings.cpp
+/*! \file show_1d_settings.hpp
+ \author Jacob Voytko & Paul A. Bristow
+
+ \brief Shows settings and options for 1-D Plot.
+ \details Outputs a full list of all settings and options for 1-D Plot to std::cout.
+ This is useful for diagnosing why your plot doesn't look as you hoped!
+ \warning This creates about 100 lines of output, so should be used sparingly!
+
+ (See also show_2d_settings.cpp for 2-D plot).
+ */
// Copyright Jacob Voytko 2007
// Copyright Paul A. Bristow 2008
@@ -8,19 +17,13 @@
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
-// -----------------------------------------------------------------
-
-// This shows settings and options for 1-D Plot.
-// (See also show_2d_settings.cpp for 2-D plot).
-
#ifndef BOOST_SVG_SHOW_1D_SETTINGS_HPP
#define BOOST_SVG_SHOW_1D_SETTINGS_HPP
#include <boost/svg_plot/detail/pair.hpp>
using boost::svg::detail::operator<<;
-#include <iostream> // for testing only.
-// using std::cerr and std::endl
+#include <iostream>
namespace boost
{
@@ -31,69 +34,71 @@
void show_1d_plot_settings(svg_1d_plot& plot);
const char* fmtFlagWords[16] =
-{ // Descriptions of each bit.
- "skipws", "unitbuf", "uppercase","showbase","showpoint","showpos","left","right",
- "internal","dec","oct","hex","scientific","fixed","boolalpha", "?"
- /*
- enum _Fmtflags
- { // Show action when bit set == 1
- skipws = 0x0001, // Skip white space on input.
- unitbuf = 0x0002, // Output each char - unbuffered.
- uppercase = 0x0004,// Display uppercase A through F for hexadecimal values and E for scientific values
- showbase = 0x0008, // Display numeric constants in a format that can be read by the C++ compiler.
- showpoint = 0x0010, // Show decimal point and trailing zeros for floating-point values.
- showpos = 0x0020, // Show plus signs (+) for positive values.
- left = 0x0040, // Left-align values; pad on the right with the fill character.
- right = 0x0080,// Right-align values; pad on the left with the fill character (default alignment).
- internal = 0x0100, // Add fill characters after any leading sign or base indication, but before the value.
- dec = 0x0200, // Format numeric values as base 10 (decimal) (default radix).
- oct = 0x0400, // Format numeric values as base 8 (octal).
- hex = 0x0800, // Format numeric values as base 16 (hexadecimal).
- scientific = 0x1000,// Display floating-point numbers in scientific format.
- fixed = 0x2000, // Display floating-point numbers in fixed format.
- boolalpha = 0x4000, // Show bool as word true or false.
- // 0x8000 un-used. // show as ?
- adjustfield = 0x01c0,
- basefield = 0x0e00,
- floatfield = 0x3000,
- _Fmtmask = 0x7fff,
- _Fmtzero = 0
- };
- */
+{ //! Strings describing each bit in std::ios_base::fmtflags.
+ "skipws", "unitbuf", "uppercase","showbase","showpoint","showpos","left","right",
+ "internal","dec","oct","hex","scientific","fixed","boolalpha", "?"
+ /*
+ enum _Fmtflags
+ { // Show action when bit set == 1
+ skipws = 0x0001, // Skip white space on input.
+ unitbuf = 0x0002, // Output each char - unbuffered.
+ uppercase = 0x0004,// Display uppercase A through F for hexadecimal values and E for scientific values
+ showbase = 0x0008, // Display numeric constants in a format that can be read by the C++ compiler.
+ showpoint = 0x0010, // Show decimal point and trailing zeros for floating-point values.
+ showpos = 0x0020, // Show plus signs (+) for positive values.
+ left = 0x0040, // Left-align values; pad on the right with the fill character.
+ right = 0x0080,// Right-align values; pad on the left with the fill character (default alignment).
+ internal = 0x0100, // Add fill characters after any leading sign or base indication, but before the value.
+ dec = 0x0200, // Format numeric values as base 10 (decimal) (default radix).
+ oct = 0x0400, // Format numeric values as base 8 (octal).
+ hex = 0x0800, // Format numeric values as base 16 (hexadecimal).
+ scientific = 0x1000,// Display floating-point numbers in scientific format.
+ fixed = 0x2000, // Display floating-point numbers in fixed format.
+ boolalpha = 0x4000, // Show bool as word true or false.
+ // 0x8000 un-used. // show as ?
+ adjustfield = 0x01c0,
+ basefield = 0x0e00,
+ floatfield = 0x3000,
+ _Fmtmask = 0x7fff,
+ _Fmtzero = 0
+ };
+ */
}; // const char* fmtFlagWords
void outFmtFlags(std::ios_base::fmtflags fmtFlags, std::ostream& os, const char* term)
-{// Usage: outFmtFlags(flags, cerr);
- // For example, logs to cerr "FormatFlags: skipws showbase right dec"
- // Defaults in xiostream.hpp:
- // void outFmtFlags(fmtflags fmtFlags = cout.flags(), ostream& os = cerr, const char* term = ".\n");
- const int up = 16; // Words across page.
- const int count = 16; // cos using unsigned short int.
- int const flags = os.flags(); // save to restore.
- fmtFlags &= 0x7FFF; // _Fmtmask // clear un-used bits.
+{ //! Output strings describing all bits in std::ios_base::fmtflags.
+ /*! Usage: outFmtFlags();
+ for example, outputs to cerr: "FormatFlags: skipws showbase right dec"
+ Default parameter values are:
+ void outFmtFlags(fmtflags fmtFlags = cout.flags(), ostream& os = cerr, const char* term = ".\n");
+ */
+ const int up = 16; // Words across page.
+ const int count = 16; // cos using unsigned short int.
+ int const flags = os.flags(); // save to restore.
+ fmtFlags &= 0x7FFF; // _Fmtmask // clear un-used bits.
os << "IOS format flags (" << std::showbase << std::hex << fmtFlags << std::dec << ")" ; // hex value.
- if (fmtFlags != 0)
- {
- for(int i = 0, j = 1, hit = 0; i < count; ++i)
- {
- if ((fmtFlags & j) != 0)
- {
- if (hit == 0)
- { // First word no separator.
- os << ' ';
- }
- else
- {
- os << (( (hit % up) == 0) ? ",\n" : ", ");
- }
- os << fmtFlagWords[i];
- ++hit; // Count to add space or newline as appropriate.
- }
- j <<= 1;
- }
- }
- os << term; // eg "\n" or ". "
- os.flags(flags); // Restore.
+ if (fmtFlags != 0)
+ {
+ for(int i = 0, j = 1, hit = 0; i < count; ++i)
+ {
+ if ((fmtFlags & j) != 0)
+ {
+ if (hit == 0)
+ { // First word no separator.
+ os << ' ';
+ }
+ else
+ {
+ os << (( (hit % up) == 0) ? ",\n" : ", ");
+ }
+ os << fmtFlagWords[i];
+ ++hit; // Count to add space or newline as appropriate.
+ }
+ j <<= 1;
+ }
+ }
+ os << term; // eg "\n" or ". "
+ os.flags(flags); // Restore.
} // outFmtFlags
//namespace detail
@@ -136,12 +141,12 @@
//} // namespace detail
const std::string l_or_r(int i)
-{
+{ //! Outputs strings to show horizontal orientation: left, right or none.
return ((i < 0) ? "left" : ((i == 0) ? "none" : "right"));
}
const std::string t_or_b(int i)
-{
+{//! Outputs strings to show vertical orientation: top, bottom, or none.
return ((i < 0) ? "bottom" : ((i == 0) ? "none" : "top"));
}
@@ -149,7 +154,11 @@
void show_1d_plot_settings(svg_1d_plot&);
void show_1d_plot_settings(svg_1d_plot& plot)
-{
+{ //! Diagnostic display to std::cout of all of a 1D plot's settings.
+ /*! Outputs to cout, a long list of about hundred of plot parameter settings,
+ invaluable if the plot does not look as expected.
+ \warning This creates about 100 lines of output, so should be used sparingly!
+ */
using std::cout;
using std::endl;
using std::hex;
Modified: sandbox/SOC/2007/visualization/boost/svg_plot/show_2d_settings.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/show_2d_settings.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/show_2d_settings.hpp 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,95 +1,102 @@
-// show_2d_settings.cpp
+/*! \file show_2d_settings.hpp
+ \author Jacob Voytko & Paul A. Bristow
+
+ \brief Shows settings and options for 2D Plot.
+ \details Outputs a full list of all settings and options for 2D Plot to std::cout.
+ This is useful for diagnosing why your plot doesn't look as you hoped!
+ (See also show_1d_settings.cpp for 1D plot).
+ \warning This creates about 100 lines of output, so should be used sparingly!
+*/
// Copyright Jacob Voytko 2007
// Copyright Paul A. Bristow 2007
+
+
// Use, modification and distribution are subject to 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)
-// -----------------------------------------------------------------
-
-// This shows settings and options for 2-D Plot.
-
#ifndef BOOST_SVG_SHOW_2D_SETTINGS_HPP
#define BOOST_SVG_SHOW_2D_SETTINGS_HPP
-#include <iostream> // for testing only.
-// using std::cerr and std::endl
+#include <iostream>
namespace boost
{
namespace svg
{
- // Declaration, defined below.
- void show_plot_settings(svg_2d_plot& plot);
+// Declaration (defined below).
+void show_2d_plot_settings(svg_2d_plot& plot);
const char* fmtFlagWords[16] =
-{ // Descriptions of each bit.
- "skipws", "unitbuf", "uppercase","showbase","showpoint","showpos","left","right",
- "internal","dec","oct","hex","scientific","fixed","boolalpha", "?"
- /*
- enum _Fmtflags
- { // Show action when bit set == 1
- skipws = 0x0001, // Skip white space on input.
- unitbuf = 0x0002, // Output each char - unbuffered.
- uppercase = 0x0004,// Display uppercase A through F for hexadecimal values and E for scientific values
- showbase = 0x0008, // Display numeric constants in a format that can be read by the C++ compiler.
- showpoint = 0x0010, // Show decimal point and trailing zeros for floating-point values.
- showpos = 0x0020, // Show plus signs (+) for positive values.
- left = 0x0040, // Left-align values; pad on the right with the fill character.
- right = 0x0080,// Right-align values; pad on the left with the fill character (default alignment).
- internal = 0x0100, // Add fill characters after any leading sign or base indication, but before the value.
- dec = 0x0200, // Format numeric values as base 10 (decimal) (default radix).
- oct = 0x0400, // Format numeric values as base 8 (octal).
- hex = 0x0800, // Format numeric values as base 16 (hexadecimal).
- scientific = 0x1000,// Display floating-point numbers in scientific format.
- fixed = 0x2000, // Display floating-point numbers in fixed format.
- boolalpha = 0x4000, // Show bool as word true or false.
- // 0x8000 un-used. // show as ?
- adjustfield = 0x01c0,
- basefield = 0x0e00,
- floatfield = 0x3000,
- _Fmtmask = 0x7fff,
- _Fmtzero = 0
- };
- */
+{ //! \brief Strings describing format flags of each bit in std::ios_base::fmtflags.
+ "skipws", "unitbuf", "uppercase","showbase","showpoint","showpos","left","right",
+ "internal","dec","oct","hex","scientific","fixed","boolalpha", "?"
+ /*
+ enum _Fmtflags
+ { // Show action when bit set == 1
+ skipws = 0x0001, // Skip white space on input.
+ unitbuf = 0x0002, // Output each char - unbuffered.
+ uppercase = 0x0004,// Display uppercase A through F for hexadecimal values and E for scientific values
+ showbase = 0x0008, // Display numeric constants in a format that can be read by the C++ compiler.
+ showpoint = 0x0010, // Show decimal point and trailing zeros for floating-point values.
+ showpos = 0x0020, // Show plus signs (+) for positive values.
+ left = 0x0040, // Left-align values; pad on the right with the fill character.
+ right = 0x0080,// Right-align values; pad on the left with the fill character (default alignment).
+ internal = 0x0100, // Add fill characters after any leading sign or base indication, but before the value.
+ dec = 0x0200, // Format numeric values as base 10 (decimal) (default radix).
+ oct = 0x0400, // Format numeric values as base 8 (octal).
+ hex = 0x0800, // Format numeric values as base 16 (hexadecimal).
+ scientific = 0x1000,// Display floating-point numbers in scientific format.
+ fixed = 0x2000, // Display floating-point numbers in fixed format.
+ boolalpha = 0x4000, // Show bool as word true or false.
+ // 0x8000 un-used. // show as ?
+ adjustfield = 0x01c0,
+ basefield = 0x0e00,
+ floatfield = 0x3000,
+ _Fmtmask = 0x7fff,
+ _Fmtzero = 0
+ };
+ */
}; // const char* fmtFlagWords
void outFmtFlags(std::ios_base::fmtflags fmtFlags, std::ostream& os, const char* term)
-{// Usage: outFmtFlags(flags, cerr);
- // For example, logs to cerr "FormatFlags: skipws showbase right dec"
- // Defaults in xiostream.hpp:
- // void outFmtFlags(fmtflags fmtFlags = cout.flags(), ostream& os = cerr, const char* term = ".\n");
- const int up = 16; // Words across page.
- const int count = 16; // cos using unsigned short int.
- int const flags = os.flags(); // save to restore.
- fmtFlags &= 0x7FFF; // _Fmtmask // clear un-used bits.
+{ //! Output strings describing format flags of each bit in std::ios_base::fmtflags.
+
+ /*! Usage: outFmtFlags(flags, cerr);
+ For example, logs to cerr "FormatFlags: skipws showbase right dec"
+ */
+ //void outFmtFlags(std::ios_base::fmtflags fmtFlags = cout.flags(), ostream& os = cerr, const char* term = ".\n");
+ const int up = 16; // Words across page.
+ const int count = 16; // cos using unsigned short int.
+ int const flags = os.flags(); // save to restore.
+ fmtFlags &= 0x7FFF; // _Fmtmask // clear un-used bits.
os << "IOS format flags (" << std::showbase << std::hex << fmtFlags << std::dec << ")" ; // hex value.
- if (fmtFlags != 0)
- {
- for(int i = 0, j = 1, hit = 0; i < count; ++i)
- {
- if ((fmtFlags & j) != 0)
- {
- if (hit == 0)
- { // First word no separator.
- os << ' ';
- }
- else
- {
- os << (( (hit % up) == 0) ? ",\n" : ", ");
- }
- os << fmtFlagWords[i];
- ++hit; // Count to add space or newline as appropriate.
- }
- j <<= 1;
- }
- }
- os << term; // eg "\n" or ". "
- os.flags(flags); // Restore.
+ if (fmtFlags != 0)
+ {
+ for(int i = 0, j = 1, hit = 0; i < count; ++i)
+ {
+ if ((fmtFlags & j) != 0)
+ {
+ if (hit == 0)
+ { // First word no separator.
+ os << ' ';
+ }
+ else
+ {
+ os << (( (hit % up) == 0) ? ",\n" : ", ");
+ }
+ os << fmtFlagWords[i];
+ ++hit; // Count to add space or newline as appropriate.
+ }
+ j <<= 1;
+ }
+ }
+ os << term; // eg "\n" or ". "
+ os.flags(flags); // Restore.
} // outFmtFlags
namespace detail
@@ -104,7 +111,7 @@
os << p.first << ", " << p.second;
// Outputs: 1.2, 3.4
return os;
- } // std::ostream& operator<<
+ } // std::ostream& operator<<
std::ostream& operator<< (std::ostream& os, const std::pair<double, double>& p)
{ // Output a pair of values.
@@ -113,7 +120,7 @@
// Outputs: 1.2, 3.4
os.precision(precision); // Restore.
return os;
- } // std::ostream& operator<<
+ } // std::ostream& operator<<
// Maybe better as:
//template<typename charT, typename traits, typename T1, typename T2>
@@ -141,8 +148,13 @@
return ((i < 0) ? "bottom" : ((i == 0) ? "none" : "top"));
}
-void show_plot_settings(svg_2d_plot& plot)
-{
+void show_2d_plot_settings(svg_2d_plot& plot)
+{ //! Diagnostic display of all of a 2D plot's settings.
+ /*! Outputs to cout, a long list of about hundred of plot parameter settings,
+ invaluable if the plot does not look as expected.
+ \warning This creates about 100 lines of output, so should be used sparingly!
+ */
+
using std::cout;
using std::endl;
using std::hex;
@@ -157,9 +169,9 @@
int iostate = cout.flags(); // Save to restore one exit.
cout << dec << std::boolalpha << endl;
cout << endl;
- //cout << ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" << "image_filename() " << plot.image.image_filename() << endl;
+ //cout << ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" << "image_filename() " << plot.image.image_filename() << endl;
// doesn't work - no filename is shown.
-
+
cout << "axes_on " << plot.axes_on() << endl;
cout << "background_border_width " << plot.background_border_width() << endl;
cout << "background_border_color " << plot.background_border_color() << endl;
Modified: sandbox/SOC/2007/visualization/boost/svg_plot/stylesheet.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/stylesheet.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/stylesheet.hpp 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,4 +1,10 @@
-// stylesheet.hpp
+/*! \file stylesheet.hpp
+ \athor Jacob Voytko
+
+ \brief Implement Cascading Style Sheets for SVG plots (but NOT IMPLEMENTED yet).
+ \details
+ Get some inscrutable errors from this and so commented out of other modules.
+*/
// Copyright Jacob Voytko 2007
@@ -6,7 +12,6 @@
// Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
-// -----------------------------------------------------------------
#ifndef BOOST_SVG_STYLESHEET_HPP
#define BOOST_SVG_STYLESHEET_HPP
@@ -15,7 +20,6 @@
#include <boost/spirit/utility/distinct.hpp>
#include <stdexcept>
-// TODO get some inscrutable errors from this and so commented out of other modules.
#include <exception>
#include <string>
#include <fstream>
@@ -26,7 +30,6 @@
{
namespace svg
{
-
// Note: After GSoC, this will use the suggested CSS parser
// from the W3C CSS 2.1 Standard
struct css_parse : public ::boost::spirit::grammar<css_parse>
@@ -41,13 +44,13 @@
;
class_expression
- = wspace >> ::boost::spirit::ch_p('.')
+ = wspace >> ::boost::spirit::ch_p('.')
>> *(::boost::spirit::alnum_p) >> wspace >> ::boost::spirit::ch_p('{')
>> *statement >> wspace >> ::boost::spirit::ch_p('}')
;
id_expression
- = wspace >> ::boost::spirit::ch_p('#')
+ = wspace >> ::boost::spirit::ch_p('#')
>> *(::boost::spirit::alnum_p) >> wspace >> ::boost::spirit::ch_p('{')
>> wspace >> *statement >> wspace >> ::boost::spirit::ch_p('}')
;
@@ -60,13 +63,13 @@
;
normal_expression
- = wspace >> *(::boost::spirit::alnum_p) >> wspace
- >> ::boost::spirit::ch_p('{') >> wspace
+ = wspace >> *(::boost::spirit::alnum_p) >> wspace
+ >> ::boost::spirit::ch_p('{') >> wspace
>> *statement >> wspace >> ::boost::spirit::ch_p('}') >> wspace
;
identifier
- = *(::boost::spirit::chset<>("a-zA-Z0-9#-"));
+ = *(::boost::spirit::chset<>("a-zA-Z0-9#-"));
;
// whitespace
@@ -81,7 +84,7 @@
::boost::spirit::rule<ScannerT> const&
start() const { return expression; }
};
-}; // struct css_parse
+}; // struct css_parse
bool validate_stylesheet(std::ifstream& file)
{ // stream version used by file version below.
@@ -95,9 +98,9 @@
}
::boost::spirit::parse_info<> info = ::boost::spirit::
- parse(str.c_str(), my_css_parser,
+ parse(str.c_str(), my_css_parser,
::boost::spirit::space_p);
-
+
if (!info.full)
{
std::cout << info.stop;
Modified: sandbox/SOC/2007/visualization/boost/svg_plot/svg.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/svg.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/svg.hpp 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,5 +1,112 @@
-// svg.hpp
+/*!
+ \file svg.hpp
+ \brief Scalable Vector Graphic (SVG) format elements.
+ \details Provides classes and methods to create the basic SVG graph elements.
+ Graph elements, point, path, line, circle, rect and polygon, text are used by the 1D, 2D and Boxplot functions,
+ but could also be used for generating other graphics in SVG format.
+
+ \version 1.1
+ \author Jacob Voytko & Paul A. Bristow
+ */
+
+/*!
+ \mainpage Scalable Vector Graphic (SVG) Plot Package
+
+ \section intro_sec Introduction
+
+ Humans have a fantastic capacity for visual understanding, and merely looking
+ at data organized in one, two, or three dimensions allows us to see relations
+ not otherwise visible in a list of numbers.
+
+ Computers, however, deal with information numerically, and C++ and the
+ \htmlonly
+ Standard Template Library (STL)
+ \endhtmlonly
+ does not currently offer a way to bridge the gap.
+
+ This library helps the user to easily plot data stored in STL containers.
+
+ This project is focused on using STL containers in order to graph data on a
+ one-dimensional (1D) and two-dimensional (2D) (and in future, perhaps, 3D) plot.
+ The plot will currently be written to a
+
+ \htmlonly
+ Scalable Vector Graphic image
+ \endhtmlonly
+ \htmlonly
+ Scalable Vector Graphics (SVG)
+ \endhtmlonly
+ \htmlonly
+ XML specification
+ \endhtmlonly
+
+ and file format for describing two-dimensional vector graphics.
+
+ SVG files (.svg) can be viewed with a internet browser:
+
+ - Mozilla Firefox (newer versions),
+
+ - \htmlonly
+ Adobe Acrobat Reader
+ \endhtmlonly
+
+ - \htmlonly
+ Opera
+ \endhtmlonly
+ has
+ \htmlonly
+ SVG support
+ \endhtmlonly
+ but the quality of rendering is often not as good as other browsers.
+
+ - Microsoft Internet Explorer, provided a suitable
+ \htmlonly
+ Adobe SVG Viewer plug-in for SVG files]
+ \endhtmlonly
+ is installed.
+
+ - \htmlonly
+ Inkscape
+ \endhtmlonly
+ , a fine Open Source SVG viewer with excellent rendering, full scaling and other editing features,
+ including conversion to wide variety of other graphics formats like Portable Network Graphics .png.
+
+ - and by many other graphics programs.
+
+ The goals of the project are:
+
+ - To let users produce simple plots with minimal intervention by using sane defaults.
+ - To allow users to easily customize plots.
+ - To allow the user to talk to the plot classes using coordinate units rather than pixels or other arbitrary measures.
+ - To create the backbone of a `svg` class that can be extended to fully support the standard.
+ - compliance with the \htmlonly W3C Scalable vector Graph standard. \endhtmlonly
+
+ \section why_svg Why SVG format?
+
+ SVG provides very high quality images that display well on small screens like handheld devices,
+ conventional monitors of all sizes,
+ and on big screens (like when projected on lecture theatre screens),
+ and especially when printed, but files are tiny
+ (compared to images produced by spreadsheets like Microsoft Excel).
+
+ SVG files are microscopic when compressed using a zip program
+ to convert to type .zip, or the specific compressed SVG file type (.svgz).
+
+ \section plot_types_sec 1D, 2D and Boxplot
+
+ Three types of plots can be produced:
+
+ 1D plots are to show the spread of repeated observations of a single variable,
+ for example, the measured length of an object
+ (where the object's length is assumed to stay exactly the same but the measurements have some uncertainty)
+
+ or observations of a single attribute, for example,
+ the heights of boys in a school
+ (where the measurement is assumed exact but the heights really do vary).
+ This page generated from file svg.hpp.
+
+ */
// Copyright Jacob Voytko 2007
// Copyright Paul A Bristow 2007
@@ -35,22 +142,21 @@
// Use symbols if the same graphic appears multiple times in the document.
// Use CSS property inheritance and selectors to consolidate commonly used properties into named styles
// or to assign the properties to a parent <g> element.
-// Use filter effects to help construct graphics via client-side graphics operations.
+// Use filter effects to help construct graphics via client-side graphics operations.
namespace boost
-{
+{ //! \namespace boost www.Boost.org
namespace svg
-{ // Class to output Scalable Vector Graph XML,
- // graph elements, point, line, circle, rect and, text...
- // and handle plot stylesheets.
-
+{
+ //! \namespace svg Scalable Vector Graph plot functions and classes and data.
+ //! \namespace boost::svg All SVG classes and functions in Boost.Plot.
// Inserted as a SVG comment, for example
// "<!-- Demo of 1D plot features. --> \n"
// and also as a <desc />
// http://www.w3.org/TR/SVG/struct.html#DescriptionAndTitleElements
// 5.4 The 'desc' and 'title' elements
- static const std::string package_info =
+ static const std::string package_info = //!< Default SVG package information about this program that produced the SVG image (not the image itself).
"<!-- SVG plot written using Boost.Plot program (Creator Jacob Voytko) --> \n"
"<!-- Use, modification and distribution of Boost.Plot subject to the --> \n"
"<!-- Boost Software License, Version 1.0.--> \n"
@@ -64,9 +170,9 @@
// and as a meta item:
// <meta name="copyright" content="Paul A. Bristow" />
-
+//! Class to output Scalable Vector Graph XML graph elements: point, path, line, circle, rect, polygon and text.
+ // and handle plot stylesheets.
class svg;
-
// See svg_fwd.hpp for forward declarations.
// Public member functions:
// svg() constructor, and copy constructor.
@@ -106,34 +212,31 @@
class svg
{
protected:
- unsigned int x_size_; // image size.
- unsigned int y_size_;
+ unsigned int x_size_; //!< SVG image X-axis size (in SVG units (default pixels).
+ unsigned int y_size_; //!< SVG image Y-axis size (in SVG units (default pixels).
- g_element document; // group_element to hold all elements of svg document.
+ g_element document; //!< group_element to hold all elements of the svg document.
std::vector<clip_path_element> clip_paths;
- std::string title_document_; // SVG document title (for header as <title>).
- std::string image_desc_; // SVG image description (for header as <desc>).
- std::string holder_copyright_; // SVG info.
- std::string date_copyright_; // SVG info.
- std::string css; // Cascading Style Sheet.
- std::string filename_; // file written to.
- std::string author_; // Probably == copyright holder.
- bool is_boost_license_; // To include the Boost license as comment.
- bool is_license_; // Creative Commons license as metadata:
- std::string reproduction_; // "permits", "requires", or "prohibits"
- std::string attribution_;
- std::string commercialuse_;
- std::string distribution_;
- std::string derivative_works_;
- int coord_precision_; // decimal digits precision for output of x and y coordinates to svg.
+ std::string title_document_; //!< SVG document title (for header as \verbatim <title> ... <\title> \endverbatim).
+ std::string image_desc_; //!< SVG image description (for header as \verbatim <desc> ... <\desc> \endverbatim).
+ std::string holder_copyright_; //!< SVG info on holder of copyright (probably == author, but could be institution).
+ std::string date_copyright_; //!< SVG info on date of copyright claimed.
+ std::string css; //!< Cascading Style Sheet.
+ std::string filename_; //!< file SVG XML written to.
+ std::string author_; //!< Author(s) name. (Probably == copyright holder).
+ bool is_boost_license_; //!< If true, to include the Boost license as a XML comment.
+ bool is_license_; //!< If true, to include Creative Commons license as metadata:
+ std::string reproduction_; //!< License requirements for reproduction: "permits", "requires", or "prohibits".
+ std::string attribution_; //!< License requirements for attribution: "permits", "requires", or "prohibits".
+ std::string commercialuse_; //!< License requirements for commerical use: "permits", "requires", or "prohibits".
+ std::string distribution_; //!< License requirements for distribution: "permits", "requires", or "prohibits".
+ std::string derivative_works_; //!< License requirements for derivative: "permits", "requires", or "prohibits".
+ int coord_precision_; //!< Number of decimal digits precision for output of X and Y coordinates to SVG XML.
private:
- // ---------------------------------------------------------
- // Print the svg 1.1 header into the svg g_element document.
- // ---------------------------------------------------------
void write_header(std::ostream& s_out)
- {
+ { //! Output the DTD SVG 1.1 header into the svg g_element document.
s_out << "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>"
//<< "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" "
//<< "\"http://www.w3.org/graphics/svg/1.1/dtd/svg11.dtd\">"
@@ -164,7 +267,8 @@
}
void write_css(std::ostream& s_out)
- { // CSS (Cascading Style Sheet)
+ { //! Output CSS (Cascading Style Sheet)
+ // Not used at present.
if (css.size() != 0) // css != ""
{ // TODO confirm that this isn't useful if css is "".
// [CDATA[ ... ]] enclosing the style information
@@ -173,8 +277,8 @@
// such as ">", which conflict with XML parsers.
s_out << "<defs><style type=\"text/css\"><![CDATA[" << css
<< "]]></style></defs>" << std::endl;
- // CSS inline style can be declared within a style attribute in SVG
- // by specifying a semicolon-separated list of property declarations,
+ // CSS inline style can be declared within a style attribute in SVG
+ // by specifying a semicolon-separated list of property declarations,
// where each property declaration has the form "name: value".
// For example a style: style="fill:red; stroke:blue; stroke-width:3"
// class=
@@ -188,16 +292,13 @@
// .x_axis_value{ font-size:12px;font-weight:normal;fill:black }
// </style></defs>
}
- }
+ } // void write_css(std::ostream& s_out)
- // ----------------------------------------------------------------
- // Internal function to write all of the image to the svg document.
- // ----------------------------------------------------------------
void write_document(std::ostream& s_out)
- {
- // Write all clip paths that
- // define a region of the output device
- // to which paint can be applied.
+ { //! \brief Output all of the image to the svg document (Internal function)
+ /*! \details Output all clip paths that define a region of the output device
+ to which paint can be applied.
+ */
for(size_t i = 0; i < clip_paths.size(); ++i)
{
clip_paths[ (unsigned int)i ].write(s_out);
@@ -210,74 +311,76 @@
} // write_document
public:
-
- svg()
- : x_size_(400), y_size_(400), // of the whole SVG image.
- title_document_(""), // This is document title, not plot title.
- image_desc_(""), // Information about the plot, for example, the program that created it.
- author_(""), // Default to copyright holder.
- holder_copyright_(""), //
- date_copyright_(""), //
- css(""), // stylesheet.
- filename_(""), // If written only to ostream, filename will not appear in comment.
- is_license_(false), // No default license.
- is_boost_license_(false), // No Boost license unless requested.
- reproduction_("permits"), // Set with license:
- distribution_("permits"), // permits, requires, or prohibits.
- attribution_("requires"),
- commercialuse_("permits"),
- derivative_works_("permits"),
- coord_precision_(3) // enough for 1 in 1000 resolution to suit small image use.
+ svg() //! Define default constructor.
+ :
+ x_size_(400), //!< X-axis of the whole SVG image (default SVG units, default pixels).
+ y_size_(400), //!< Y-axis of the whole SVG image (default SVG units, default pixels).
+ title_document_(""), //!< This is SVG document title, not a plot title.
+ image_desc_(""), //!< Information about the image, for example, the program that created it.
+ author_(""), //!< Author of image (defaults to the copyright holder).
+ holder_copyright_(""), //!< Name of copyright holder.
+ date_copyright_(""), //!< Date of copyright claim.
+ css(""), //!< Stylesheet filename.
+ filename_(""), //!< Name of file to which SVG XML has been written is embedded in the file as an XML comment (if written only to an ostream, filename will not appear in comment).
+ is_license_(false), //!< If true, license text is written as comment in SVG XML. (Default is no license).
+ is_boost_license_(false), //!< If true, Boost license text is written as comment in SVG XML. (Default is no license). Suggested strings for license permission are "permits", "requires", or "prohibits", or "".
+ reproduction_("permits"), //!< Default license permits reproduction.
+ distribution_("permits"), //!< Default license permits distribution.
+ attribution_("requires"), //!< Default license requires attribution.
+ commercialuse_("permits"), //<! Default license permits commerical use.
+ derivative_works_("permits"), //!< Default license permits derivative works.
+ coord_precision_(3) //!< 3 decimal digits precision is enough for 1 in 1000 resolution: suits small image use. Higher precision (4, 5 or 6) will be needed for larger images, but increase the SVG XML file size, especially if there are very many data values.
{ // Default constructor.
}
svg(const svg& rhs) : x_size_(rhs.x_size_), y_size_(rhs.y_size_)
- { // Defined image size copy constructor.
+ { //! Define image size copy constructor.
// TODO Other member data items are NOT copied. OK?
}
// Set & get functions for x_size_ and y_size_
void x_size(unsigned int x)
- {
+ { //! Set X-axis (horizontal) image size.
x_size_ = x;
}
void y_size(unsigned int y)
- {
+ { //! Set Y-axis (vertical) image size.
y_size_ = y;
}
unsigned int x_size()
- {
+ { //! Get X-axis (horizontal) image size.
return x_size_;
}
unsigned int y_size()
- {
+ { //! Get Y-axis (vertical) image size.
return y_size_;
}
unsigned int document_size()
- { // How many elements have been added to document.
+ { //! How many elements have been added to document.
return static_cast<unsigned int>(document.size());
}
void coord_precision(int digits)
- { // Set decimal digits to be output for output of coordinates.
- // Default stream precision 6 decimal digits is probably excessive.
- // 4.1 Basic data types, integer or float in decimal or scientific (using e format).
- // - probably enough if image size is under 1000 x 1000.
- // This will reduce .svg file sizes significantly for curves represented with many data points.
- // For example, if a curve is shown using 100 points,
- // reducing to precision(3) from 6 will reduce file size by 300 bytes.
- // So a default of 3 is used in the default constructor above,
- // but can be changed using this function.
- // Used in svg.write below and so applies to all the svg document.
+ { //! \brief Set decimal digits to be output for X and Y coordinates.
+ /*! \details Default stream precision 6 decimal digits is probably excessive.
+ 4.1 Basic data types, integer or float in decimal or scientific (using e format).
+ 3 or 4 probably enough if image size is under 1000 x 1000.
+ This will reduce .svg file sizes significantly for curves represented with many data points.
+ For example, if a curve is shown using 100 points,
+ reducing to precision(3) from 6 will reduce file size by 300 bytes.
+ So a default of 3 is used in the default constructor above,
+ but can be changed using this function.
+ Used in svg.write below and so applies to all the svg document.
+ */
coord_precision_ = digits;
}
int coord_precision()
- { //
+ { //!< Get decimal digits to be output for X and Y coordinates.
return coord_precision_;
}
@@ -293,7 +396,7 @@
// --------------------------------------------------------------------------------
void write(const std::string& filename)
- {// Write whole .svg 'file' contents to file.
+ { //!< Write whole .svg 'file' contents to file.
std::string file(filename); // Copy to avoid problems with const if need to append.
if (file.find('.') == std::string::npos)
{ // No file type suffix, so provide the default .svg.
@@ -311,14 +414,14 @@
}
void write(std::ostream& s_out)
- { // Write whole .svg 'file' contents to stream (perhaps a file).
+ { //! Write whole .svg 'file' contents to stream (perhaps a file).
write_header(s_out); // "<?xml version=...
// write svg document, begin <svg tag.
// <svg xml:space="preserve" width="5.5in" height=".5in">
s_out << "<svg width=\"" << x_size_ << "\" height =\"" << y_size_
<< "\" version=\"1.1\"\n" // http://www.w3.org/TR/SVG11/
-
+
// 1.2 draft specification at http://www.w3.org/TR/SVG12/
"xmlns:svg =\"http://www.w3.org/2000/svg\"\n"
"xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n"
@@ -340,7 +443,7 @@
<< '>' << std::endl;
// Bind the required namespaces, see http://jwatt.org/svg/authoring/#namespace-binding
- //
+ //
// << " baseProfile = \"full\"\n"
// is recommended and might be needed, but defaults to baseProfile = "none"
// according to
@@ -388,10 +491,10 @@
if (is_boost_license_ == true)
{
- s_out <<
+ s_out <<
"<!-- Use, modification and distribution of this Scalable Vector Graphic file -->"
"\n<!-- are subject to the Boost Software License, Version 1.0. -->"
- "\n<!-- (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->\n"
+ "\n<!-- (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->\n"
<< std::endl;
} // is_boost_license
if (is_license_ == true)
@@ -405,10 +508,10 @@
"<dc:format>image/svg+xml</dc:format>\n"
"<dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" />\n"
"<dc:title> " << (title_document_ != "" ? title_document_ : filename_) << "</dc:title>\n"
- "<dc:creator> <cc:Agent> <dc:title>Boost.Plot</dc:title> </cc:Agent></dc:creator>\n"
+ "<dc:creator> <cc:Agent> <dc:title>Boost.Plot</dc:title> </cc:Agent></dc:creator>\n"
"<dc:author><cc:Agent><dc:title>" << author_ << " </dc:title> </cc:Agent> </dc:author>\n"
"<dc:rights><cc:Agent><dc:title>" << holder_copyright_ << "</dc:title></cc:Agent></dc:rights>\n"
- "<dc:date>" << date_copyright_ << "</dc:date>\n"
+ "<dc:date>" << date_copyright_ << "</dc:date>\n"
"<dc:identifier>" << filename_ << "</dc:identifier>\n" // URI for this svg document.
"<dc:source>" << "Boost.plot 0.5" << "</dc:source>\n"
"<dc:relation>" << "" << "</dc:relation>\n" // URI to a related document, perhaps user source program.
@@ -443,57 +546,62 @@
s_out << "</svg>" << std::endl; // close off svg tag.
}
- void license( // Set license requirements for the svg document.
- const std::string repro = "permits",
- const std::string distrib = "permits",
- const std::string attrib = "requires",
- const std::string commercial = "permits",
+ void license(
+ const std::string reproduction = "permits",
+ const std::string distribution = "permits",
+ const std::string attribution = "requires",
+ const std::string commercialuse = "permits",
const std::string derivative = "permits")
- { // Might check these are "permits", "requires", or "prohibits"?
- reproduction_ = repro;
- distribution_ = distrib;
- attribution_ = attrib;
- commercialuse_ = commercial;
+ { //! Set several license requirements for the svg document.
+
+ /*!
+ If any are set, then a license is wanted, so svg#is_license is set true.
+ This can be changed using function license_on().
+ */
+ reproduction_ = reproduction;
+ distribution_ = distribution;
+ attribution_ = attribution;
+ commercialuse_ = commercialuse;
derivative_works_ = derivative;
- is_license_ = true; // Assume want this if set these?
- }
+ is_license_ = true; // Assume want this if set any of these requirements.
+ } // void license
void license_on(bool l)
- { // Set (or not) license using all requirement (default permits).
- // Implicitly set by setting a license requirement using license above.
+ { //! Set (or not) license using all requirement (default permits).
+ //! Implicitly set by setting a license requirement using license above.
is_license_ = l;
}
bool license_on()
- { // Shows if a license has been requested in the svg header metatadata.
+ { //! Return true if a license has been requested for svg header metatadata.
return is_license_;
}
void boost_license_on(bool l)
- { // Set (or not) Boost license.
+ { //! Set (or not) to include Boost license text in svg header as comment.
is_boost_license_ = l;
}
bool boost_license_on()
- { // Shows if a license has been requested in the svg header metatadata.
+ { //! Return true if a boost license has been requested in the svg header as comment.
return is_boost_license_;
}
const std::string& reproduction()
- { // Gets license reproduction requirement.
+ { //! Get license reproduction requirement.
return reproduction_;
}
const std::string& distribution()
- { // Gets license distribution requirement.
+ { //! Get license distribution requirement.
return distribution_;
}
const std::string& attribution()
- { // Gets license attribution requirement.
+ { //! Get license attribution requirement.
return attribution_;
}
const std::string& commercialuse()
- { // Gets license commercialuse requirement.
+ { //! Get license commercial use requirement.
return commercialuse_;
}
@@ -502,187 +610,177 @@
// TODO: allow other unit identifiers.
// -------------------------------------------------------
void image_size(unsigned int x, unsigned int y)
- {
+ { //! Set both X and Y image size (SVG units, default pixels).
x_size_ = x;
y_size_ = y;
}
void description(const std::string d)
- { // Writes description to the document(for header as <desc>).
+ { //! Write description to the document (for header as <desc>).
image_desc_ = d;
}
const std::string& description()
- { // Gets description of the document(for header as <desc>).
+ { //! Get description of the document (for header as <desc>).
return image_desc_;
}
void author(const std::string a)
- { // Writes author to the document (default is copyright_holder).
+ { //! Set author for the document (default is copyright_holder).
author_ = a;
}
const std::string& author()
- { // Gets description of the document(for header as <desc>).
+ { //! Get author of the document (for header as <author>).
return author_;
}
void document_title(const std::string d)
- { // Writes document title for the document(for header as <title>)..
+ { //! Set document title for the document (for header as <title>)..
title_document_ = d;
}
const std::string document_title()
- { // Get document title for the document(for header as <title>)..
+ { //! Get document title for the document (for header as <title>)..
return title_document_;
}
void copyright_holder(const std::string d)
- { // Writes document title for the document(for header as <title>)..
+ { //! Set document title for the document (for header as <copyright_holder>)..
holder_copyright_ = d;
}
const std::string copyright_holder()
- { // Get document title for the document(for header as <title>)..
+ { //! Get document title for the document (for header as <copyright_holder>)..
return holder_copyright_;
}
void copyright_date(const std::string d)
- { // Writes document title for the document(for header as <title>)..
+ { //! Set document title for the document (for header as <copyright_date>)..
date_copyright_ = d;
}
const std::string copyright_date()
- { // Get document title for the document(for header as <title>)..
+ { //! Get document title for the document (for header as <copyright_date>)..
return date_copyright_;
}
void image_filename(const std::string filename)
- { // Writes image filename for the document(for header as <title>)..
+ { //! Set image filename for the document (for header as <filename>)..
filename_ = filename;
}
const std::string image_filename()
- { // Get image filename for the document(for header as <title>)..
+ { //! Get image filename for the document (for header as <filename>)..
return filename_;
}
// ------------------------------------------------------------------------
// push_back information about line, rec, circle & ellipse to the document.
// ------------------------------------------------------------------------
+
line_element& line(double x1, double y1, double x2, double y2)
- { // 'line' element defines a line segment
- // that starts at one point and ends at another.
+ { //! push_back information about a line to the document.
+ //! 'line' element defines a line segment that starts at one point (x1, y1) and ends at another (x2, y2).
return document.line(x1, y1, x2, y2);
}
rect_element& rect(double x1, double y1, double x2, double y2)
- {
+ { //! push_back information about a rectangle to the document.
+ //! 'lRect' element defines a rect segment with one point (x1, y1) and opposite vertex is (x2, y2).
return document.rect(x1, y1, x2, y2);
}
circle_element& circle(double x, double y, unsigned int radius = 5)
- {
+ { //! push_back information about a circle to the document.
+ //! 'circle' element defines a circle centered at (x1, y1) and its radius.
return document.circle(x, y, radius);
}
ellipse_element& ellipse(double rx, double ry, double cx, double cy)
- {
+ { //! push_back information about a ellipse to the document.
+ //! 'ellipse' element defines a ellipse centered at point (x1, y1) and its two radii.
return document.ellipse(rx, ry, cx, cy);
}
- // -------------------------------------------------
- // push_back information about text to the document.
- // -------------------------------------------------
text_element& text(double x, double y, const std::string& text,
- const text_style& style, // size, font etc.
- align_style align, rotate_style rotate)
- {
+ const text_style& style, // size, font etc.
+ align_style align, rotate_style rotate)
+ { //! push_back information about text to the document, with location, style, alignment & rotation.
return document.text(x, y, text, style, align, rotate);
- }
+ }
- // push_back info about polygon shapes:
// Polygon for shapes with many vertices.
polygon_element& polygon(double x, double y, bool f = true) // 1st point only, add others later with .P(x, y).
- {
+ { //! push_back info about 1st point of a polygon shape (add others later with .P(x, y)).
return document.polygon(x, y, f);
}
//JVTODO: Replace with template version
polygon_element& polygon(std::vector<poly_path_point>& v, bool f = true)
- { // push_back a complete many-sided polygon to the document.
+ { //! push_back a complete many-sided polygon to the document with vertices specified as a vector of path_points.
return document.polygon(v, f);
}
- // JVTODO: These are not in the standard. Remove, or keep as convenience?
- // Specific polygon shapes: triangle, rhombus, pentagon & hexagon.
-
+ // Specific polygon shapes: triangle, rhombus, pentagon & hexagon. (not in SVG standard but convenient).
polygon_element& triangle(double x1, double y1, double x2, double y2, double x3, double y3, bool f = true)
- { // push_back a complete triangle to the document.
+ { //! push_back a complete triangle to the document.
return document.polygon(x1, y1, f).P(x2, y2).P(x3, y3);
}
polygon_element& rhombus(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, bool f = true)
- { // push_back a complete rhombus to the document.
+ { //! push_back the four coordinate of a complete rhombus to the document.
return document.polygon(x1, y1, f).P(x2, y2).P(x3, y3).P(x4, y4);
}
polygon_element& pentagon(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, double x5, double y5, bool f = true)
- { // push_back a complete pentagon to the document.
+ { //! push_back the five coordinates complete pentagon to the document.
return document.polygon(x1, y1, f).P(x2, y2).P(x3, y3).P(x4, y4).P(x5, y5);
}
polygon_element& hexagon(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, double x5, double y5, double x6, double y6, bool f = true)
- { // push_back a complete 6-sided star to the document.
+ { //! push_back the coordinate of the points of a complete hexagon to the document.
return document.polygon(x1, y1, f).P(x2, y2).P(x3, y3).P(x4, y4).P(x5, y5).P(x6, y6);
}
- // push_back info about polylines.
+ polyline_element& polyline(double x, double y)
+ { //! push_back info about the 1st point of a polyline (add others later with .P(x, y)).
- polyline_element& polyline(double x, double y) // 1st point only, add others later with .P(x, y).
- {
return document.polyline(x, y);
}
polyline_element& polyline(double x1, double y1, double x2, double y2)
- { // Two points only, add others later with .P(x, y).
+ { //! push_back info about the 1st & 2nd point of a polyline (add others later with .P(x, y)).
return document.polyline(x1, y1).P(x2, y2);
}
polyline_element& polyline(std::vector<poly_path_point>& v)
- { // push_back a complete many-sided polygon to the document,
- // from a vector of points.
+ { //! push_back a complete many-sided polygon to the document, from a vector of path_points.
return document.polyline(v);
}
// --------------------------------------------------------------------------------
- // Writes the information about path, clip_path to the document.
- // --------------------------------------------------------------------------------
+ // Write the information about path, clip_path to the document.
path_element& path()
- {
- return document.path(); // empty path, ready for additions with M., L. ...
+ { //! Construct an empty path, ready for additions with chainable functions M., L. ...
+ return document.path();
}
clip_path_element& clip_path(const rect_element& rect, const std::string& id)
- { // Rectangle outside which 'painting' is 'clipped' so doesn't show.
+ { //! Rectangle outside which 'painting' is 'clipped' so doesn't show.
clip_paths.push_back(clip_path_element(id, rect));
return clip_paths[clip_paths.size()-1];
}
- // -------------------------------------------------------------
- // Writes information about a group element to the document.
- // -------------------------------------------------------------
-
g_element& g()
- {
- return document.g();
+ { //! Writes information about a group element to the document.
+ return document.g(); //! return reference to the group element.
}
g_element& g(int i)
- { // Array of g_elements document,
- // indexed by group type, PLOT_BACKGROUND, PLOT_WINDOW_BACKGROUND, ... SVG_PLOT_DOC_CHILDREN
- return document.g(i);
+ { //! Get from the array of g_elements, indexed by group type, PLOT_BACKGROUND, PLOT_WINDOW_BACKGROUND, ... SVG_PLOT_DOC_CHILDREN
+ return document.g(i); //! return reference to the ith group element.
}
//// -------------------------------------------------------------
Modified: sandbox/SOC/2007/visualization/boost/svg_plot/svg_1d_plot.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/svg_1d_plot.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/svg_1d_plot.hpp 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,4 +1,11 @@
-// svg_1d_plot.hpp
+/*!
+ \file svg_1d_plot.hpp
+ \brief Create 1D plots in Scalable Vector Graphic (SVG) format.
+ \details Provides svg_1d_plot data and function to create plots, and svg_1d_plot_series to allow data values to be added.
+ Very many functions allow fine control of the appearance and layout of plots and data markers.
+ Items common to 1D and 2D use axis_plot_frame.
+ \author Jacob Voytko & Paul A. Bristow
+ */
// Copyright Jacob Voytko 2007
// Copyright Paul A. Bristow 2008
@@ -18,7 +25,7 @@
#endif
#include <boost/iterator/transform_iterator.hpp>
-// using boost::make_transform_iterator;
+// for using boost::make_transform_iterator;
#include "svg.hpp"
#include "svg_style.hpp"
@@ -45,7 +52,7 @@
namespace svg
{
// Forward declarations.
- const std::string strip_e0s(std::string s); // Strip unncessary zeros and e and sign.
+ const std::string strip_e0s(std::string s); // Strip unnecessary zeros and e and sign.
class svg_1d_plot; // 1D Plot.
class svg_1d_plot_series; // 1D Plot data series.
@@ -70,28 +77,31 @@
// Constructor svg_1d_plot_series.
template <class T> // T an STL container: array, vector<double>, set, map ...
svg_1d_plot_series(T begin, T end, const std::string& title = "");
- // Scan each data point between the iterators that are passed,
- // sorting them into the correct std::vectors, normal or not.
+ //! Scan each data point between the iterators that are passed,
+ //! sorting them into the appropriate std::vectors, normal or not (NaN or infinite).
// Declarations of Set functions for the plot series.
svg_1d_plot_series& fill_color(const svg_color& col_);
svg_1d_plot_series& stroke_color(const svg_color& col_);
svg_1d_plot_series& shape(point_shape shape_);
- point_shape shape();
svg_1d_plot_series& symbols(const std::string s);
svg_1d_plot_series& size(int size_);
- int size();
- const std::string symbols();
svg_1d_plot_series& line_color(const svg_color& col_);
svg_1d_plot_series& line_width(double wid_);
+ svg_1d_plot_series& line_on(bool on_);
+ svg_1d_plot_series& bezier_on(bool on_);
// Get functions for the plot series.
-
+ svg_color fill_color();
+ svg_color stroke_color();
+ int size();
+ point_shape shape();
+ const std::string symbols();
double line_width();
- svg_1d_plot_series& line_on(bool on_);
- svg_1d_plot_series& bezier_on(bool on_);
+ bool line_on();
bool bezier_on();
+
}; // class svg_1d_plot_series
// class svg_1d_plot_series Constructor
@@ -121,90 +131,98 @@
// Definitions of svg_plot_series Member Functions.
svg_1d_plot_series& svg_1d_plot_series::fill_color(const svg_color& col_)
-{
+{ //! Set fill color for plot point marker(s) (chainable).
point_style_.fill_color_ = col_;
- return *this;
+ return *this; // Make chainable.
}
svg_1d_plot_series& svg_1d_plot_series::stroke_color(const svg_color& col_)
-{
+{ //! Set stroke color for plot point marker(s) (chainable).
point_style_.stroke_color_ = col_;
- return *this;
+ return *this; // Make chainable.
}
svg_1d_plot_series& svg_1d_plot_series::shape(point_shape shape_)
-{
+{ //! Set shape for plot point marker(s) (chainable).
point_style_.shape_ = shape_;
- return *this;
+ return *this; // Make chainable.
}
point_shape svg_1d_plot_series::shape()
-{
+{//! Get shape for plot point marker(s).
return point_style_.shape_;
}
svg_1d_plot_series& svg_1d_plot_series::symbols(const std::string s)
-{
+{ //! Set symbol for plot point marker(s).
point_style_.symbols_ = s;
- return *this;
+ return *this; // Make chainable.
}
svg_1d_plot_series& svg_1d_plot_series::size(int size_)
-{
+{ //! Set size of plot point marker(s).
//point_style_.size_ = size_;
//point_style_.symbols_style_.font_size(i); // in case using a symbol.
point_style_.size(size_);
- return *this;
+ return *this; // Make chainable.
}
int svg_1d_plot_series::size()
-{
+{ //! Get size of plot point marker(s).
return point_style_.size();
}
const std::string svg_1d_plot_series::symbols()
-{
+{ //! Get symbol for plot point marker(s).
return point_style_.symbols_;
}
svg_1d_plot_series& svg_1d_plot_series::line_color(const svg_color& col_)
-{
+{ //! Set color of any line joining plot points.
line_style_.stroke_color_ = col_;
- return *this;
+ return *this; // Make chainable.
}
svg_1d_plot_series& svg_1d_plot_series::line_width(double wid_)
-{
+{ //! Set width of any line joining plot points.
line_style_.width_ = wid_;
- return *this;
-} double svg_1d_plot_series::line_width()
-{
+ return *this; // Make chainable.
+}
+
+double svg_1d_plot_series::line_width()
+{ //! Get width of any line joining plot points.
return line_style_.width_;
}
svg_1d_plot_series& svg_1d_plot_series::line_on(bool on_)
-{
+{ //! Set to draw a line joining plot points (if true).
line_style_.line_on_ = on_;
- return *this;
+ return *this; // Make chainable.
+}
+
+bool svg_1d_plot_series::line_on()
+{ //! Get if to draw a line joining plot points (if true).
+ return line_style_.bezier_on_;
}
svg_1d_plot_series& svg_1d_plot_series::bezier_on(bool on_)
-{
+{ //! Set if to draw bezier curved line joining plot points (if true).
line_style_.bezier_on_ = on_;
- return *this;
+ return *this; // Make chainable.
}
-bool svg_1d_plot_series::bezier_on()
-{
+
+bool svg_1d_plot_series::bezier_on()
+{ //! Get to draw bezier curved line joining plot points (if true).
return line_style_.bezier_on_;
}
-// End Definitions of svg_plot_series Member Functions.
+// End Definitions of svg_plot_series Public Member Functions.
class svg_1d_plot : public detail::axis_plot_frame<svg_1d_plot>
-{ // See also svg_2d_plot.hpp for 2-D version.
+{ //! See also svg_2d_plot.hpp for 2-D version.
friend void show_plot_settings(svg_1d_plot&);
friend class detail::axis_plot_frame<svg_1d_plot>;
- // axis_plot_frame.hpp contains functions common to 1 and 2-D.
+ //! axis_plot_frame.hpp contains functions common to 1 and 2-D.
protected:
// Member data names conventionally end with _.
@@ -212,34 +230,33 @@
// and set & get accessor functions are named without _ suffix,
// for example: border_margin() & border_margin(int).
- double x_scale_; // Used for transform from Cartesian to SVG coordinates.
- double x_shift_; // SVG origin is top left, Cartesian is bottom right.
+ double x_scale_; //! scale used for transform from Cartesian to SVG coordinates.
+ double x_shift_; //! shift from SVG origin is top left, Cartesian is bottom right.
double y_scale_;
double y_shift_;
svg image; // Stored so as to avoid rewriting style information constantly.
- double text_margin_; // Marginal space around text items like title,
+ double text_margin_; //! Marginal space around text items like title,
- text_style a_style_; // Defaults.
- // text_style contains font size & type etc.
+ text_style a_style_; //! Default text style that contains font size & type etc.
text_style title_style_;
text_style legend_style_;
text_style x_axis_label_style_;
- text_style y_axis_label_style_; // Not used for 1D but needed by axis_plot_frame.hpp.
+ text_style y_axis_label_style_; //! Not used for 1D but needed by axis_plot_frame.hpp.
text_style x_value_label_style_;
- text_style y_value_label_style_; // Not used for 1D but needed by axis_plot_frame.hpp.
- text_style point_symbols_style_; // Used for data point marking.
- text_style value_style_; // Used for data point value label.
+ text_style y_value_label_style_; //! Not used for 1D but needed by axis_plot_frame.hpp.
+ text_style point_symbols_style_; //! Used for data point marking.
+ text_style value_style_; //! Used for data point value label.
- value_style x_values_style_; // Used for data point value marking.
+ value_style x_values_style_; //! Used for data point value marking.
//rotate_style x_value_label_rotation_; // Direction point value labels written.
//int x_value_precision_;
//std::ios_base::fmtflags x_value_ioflags_;
- text_element title_info_; // Title of whole plot.
- text_element legend_header_; // legend box header or title (if any).
- text_element x_label_info_; // Example: "length of widget"
+ text_element title_info_; //! Title of whole plot.
+ text_element legend_header_; //! legend box header or title (if any).
+ text_element x_label_info_; //! X-axis label, Example: "length of widget"
text_element x_label_value_; // For example: "1.2" or "1.2e1"
text_element x_units_info_; // For example, to display, "length (meter)"
@@ -598,7 +615,6 @@
draw_x_axis();
} // draw_axes()
-
void update_image()
{
clear_all(); // Removes all elements that will show up in a subsequent draw.
@@ -668,7 +684,7 @@
svg_1d_plot& write(const std::string& file);
svg_1d_plot& write(std::ostream& s_out);
- // Versions of plot functions to add data series.
+ // Definitions of several versions of plot function to add data series.
template <class T>
svg_1d_plot_series& plot(const T& container, const std::string& title = "");
template <class T>
@@ -683,7 +699,10 @@
// svg_1d_plot Member functions definitions.
svg_1d_plot& svg_1d_plot::write(const std::string& file)
- {
+ { //! Write SVG image to the specified file.
+ /** Write SVG image to the specified file, providing the suffix .svg if none given.
+ This function uses the write to ostream function.
+ */
std::string filename(file); // Copy to avoid problems with const if need to append.
if (filename.find(".svg") == std::string::npos)
{ // No file type suffix, so provide the default .svg.
@@ -701,52 +720,73 @@
}
svg_1d_plot& svg_1d_plot::write(std::ostream& s_out)
- {
+ { //! Write SVG image to the specified std::ostream.
+ /*!
+ This function also is used by the write to file function.
+ */
update_image();
- // Default stream precision 6 decimal digits is probably excessive.
- // 4.1 Basic data types, integer or float in decimal or scientific (using e format).
- // - probably enough if image size is under 1000 x 1000.
- // Reduces .svg file sizes significantly for curves represented with many data points.
- // For example, if a curve is shown using 100 points,
- // reducing to coord_precision(3) from default of 6 will reduce file size by 300 bytes.
+ /*!
+ Default stream precision 6 decimal digits is probably excessive.
+ 4.1 Basic data types, integer or float in decimal or scientific (using e format).
+ - probably enough if image size is under 1000 x 1000.
+ Reduces .svg file sizes significantly for curves represented with many data points.
+ For example, if a curve is shown using 100 points,
+ reducing to coord_precision(3) from default of 6 will reduce file size by 300 bytes.
+ */
image.write(s_out);
return (svg_1d_plot&)*this;
}
template <class T>
svg_1d_plot_series& svg_1d_plot::plot(const T& container, const std::string& title /*= "" */)
- { // Add a data series to the plot (by default, converting to doubles).
- // Note that this version assumes that *ALL* the data value in the container is used.
+ { //! Add a data series to the plot (by default, converting to doubles), with optional title.
+ /*! Note that this version assumes that *ALL* the data values in the container are used.
+ */
series.push_back(
svg_1d_plot_series(
boost::make_transform_iterator(container.begin(), detail::boost_default_convert()),
boost::make_transform_iterator(container.end(), detail::boost_default_convert()),
title)
);
- // For example: my_1d_plot.plot(my_data, "All my container");
+ /*
+ \code
+ // Plot example:
+ std::vector<float> my_data; // my container.
+ my_data.pushback(2.f); // Fill container with some data.
+ my_data.pushback(3.f);
+ my_data.pushback(4.f);
+ my_1d_plot.plot(my_data, "All my container"); // Plot all data.
+ \endcode
+ */
return series[series.size() - 1]; // Reference to data series just added.
}
template <class T>
svg_1d_plot_series& svg_1d_plot::plot(const T& begin, const T& end, const std::string& title)
- { // Add a data series to the plot (by default, converting to doubles).
- // Note that this version permits a partial range,
- // begin to end, of the container to be used.
+ { //! Add a data series to the plot (by default, converting to doubles), with optional title.
+ /*!
+ Note that this version permits a partial range, begin to end, of the container to be used.
+ Returns a reference to data series just added.
+ */
series.push_back(
svg_1d_plot_series(
boost::make_transform_iterator(begin, detail::boost_default_convert()),
boost::make_transform_iterator(end, detail::boost_default_convert()),
title)
);
- // For example: my_1d_plot.plot(my_data.begin(), my_data.end(), "My container");
- // my_1d_plot.plot(&my_data[1], &my_data[4], "my_data 1 to 4"); // Add part of data series.
- // Care: last == end which is one past the last, so this only does 1, 2 & 3 - *not* 4!
+ //! For example: my_1d_plot.plot(my_data.begin(), my_data.end(), "My container");
+ //! my_1d_plot.plot(&my_data[1], &my_data[4], "my_data 1 to 4"); // Add part of data series.
+ //! Care: last == end which is one past the last, so this only does 1, 2 & 3 - *not* 4!
return series[series.size() - 1]; // Reference to data series just added.
- }
-
+ }
+
template <class T, class U>
svg_1d_plot_series& svg_1d_plot::plot(const T& begin, const T& end, const std::string& title /* = ""*/, U functor /* = boost_default_convert */)
- { // Add a data series to the plot. (Version with custom functor, rather than to double).
+ { //! Add a data series to the plot, with optional title. (Version with custom functor, rather than to double).
+ /*!
+ Note that this version permits a partial range, begin to end, of the container to be used.
+ Returns a reference to data series just added.
+ */
series.push_back(
svg_1d_plot_series(
boost::make_transform_iterator(container.begin(), functor),
@@ -758,7 +798,11 @@
template <class T, class U>
svg_1d_plot_series& svg_1d_plot::plot(const T& container, const std::string& title /* = "" */, U functor/*= boost_default_convert*/)
- { // Add a data series to the plot. (Version with functor, rather than to double).
+ { //! Add a data series to the plot, with optional title.
+ /*!
+ This version of plot includes a functor, allowing other than just convert data values to double(the default).
+ Returns a reference to data series just added.
+ */
series.push_back(
svg_1d_plot_series(
boost::make_transform_iterator(container.begin(), functor),
Modified: sandbox/SOC/2007/visualization/boost/svg_plot/svg_2d_plot.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/svg_2d_plot.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/svg_2d_plot.hpp 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,7 +1,14 @@
-// svg_2d_plot.hpp
+/*!
+ \file svg_2d_plot.hpp
+ \brief Create 2D plots in Scalable Vector Graphic (SVG) format.
+ \details Provides svg_2d_plot data and function to create plots, and svg_2d_plot_series to allow data values to be added.
+ Very many functions allow fine control of the appearance and layout of plots, data markers and lines.
+ Items common to 1D and 2D use axis_plot_frame.
+ \author Jacob Voytko & Paul A. Bristow
+ */
// Copyright Jacob Voytko 2007
-// Copyright Paul A. Bristow 2007, 2008
+// Copyright Paul A. Bristow 2007, 2008, 2009
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0.
@@ -554,7 +561,7 @@
void set_ids() // This only used once in constructor and should be inlined.
{ // document ids for use in <g id = "PLOT_TITLE".../>
for(int i = 0; i < detail::SVG_PLOT_DOC_CHILDREN; ++i)
- { // Order determines the painting order.
+ { // Order determines the painting order.
image.g(i).id(detail::document_ids[i]);
}
} // void set_ids()
@@ -1077,11 +1084,11 @@
label.precision(y_ticks_.value_precision_);
label.flags(y_ticks_.value_ioflags_); // set ALL IOflags.
label << value; // Example: label.str() == "20" or "0.25" or "1.2e+015"
- if (y_ticks_.strip_e0s_)
- { // Remove unecessary e, +, leadings 0s.
- std::string v = strip_e0s(label.str());
- label.str(v);
- }
+ if (y_ticks_.strip_e0s_)
+ { // Remove unecessary e, +, leadings 0s.
+ std::string v = strip_e0s(label.str());
+ label.str(v);
+ }
double x = 0; // Where to start writing from, at end of left or right tick, if any.
// = 0 is only to avoid unitialised warning.
@@ -1163,9 +1170,9 @@
x = x_right + y_value_label_style_.font_size() * 1.5;
alignment = center_align;
}
- }
- else if (y_ticks_.label_rotation_ == downward)
- { // Tick value label straight down vertically on Y-axis.
+ }
+ else if (y_ticks_.label_rotation_ == downward)
+ { // Tick value label straight down vertically on Y-axis.
y -= y_value_label_style_.font_size() * 0.1;
if (y_ticks_.major_value_labels_side_ < 0)
{ // labels to left, so start a little to left of x_left.
@@ -1178,9 +1185,9 @@
x = x_right + y_value_label_style_.font_size() * 0.7;
alignment = center_align;
}
- }
- else
- { // Others not yet implemented.
+ }
+ else
+ { // Others not yet implemented.
return; // Without any value label.
} // All rotations.
@@ -1747,7 +1754,7 @@
int y_value_ioflags();
svg_2d_plot& y_labels_strip_e0s(bool cmd);
bool y_labels_strip_e0s();
- svg_2d_plot& y_axis_color(const svg_color& col);
+ svg_2d_plot& y_axis_color(const svg_color& col);
svg_color y_axis_color();
svg_2d_plot& y_axis_label_color(const svg_color& col);
svg_color y_axis_label_color();
@@ -2179,7 +2186,7 @@
y_values_style_.df_on_ = b;
return *this;
}
-
+
svg_2d_plot& svg_2d_plot::y_autoscale(double first, double second)
{ // Use Y min & max values to autoscale.
scale_axis(first, second, // double min and max from two doubles.
@@ -2286,7 +2293,7 @@
{
return y_ticks_.num_minor_ticks_;
}
-
+
svg_2d_plot& svg_2d_plot::y_label_axis(const std::string& str)
{ // Set label for Y-axis.
y_label_info_.text(str);
@@ -2354,7 +2361,7 @@
{
return y_ticks_.ticks_on_window_or_axis_;
}
-
+
svg_2d_plot& svg_2d_plot::y_major_value_labels_side(int is)
{ // Label values side for major ticks left -1, (right +1 or none 0).
y_ticks_.major_value_labels_side_ = is;
@@ -2562,7 +2569,7 @@
write(fout); // Using the ostream version.
return *this;
}
-
+
template <class T>
svg_2d_plot_series& svg_2d_plot::plot(const T& container, const std::string& title)
{ // Version converting to double.
Modified: sandbox/SOC/2007/visualization/boost/svg_plot/svg_boxplot.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/svg_boxplot.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/svg_boxplot.hpp 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,4 +1,22 @@
-// svg_boxplot.hpp
+/*!
+ \file svg_boxplot.hpp
+ \brief Create box plots in Scalable Vector Graphic (SVG) format.
+ \details Provides svg_boxplot data and function to create plots, and svg_boxplot_series to allow data values to be added.
+ Very many functions allow fine control of the appearance and layout of plots and data markers.
+ Items common to 1D, 2D and boxplot use axis_plot_frame.
+ A convenient way of graphically depicting groups of numerical data through their five-number summaries.
+ Show 1st quartile, median and 3rd quartile as a box.
+ http://en.wikipedia.org/wiki/Boxplot
+
+ Some Implementations of the Boxplot
+ Michael Frigge, David C. Hoaglin and Boris Iglewicz
+ The American Statistician, Vol. 43, No. 1 (Feb., 1989), pp. 50-54
+
+ See also : The Bagplot: A Bivariate Boxplot
+ Peter J. Rousseeuw, Ida Ruts and John W. Tukey
+ The American Statistician, Vol. 53, No. 4 (Nov., 1999), pp. 382-387
+ \author Jacob Voytko & Paul A. Bristow
+ */
// Copyright Jacob Voytko 2007
// Copyright Paul A. Bristow 2008
@@ -8,20 +26,6 @@
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
-// Producing Boxplots as Scalable Vector Graphics.
-
-// A convenient way of graphically depicting groups of numerical data through their five-number summaries.
-// Show 1st quartile, median and 3rd quartile as a box.
-// http://en.wikipedia.org/wiki/Boxplot
-
-// Some Implementations of the Boxplot
-// Michael Frigge, David C. Hoaglin and Boris Iglewicz
-// The American Statistician, Vol. 43, No. 1 (Feb., 1989), pp. 50-54
-
-// See also : The Bagplot: A Bivariate Boxplot
-// Peter J. Rousseeuw, Ida Ruts and John W. Tukey
-// The American Statistician, Vol. 53, No. 4 (Nov., 1999), pp. 382-387
-
#ifndef BOOST_SVG_SVG_BOXPLOT_HPP
#define BOOST_SVG_SVG_BOXPLOT_HPP
@@ -29,8 +33,8 @@
#if defined (BOOST_MSVC)
# pragma warning(push)
-# pragma warning(disable: 4512) // "assignment operator could not be generated."
-# pragma warning(disable: 4127) // "conditional expression is constant."
+# pragma warning(disable: 4512) // assignment operator could not be generated.
+# pragma warning(disable: 4127) // conditional expression is constant.
#endif
#include "svg.hpp"
@@ -39,7 +43,7 @@
#include "detail/svg_boxplot_detail.hpp"
#include "detail/functors.hpp"
#include "detail/axis_plot_frame.hpp"
-#include "detail/auto_axes.hpp" //
+#include "detail/auto_axes.hpp" //
#include "quantile.hpp"
#include <vector>
@@ -86,17 +90,17 @@
// For example, string title_, but set with title("my title") and get with title().
class svg_boxplot_series
- { // Class holding information about a data series to be boxplotted.
+ { //! \class svg_boxplot_series Information about a data series to be boxplotted.
public: // TODO private?
- std::vector<double> series_;
- double whisker_min_;
+ std::vector<double> series_; //!< Data series for the boxplot.
+ double whisker_min_; //!<
double whisker_max_;
- int quartile_definition_; // The definition of the quartile can be selected.
- double q1_; // 1st lower quartile.
- double median_; // 2nd middle quartile.
- double q3_; // 3rd upper quartile.
- std::vector<double> outliers_;
- std::vector<double> extreme_outliers_;
+ int quartile_definition_; //!< The definition of the quartile can be selected.
+ double q1_; //!< 1st lower quartile.
+ double median_; //!< 2nd middle quartile.
+ double q3_; //!< 3rd upper quartile.
+ std::vector<double> outliers_; //!< Any data values that are judged outliers.
+ std::vector<double> extreme_outliers_;//!< Any data values that are judged extreme outliers.
// std::string title_;
text_style series_style_;
@@ -120,11 +124,11 @@
bool outlier_values_on_;
bool extreme_outlier_values_on_;
- template <class T> // T is data container type.
+ template <class T> // T is data container type.
svg_boxplot_series( // Constructor.
T begin, T end, // Data container.
const std::string& title, // Data series title.
- double bw,// box width
+ double bw,// box width
svg_style bs, // box style
svg_style ms, // median marker style
svg_style as, // axis style
@@ -136,11 +140,11 @@
int q_def, // Quartile definition H&F #
value_style vs, // Style for optional display of data point values.
text_style ss // series style (font etc) for box labels.
- )
+ )
// All other parameters can also be added using chainable functions.
- : //
- box_width_(bw), // svg_boxplot::box_width()),
- box_style_(bs), // green, azure, 1), // stroke, fill, width, 1, true, true, margin, border_on, fill_on
+ : //
+ box_width_(bw), // svg_boxplot::box_width()),
+ box_style_(bs), // green, azure, 1), // stroke, fill, width, 1, true, true, margin, border_on, fill_on
median_style_(ms), // blue, blank, 1),
axis_style_(as), // black, blank, 1),
whisker_length_(wl), // 30),
@@ -175,26 +179,28 @@
void calculate_quantiles()
{
median_ = median(series_);
- // Divide sorted data set into four equal parts, called quartiles,
- // so each part represent 1/4th of the sampled population.
-
- // "Some Implementations of the Boxplot"
- // Michael Frigge, David C. Hoaglin and Boris Iglewicz
- // The American Statistician, Vol. 43, No. 1 (Feb., 1989), pp. 50-54
- // Tukey, J. W. Exploratory Data Analysis, Addison Wesley (1977, p 33)
+ //! Divide sorted data set into four equal parts, called quartiles,
+ //! so each part represent 1/4th of the sampled population.
- // x[1] .. x[n] == series[0] ... series[n - 1]
- // q1_ = (1 - g) * x[j] + g * [j+1];
+ /*! "Some Implementations of the Boxplot"
+ Michael Frigge, David C. Hoaglin and Boris Iglewicz
+ The American Statistician, Vol. 43, No. 1 (Feb., 1989), pp. 50-54
+ Tukey, J. W. Exploratory Data Analysis, Addison Wesley (1977, p 33)
+
+ x[1] .. x[n] == series[0] ... series[n - 1]
+ q1_ = (1 - g) * x[j] + g * [j+1];
+ */
q1_ = quantile(series_, 0.25, quartile_definition_);
q3_ = quantile(series_, 0.75, quartile_definition_);
- // Fences (beyond which lie outliers) are at q1 - k * (q3 - q1) and q3 - k * (q3 - q1)
- // commonly k = 1.5, but can be 2.
- // Extreme outlier usually use k = 3.
+ /*! Fences (beyond which lie outliers) are at q1 - k * (q3 - q1) and q3 - k * (q3 - q1)
+ commonly k = 1.5, but can be 2.
+ Extreme outlier usually use k = 3.
+ */
//std::cout << "Definition #" << quartile_definition_ << ", q1 " << q1_ << ", median " << median_ << ", q3 " << q3_ << ", IQR " << q3_ - q1_ << std::endl;
- double iqr(q3_ - q1_); // Interquartile range.
+ double iqr(q3_ - q1_); //! Interquartile range.
const double k_outlier = 1.5; // 2. also used.
const double k_extreme_outlier = 3.;
@@ -203,12 +209,12 @@
double min_ext_cutoff = q1_ - k_extreme_outlier * iqr;
double max_ext_cutoff = q3_ + k_extreme_outlier * iqr;
- std::cout << "Min outlier fences <" << min_cutoff << " or >" << max_cutoff << std::endl;
- std::cout << "Min extreme fences <" << min_ext_cutoff << " or >" << max_ext_cutoff << std::endl;
+ //std::cout << "Min outlier fences <" << min_cutoff << " or >" << max_cutoff << std::endl;
+ //std::cout << "Min extreme fences <" << min_ext_cutoff << " or >" << max_ext_cutoff << std::endl;
std::vector<double>::const_iterator i;
for(i = series_.begin(); *i < min_cutoff; ++i)
- { // Separate any minimum outliers and extreme outliers.
+ { //! Separate any minimum outliers and extreme outliers.
if(*i < min_ext_cutoff)
{
extreme_outliers_.push_back(*i);
@@ -222,7 +228,7 @@
whisker_min_ = *i;
std::vector<double>::const_reverse_iterator j;
for(j = series_.rbegin(); *j > max_cutoff; ++j)
- { // Separate any maximum outliers and extreme outliers.
+ { //! Separate any maximum outliers and extreme outliers.
if(*j > max_ext_cutoff)
{
extreme_outliers_.push_back(*j);
@@ -238,78 +244,78 @@
// Set member functions for the boxplot data series class.
// (Note identically names functions are provided for the boxplot class).
- svg_boxplot_series& title(const std::string& t);
- const std::string title();
- svg_boxplot_series& whisker_length(double l); // Length of whisker line.
- double whisker_length();// Length of whisker.
- svg_boxplot_series& box_width(double l); // Width of box.
- double box_width(); // Width of box.
- svg_boxplot_series& min_whisker_color(const svg_color& col); // Color of whisker.
- svg_color min_whisker_color(); // Color of whisker.
- svg_boxplot_series& min_whisker_width(double l); // Width of whisker line.
- double min_whisker_width(); // Width of whisker line.
+ svg_boxplot_series& title(const std::string& t); //! Set title for data series.
+ const std::string title(); //! Get title for boxplot.
+ svg_boxplot_series& whisker_length(double l); //! Set length of whisker line.
+ double whisker_length(); //! Get length of whisker line.
+ svg_boxplot_series& box_width(double l); //! Set width of box.
+ double box_width(); //! Get width of box.
+ svg_boxplot_series& min_whisker_color(const svg_color& col); //! Color of boxplot whisker.
+ svg_color min_whisker_color(); //! Get color of boxplot whisker.
+ svg_boxplot_series& min_whisker_width(double l); //! Set width of whisker line.
+ double min_whisker_width(); //! Get width of whisker line.
svg_boxplot_series& max_whisker_color(const svg_color& col); // Color of whisker.
- svg_color max_whisker_color(); // Color of whisker.
- svg_boxplot_series& max_whisker_width(double l); // Width of whisker line.
- double max_whisker_width(); // Width of whisker line.
- svg_boxplot_series& box_fill(const svg_color& color); // Color of box fill, not border.
- svg_color box_fill(); // Color of box fill, not border.
- svg_boxplot_series& box_border(const svg_color& color); // Color of border (not fill) to box.
- svg_color box_border(); // Color of border (not fill) to box.
-
- svg_boxplot_series& median_color(const svg_color& color); // Color of median line in box.
- svg_color median_color(); // Color of median line in box.
- svg_boxplot_series& median_width(double l); // Width of median line in box.
- double median_width(); // Width of median line in box.
-
- svg_boxplot_series& axis_color(const svg_color& color); // Color of vertical axis whisker line in box.
- svg_color axis_color(); // Color of vertical axis whisker line in box.
- svg_boxplot_series& axis_width(double l); // Width of vertical axis whisker line in box.
- double axis_width(); // Width of vertical axis whisker line in box.
-
- svg_style& svg_boxplot_series::box_style();
- svg_boxplot_series& box_style(svg_style& bs);
- svg_style& median_style();
- svg_boxplot_series& median_style(svg_style& ms);
+ svg_color max_whisker_color(); //! Color of whisker.
+ svg_boxplot_series& max_whisker_width(double l); //! Width of whisker line.
+ double max_whisker_width(); //! Width of whisker line.
+ svg_boxplot_series& box_fill(const svg_color& color); //! Color of box fill, not border.
+ svg_color box_fill(); //! Color of box fill, not border.
+ svg_boxplot_series& box_border(const svg_color& color); //! Color of border (not fill) to box.
+ svg_color box_border(); //! Color of border (not fill) to box.
+
+ svg_boxplot_series& median_color(const svg_color& color); //! Color of median line in box.
+ svg_color median_color(); //! Color of median line in box.
+ svg_boxplot_series& median_width(double l); //! Width of median line in box.
+ double median_width(); //! Width of median line in box.
+
+ svg_boxplot_series& axis_color(const svg_color& color); //! Color of vertical axis whisker line in box.
+ svg_color axis_color(); //! Color of vertical axis whisker line in box.
+ svg_boxplot_series& axis_width(double l); //! Width of vertical axis whisker line in box.
+ double axis_width(); //! Get width of vertical axis whisker line in box.
+
+ svg_style& box_style(); //! Get reference to style of box.
+ svg_boxplot_series& box_style(svg_style& bs); //! Set reference to style of box.
- plot_point_style& outlier_style();
- svg_boxplot_series& outlier_style(plot_point_style& os);
+ svg_style& median_style(); //! Get reference to style of median marker line.
+ svg_boxplot_series& median_style(svg_style& ms);
+ plot_point_style& outlier_style(); //! Get reference to style of outlier marker line.
+ svg_boxplot_series& outlier_style(plot_point_style& os); //! Set reference to style of outlier marker line.
- svg_boxplot_series& outlier_color(const svg_color& color); // Color of outlier marker.
- svg_color outlier_color(); // Color of outlier marker.
- svg_boxplot_series& outlier_fill(const svg_color& color); // Fill color of outlier marker.
- svg_color outlier_fill(); // Fill color of outlier marker.
- svg_boxplot_series& extreme_outlier_color(const svg_color& color); // Color of extreme outlier marker.
- svg_color extreme_outlier_color(); // Color of extreme outlier marker.
- svg_boxplot_series& extreme_outlier_fill(const svg_color& color); // Color of extreme outlier marker.
- svg_color extreme_outlier_fill(); // Color of extreme outlier marker.
- svg_boxplot_series& outlier_shape(point_shape shape); // Shape of outlier marker.
- point_shape outlier_shape(); // Shape of outlier marker.
- svg_boxplot_series& svg_boxplot_series::outlier_size(int size); // Size of outlier marker.
- int svg_boxplot_series::outlier_size(); // Size of outlier marker.
- svg_boxplot_series& extreme_outlier_shape(point_shape shape); // Shape of extreme outlier marker.
- point_shape extreme_outlier_shape(); // Shape of extreme outlier marker.
- svg_boxplot_series& svg_boxplot_series::extreme_outlier_size(int size); // Size of extreme outlier marker.
- int svg_boxplot_series::extreme_outlier_size(); // Size of extreme outlier marker.
+ svg_boxplot_series& outlier_color(const svg_color& color); //! Set color of outlier marker.
+ svg_color outlier_color(); //! Get color of outlier marker.
+ svg_boxplot_series& outlier_fill(const svg_color& color); //! Set fill color of outlier marker.
+ svg_color outlier_fill(); //! Get fill color of outlier marker.
+ svg_boxplot_series& extreme_outlier_color(const svg_color& color); //! Set color of extreme outlier marker.
+ svg_color extreme_outlier_color(); //! Get color of extreme outlier marker.
+ svg_boxplot_series& extreme_outlier_fill(const svg_color& color); //! Set color of extreme outlier marker.
+ svg_color extreme_outlier_fill(); // Get color of extreme outlier marker.
+ svg_boxplot_series& outlier_shape(point_shape shape); //! Set shape of outlier marker.
+ point_shape outlier_shape(); //! Get shape of outlier marker.
+ svg_boxplot_series& outlier_size(int size); //! Set size of outlier marker.
+ int outlier_size(); //! Get size of outlier marker.
+ svg_boxplot_series& extreme_outlier_shape(point_shape shape); //! Shape of extreme outlier marker. !
+ point_shape extreme_outlier_shape(); //! Get shape of extreme outlier marker.
+ svg_boxplot_series& extreme_outlier_size(int size); //! Size of extreme outlier marker.
+ int extreme_outlier_size(); //! Get size of extreme outlier marker.
// Not implemented yet - settings are boxplot wide.
//svg_boxplot_series& outlier_values_on(bool cmd);// If values to be shown alongside outlier markers.
//bool outlier_values_on(); // If values to be shown alongside outlier markers.
//svg_boxplot_series& extreme_outlier_values_on(bool cmd); // If values to be shown alongside extreme outlier markers.
//bool extreme_outlier_values_on(); // If values to be shown alongside extreme outlier markers.
- svg_boxplot_series& svg_boxplot_series::quartile_definition(int def); // H&F quartile definition.
- int svg_boxplot_series::quartile_definition(); // H&F quartile definition.
+ svg_boxplot_series& quartile_definition(int def); //! Set H&F quartile definition.
+ int quartile_definition(); //! Get H&F quartile definition.
}; // struct svg_boxplot_series
- // svg_boxplot_series *Definitions* ready to go into separate file.
+ // svg_boxplot_series *Definitions* ready to go into separate *.ipp file.
const std::string svg_boxplot_series::title()
- { // Title of data series.
+ { //! Get title of a data series.
return series_info_.text();
}
svg_boxplot_series& svg_boxplot_series::title(const std::string& t)
- { // Title of data series.
+ { //! Set title of a data series.
series_info_.text(t);
return *this; // Chainable.
}
@@ -371,8 +377,8 @@
double svg_boxplot_series::box_width()
{ // width of the box, not the margin.
return box_width_;
- }
-
+ }
+
svg_boxplot_series& svg_boxplot_series::box_width(double l)
{ // width of the box, not the margin.
box_width_ = l;
@@ -385,7 +391,7 @@
}
svg_boxplot_series& svg_boxplot_series::box_style(svg_style& bs)
- {
+ {
box_style_ = bs;
return *this; // Chainable.
}
@@ -396,13 +402,13 @@
}
svg_boxplot_series& svg_boxplot_series::median_style(svg_style& ms)
- {
+ {
median_style_ = ms;
return *this; // Chainable.
}
svg_boxplot_series& svg_boxplot_series::outlier_style(plot_point_style& os)
- {
+ {
mild_outlier_ = os;
return *this; // Chainable.
}
@@ -413,24 +419,24 @@
}
svg_boxplot_series& svg_boxplot_series::box_fill(const svg_color& color)
- { // Color of box fill, not border.
+ { // Color of box fill, not border.
box_style_.fill_color(color);
return *this; // Chainable.
}
svg_color svg_boxplot_series::box_fill()
- { // Color of box fill, not border.
+ { // Color of box fill, not border.
return box_style_.fill_color();
}
svg_boxplot_series& svg_boxplot_series::box_border(const svg_color& color)
- { // Color of box fill, not border.
+ { // Color of box fill, not border.
box_style_.stroke_color(color);
return *this; // Chainable.
}
svg_color svg_boxplot_series::box_border()
- { // Color of box fill, not border.
+ { // Color of box fill, not border.
return box_style_.stroke_color();
}
@@ -554,7 +560,7 @@
{ // Shape of extreme outlier marker.
return ext_outlier_.shape_ ;
}
-
+
svg_boxplot_series& svg_boxplot_series::extreme_outlier_size(int size)
{ // Size of extreme outlier marker.
ext_outlier_.size_ = size;
@@ -614,12 +620,12 @@
svg image; // Stored so as to avoid rewriting style information constantly.
// image.image_size(500, 500);
- double x_scale_; // Used by function transform()
- double x_shift_; // to go from Cartesian to SVG coordinates.
- double y_scale_; // SVG coordinates origin is at top left,
- double y_shift_; // and y coordinates increase DOWN the page!
+ double x_scale_; //! Used by function transform()
+ double x_shift_; //! to go from Cartesian to SVG coordinates.
+ double y_scale_; //! SVG coordinates origin is at top left,
+ double y_shift_; //! and y coordinates increase DOWN the page!
- double x_axis_position_;
+ double x_axis_position_;
double y_axis_position_;
// Plot window.
@@ -685,7 +691,7 @@
double text_margin_; // Marginal space around text items like title,
// text_margin_ * font_size to get distance in svg units.
- bool title_on_;
+ bool title_on_;
std::string plot_window_clip_;
bool plot_window_on_;
@@ -718,7 +724,7 @@
svg_boxplot()
:
- title_style_(18, "Verdana", "", "", "", ""),
+ title_style_(18, "Verdana", "", "", "", ""),
value_style_(10, "Verdana", "", "", "", ""), // Data values
title_info_(0, 0, "", title_style_, center_align, horizontal),
title_on_(true),
@@ -728,7 +734,7 @@
y_units_info_(0, 0, "", y_axis_label_style_, center_align, upward),
x_axis_(X, -10., +10., black, 1, 0, true, false, true),
y_axis_(Y, 0., +1., black, 1, 0, true, false, true),
- x_axis_label_style_(14, "Verdana", "", ""),
+ x_axis_label_style_(14, "Verdana", "", ""),
x_value_label_style_(12, "Verdana", "", ""),
y_axis_label_style_(14, "Verdana", "", ""),
y_value_label_style_(12, "Verdana", "", ""),
@@ -773,10 +779,10 @@
// Box'n'whiskers default values (used in svg_boxplot_series construction)
// Can be changed for all plots using svg_boxplot member functions.
// Can be changed for individual data series using svg_boxplot_series member functions.
- box_width_(30), // can be changed with svg_boxplot::box_width()),
+ box_width_(30), // can be changed with svg_boxplot::box_width()),
series_style_(x_axis_label_style_), // want to use the x_label style here
whisker_length_(30),
- box_style_(green, azure, 1), // stroke, fill, width, 1, true, true, margin, border_on, fill_on
+ box_style_(green, azure, 1), // stroke, fill, width, 1, true, true, margin, border_on, fill_on
median_style_(blue, blank, 1),
axis_style_(black, blank, 1),
min_whisker_style_(magenta, black, 1),
@@ -797,7 +803,7 @@
// void set_ids() // This only used once in constructor and IS now inlined.
// document ids for use in <g id = "PLOT_TITLE".../>
for(int i = 0; i < boxplot::BOXPLOT_DOC_CHILDREN; ++i)
- { // Order determines the painting order.
+ { // Order determines the painting order.
image.g(i).id(boxplot::document_ids[i]);
}
@@ -835,7 +841,7 @@
image.g(boxplot::MEDIAN).style().stroke_color(red).stroke_width(2);
image.g(boxplot::EXTREME_OUTLIERS).style().stroke_color(purple).fill_color(white);
image.g(boxplot::MILD_OUTLIERS).style().stroke_color(pink).fill_color(black);
- image.g(boxplot::DATA_VALUE_LABELS).style().fill_color(black).stroke_on(false);
+ image.g(boxplot::DATA_VALUE_LABELS).style().fill_color(black).stroke_on(false);
} // boxplot constructor.
@@ -950,10 +956,10 @@
}
}
if (longest == 0)
- {
+ {
std::cout << "No X-axis labels!" << std::endl;
// No labels provided so switch off labelling.
- x_ticks_.major_value_labels_side_ = 0;
+ x_ticks_.major_value_labels_side_ = 0;
}
x_ticks_.label_max_length_ = longest;
@@ -1081,7 +1087,7 @@
}
//else
// for boxplot, Y-axis is always to right or left.
- //{
+ //{
// x_axis_position_ = x_intersects_y;
// // Calculate below after transform is calculated.
//}
@@ -1098,7 +1104,7 @@
std::cout << "plot window top " << plot_top_ << ", bottom " << plot_bottom_ << std::endl;
throw std::runtime_error("Plot window top >= bottom!");
}
-
+
// Calculate scale and shift factors for transform from Cartesian to plot.
// SVG image is 0, 0 at top left,y increase *downwards*
// Cartesian 0, 0 at bottom left, y increasing upwards.
@@ -1161,7 +1167,7 @@
{ // horizontal line at y = 0
double y(0.);
transform_y(y);
- //x_axis_. = y;
+ //x_axis_. = y;
image.g(boxplot::X_AXIS).line(plot_left_, y, plot_right_, y);
}
}
@@ -1169,7 +1175,7 @@
for(size_t i = 0; i < series.size(); ++i)
{ // Draw a ticks for each series, evenly spaced along X axis.
draw_x_major_tick(
- plot_left_ + (plot_right_- plot_left_) *
+ plot_left_ + (plot_right_- plot_left_) *
((double)(i + 1)) / (double)(series.size() + 1),
major_tick_path, series[i].series_info_);
}
@@ -1228,7 +1234,7 @@
double x_left = i;
double y_top = plot_bottom_; // Top of tick.
if (x_ticks_.up_ticks_on_)
- { //
+ { //
y_top -= (std::max)(x_ticks_.major_tick_length_, x_ticks_.minor_tick_length_);
}
double y_bottom = plot_bottom_;
@@ -1316,11 +1322,11 @@
label.precision(y_ticks_.value_precision_);
label.flags(y_ticks_.value_ioflags_); // set ALL IOflags.
label << value; // Example: label.str() == "20" or "0.25" or "1.2e+015"
- if (y_ticks_.strip_e0s_)
- { // Remove unecessary e, +, leadings 0s.
- std::string v = strip_e0s(label.str());
- label.str(v);
- }
+ if (y_ticks_.strip_e0s_)
+ { // Remove unecessary e, +, leadings 0s.
+ std::string v = strip_e0s(label.str());
+ label.str(v);
+ }
double x = 0; // Where to start writing from, at end of left or right tick, if any.
// = 0 is only to avoid unitialised warning.
@@ -1402,9 +1408,9 @@
x = x_right + y_value_label_style_.font_size() * 1.5;
alignment = center_align;
}
- }
- else if (y_ticks_.label_rotation_ == downward)
- { // Tick value label straight down vertically on Y-axis.
+ }
+ else if (y_ticks_.label_rotation_ == downward)
+ { // Tick value label straight down vertically on Y-axis.
y -= y_value_label_style_.font_size() * 0.1;
if (y_ticks_.major_value_labels_side_ < 0)
{ // labels to left, so start a little to left of x_left.
@@ -1417,9 +1423,9 @@
x = x_right + y_value_label_style_.font_size() * 0.7;
alignment = center_align;
}
- }
- else
- { // Others not yet implemented.
+ }
+ else
+ { // Others not yet implemented.
return; // Without any value label.
} // All rotations.
if (x <= 0)
@@ -1554,7 +1560,7 @@
( // x position relative to the x-axis which is middle of plot window.
plot_right_ + plot_left_) / 2, // x coordinate - middle.
y, // Down from plot window.
- label,
+ label,
x_label_info_.style(),
center_align, horizontal)
);
@@ -1724,7 +1730,7 @@
}
// Clip elements to prevent any ouliers outside the plot window being shown.
- // But actually it may chop them in half!
+ // But actually it may chop them in half!
g_mild_ptr.clip_id(plot_window_clip_);
g_ext_ptr.clip_id(plot_window_clip_);
} // void draw_outliers
@@ -1735,7 +1741,7 @@
// const here causes trouble
// Need to calculate quartiles here to permit individual plot quartile_definition.
- series.calculate_quantiles();
+ series.calculate_quantiles();
draw_whiskers(series.whisker_min_, series.whisker_max_,
series.whisker_length_, x_offset,
@@ -1807,9 +1813,9 @@
// Declarations of user boxplot functions.
- svg_boxplot& write(const std::string& file); // Write SVG plot to file.
- svg_boxplot& write(std::ostream& s_out); // Write SVG plot to ostream.
- svg_boxplot& title_on(bool cmd); // If to include title in plot.
+ svg_boxplot& write(const std::string& file); //! Write SVG boxplot to file.
+ svg_boxplot& write(std::ostream& s_out); //! Write SVG boxplot to ostream.
+ svg_boxplot& title_on(bool cmd); //! true if to include title in plot.
svg_boxplot& x_label_on(bool cmd);
svg_boxplot& median_values_on(bool cmd);
bool median_values_on();
@@ -1829,7 +1835,7 @@
svg_boxplot& plot_background_color(const svg_color& col);
svg_boxplot& plot_border_color(const svg_color& col);
svg_boxplot& y_range(double min_y, double max_y);
- std::pair<double, double> svg_boxplot::y_range();
+ std::pair<double, double> y_range();
svg_boxplot& y_label(const std::string& str);
svg_boxplot& image_size(unsigned int x, unsigned int y);
svg_boxplot& y_label_font_size(unsigned int size);
@@ -1876,8 +1882,8 @@
double x_axis_position(); // Position of the horizontal X-axis line (on the border).
svg_boxplot& y_axis_position(int pos); // Position of the vertical Y-axis line (on the border).
double y_axis_position(); // Position of the vertical Y-axis line (on the border).
- svg_boxplot& box_fill(const svg_color& color); // Color of box fill, not border.
- svg_color box_fill(); // Color of box fill, not border.
+ svg_boxplot& box_fill(const svg_color& color); // Color of box fill, not border.
+ svg_color box_fill(); // Color of box fill, not border.
svg_boxplot& box_border(const svg_color& color); // Color of border (not fill) to box.
svg_color box_border(); // Color of border (not fill) to box.
svg_boxplot& median_color(const svg_color& color); // Color of median line in box.
@@ -1886,8 +1892,8 @@
double median_width(); // Width of median line in box.
svg_boxplot& axis_color(const svg_color& color);
svg_color axis_color(); // Color of median line in box.
- svg_boxplot& axis_width(double l); // Width of vertical whisker axis line in box.
- double axis_width(); // Width of vertical whisker axis line in box.
+ svg_boxplot& axis_width(double l); // Width of vertical whisker axis line in box.
+ double axis_width(); // Width of vertical whisker axis line in box.
plot_point_style& outlier_style();
svg_boxplot& outlier_style(plot_point_style& os);
@@ -1913,15 +1919,15 @@
svg_boxplot& extreme_outlier_size(int size); // Size of extreme outlier marker.
int extreme_outlier_size(); // Size of extreme outlier marker.
- svg_boxplot& svg_boxplot::quartile_definition(int def); // H&F quartile definition.
- int svg_boxplot::quartile_definition(); // H&F quartile definition.
+ svg_boxplot& quartile_definition(int def); // H&F quartile definition.
+ int quartile_definition(); // H&F quartile definition.
- bool svg_boxplot::y_autoscale(); // If to use y_autoscaled values.
- svg_boxplot& svg_boxplot::y_autoscale(bool b); // If to use y_autoscaled values.
+ bool y_autoscale(); // If to use y_autoscaled values.
+ svg_boxplot& y_autoscale(bool b); // If to use y_autoscaled values.
- svg_boxplot& svg_boxplot::y_autoscale(double first, double second);// Autoscale using two doubles.
+ svg_boxplot& y_autoscale(double first, double second);// Autoscale using two doubles.
- svg_boxplot& svg_boxplot::y_autoscale(std::pair<double, double> p); // Autoscale using minmax pair of doubles.
+ svg_boxplot& y_autoscale(std::pair<double, double> p); // Autoscale using minmax pair of doubles.
template <class T> // T an STL container: array, vector ...
svg_boxplot& y_autoscale(const T& begin, const T& end); // Autoscale using iterators into container.
@@ -2119,7 +2125,7 @@
}
svg_boxplot& svg_boxplot::plot_background_color(const svg_color& col)
- { // Plot Window "plotBackground"
+ { // Plot Window "plotBackground"
image.g(boxplot::PLOT_WINDOW_BACKGROUND).style().fill_color(col);
return *this;
}
@@ -2140,7 +2146,6 @@
{
throw std::runtime_error("Y range: max not finite!");
}
-
if(max_y <= min_y)
{ // max <= min.
throw std::runtime_error("Y range: y max <= y min!");
@@ -2156,7 +2161,7 @@
} // svg_boxplot& y_range(double y1, double y2)
std::pair<double, double> svg_boxplot::y_range()
- {
+ { //! Set y_range using a pair of doubles.
std::pair<double, double> r;
r.first = y_axis_.min_;
r.second = y_axis_.max_;
@@ -2261,7 +2266,7 @@
{
y_ticks_.minor_tick_length_ = length;
return *this;
- }
+ }
svg_boxplot& svg_boxplot::y_num_minor_ticks(unsigned int num)
{
@@ -2390,29 +2395,29 @@
}
svg_boxplot& svg_boxplot::box_fill(const svg_color& color)
- { // Color of box fill, not border.
+ { // Color of box fill, not border.
box_style_.fill_color(color);
return *this; // Chainable.
}
svg_color svg_boxplot::box_fill()
- { // Color of box fill, not border.
+ { // Color of box fill, not border.
return box_style_.fill_color();
}
svg_boxplot& svg_boxplot::box_border(const svg_color& color)
- { // Color of box fill, not border.
+ { // Color of box fill, not border.
box_style_.stroke_color(color);
return *this; // Chainable.
}
svg_color svg_boxplot::box_border()
- { // Color of box fill, not border.
+ { // Color of box fill, not border.
return box_style_.stroke_color();
}
svg_boxplot& svg_boxplot::median_color(const svg_color& color)
- { // Color of median line in box.
+ { // Color of median line in box.
median_style_.stroke_color(color);
return *this; // Chainable.
}
@@ -2434,7 +2439,7 @@
}
svg_boxplot& svg_boxplot::axis_color(const svg_color& color)
- { // Color of vertical whisker axis line in box.
+ { // Color of vertical whisker axis line in box.
axis_style_.stroke_color(color);
return *this; // Chainable.
}
@@ -2545,7 +2550,7 @@
}
svg_boxplot& svg_boxplot::quartile_definition(int def)
- { // Size of extreme outlier marker.
+ { //! Set size of extreme outlier marker.
quartile_definition_ = def;
return *this; // Chainable.
}
@@ -2606,7 +2611,7 @@
y_include_zero_, y_tight_, y_min_ticks_, y_steps_);
y_autoscale_ = true; // Change (from default false) to use calculated values.
return *this; // Make chainable.
- } // y_autoscale(const T& container)
+ } // y_autoscale(const T& container)
#if defined (BOOST_MSVC)
Modified: sandbox/SOC/2007/visualization/boost/svg_plot/svg_color.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/svg_color.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/svg_color.hpp 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,5 +1,8 @@
-// svg_color.hpp
-
+/*!
+ \file svg_color.hpp
+ \brief SVG standard names of colors, and functions to create and output colors.
+ \author Jacob Voytko & Paul A. Bristow
+*/
// Copyright Jacob Voytko 2007
// Copyright Paul A. Bristow 2007
//
@@ -11,6 +14,8 @@
#ifndef BOOST_SVG_SVG_COLOR_HPP
#define BOOST_SVG_SVG_COLOR_HPP
+#include <boost/assert.hpp>
+
#include <ostream>
// using std::ostream
@@ -18,16 +23,16 @@
{
namespace svg
{
-
- // -----------------------------------------------------------------
- // Deals with colors that have special names. The reason that the
- // underscore separator convention does not match the normal Boost format
- // is that these names that are specified by the SVG standard.
- // http://www.w3.org/TR/SVG/types.html#ColorKeywords
- // tan is also renamed to tanned to avoid clash with function tan in math.h
- // -----------------------------------------------------------------
+ /*!
+ \brief Colors that have SVG standard special names.
+ \details The reason that the underscore separator convention does not match
+ the normal Boost format is that these names that are specified by the SVG standard.
+ http://www.w3.org/TR/SVG/types.html#ColorKeywords
+ tan is also renamed to tanned to avoid clash with function tan in math.h.
+ */
enum svg_color_constant
- {
+ { //! \enum svg_color_constant SVG standard names for some colors.
+ //! See http://www.w3.org/TR/SVG/types.html#ColorKeywords
aliceblue, antiquewhite, aqua, aquamarine, azure, beige,
bisque, black, blanchedalmond, blue, blueviolet, brown,
burlywood, cadetblue, chartreuse, chocolate, coral,
@@ -76,48 +81,54 @@
// --------------------------------------------------------------------
struct svg_color
- {
+ { //!
friend std::ostream& operator<< (std::ostream& os, const svg_color& rhs);
- unsigned char r; // unsigned char provides range [0 to 255].
+ unsigned char r; //!< unsigned char provides range [0 to 255].
unsigned char g;
unsigned char b;
bool is_blank; // true means "Not to be displayed" a 'pseudo-color'.
// If true should display & write as "none".
svg_color(int red, int green, int blue) : is_blank(false)
- { // Constrain rgb to [0 .. 255]
+ { //! \brief Construct a color from RGB values.
+ /*! \details Constrain rgb to [0 .. 255].
+ Default is to construct a blank 'pseudo-color'.
+ */
+
red = ( red < 0 ) ? 0 : red;
green = ( green < 0 ) ? 0 : green;
blue = ( blue < 0 ) ? 0 : blue;
r = (unsigned char)(( red > 255 ) ? 255 : red);
g = (unsigned char)(( green > 255 ) ? 255 : green);
b = (unsigned char)(( blue > 255 ) ? 255 : blue);
- }
+ } // svg_color(int red, int green, int blue)
svg_color(bool is) : is_blank(!is)
- { // Constructor from bool permits svg_color my_blank(false) as a (non-)color.
- // with same effect as svg_color my_blank(blank);
- // color is set to zeros (black) rather than undefined.
- // my_blank(true) also set color to default (black), but is_blank is false,
- // so effect is same as svg_color my_blank(black).
-
- //// So plot.area_fill(true) will be a blank == no fill!
- //// So plot.area_fill(false) will be a default(black) fill!
- //// This is somewhat counter-intuitive!
- //// NOw changed - svg_color(true) means default (black?)
- //// svg_color(false) means blank
- r = 0; // Safer to assign *some* value to rgb: zero, or 255 or something
- g = 0; // rather than leaving them random?
+ { //! Constructor from bool permits svg_color my_blank(false) as a (non-)color.
+ /*! \details with same effect as svg_color my_blank(blank);
+ color is set to zeros (black) rather than undefined.
+ my_blank(true) also set color to default (black), but is_blank is false,
+ so effect is same as svg_color my_blank(black).
+
+ This is somewhat counter-intuitive!
+ Now changed - svg_color(true) means default (black?)
+ svg_color(false) means blank.
+ For example:
+ plot.area_fill(false) will be a blank == no fill.
+ plot.area_fill(true) will be a default(black) fill.
+ */
+ r = 0; // Safer to assign *some* value to rgb: zero, or 255 or something,
+ g = 0; // rather than leaving them random.
b = 0; // Default 'blank' color 0,0,0 is black.
} // svg_color(bool is)
- svg_color(svg_color_constant col) // : is_blank(false)
- { // Set a color, including blank.
+ svg_color(svg_color_constant col)
+ { //! Set a color, including blank.
if (col == blank)
{ // NotAColor.
is_blank = true;
- r = 255; // Safer to assign *some* value to rgb: zero, or 255 or something
+ r = 255; // Safer to assign *some* value to rgb: zero, or 255 or something,
g = 255; // rather than leaving them random.
b = 255; // Default 'blank' color here is white.
}
@@ -129,7 +140,7 @@
}
void write(std::ostream& os)
- { // Write color in svg format, for example, rgb(127,255,212).
+ { //! Write to ostream a color in svg format..
if(!is_blank)
{
os << "rgb(" << (unsigned int)r << ","
@@ -140,24 +151,26 @@
{
os << "none";
}
- // Usage: my_color.write(cout); cout << endl; outputs: rgb(127,255,212)
+ //! \details Usage: my_color.write(cout); cout << endl; outputs: rgb(127,255,212)
} // void write(std::ostream& os)
bool operator== (const svg_color& rhs)
- {
+ { //! Compare colors (for equal)
if ((is_blank) || (rhs.is_blank == true))
- { // Make blank a sort of NaN, that never compares true?
- // not even if both rhs and lhs are blank.
+ { /*! blank is a sort of NaN, that never compares true,
+ not even if both rhs and lhs are blank.
+ */
return false;
}
return (r == rhs.r) && (g == rhs.g) && (b == rhs.b);
}
bool operator!= (const svg_color& rhs)
- {
+ { //! Compare colors (for not equal).
if ((is_blank) || (rhs.is_blank == true))
- { // Make blank a sort of NaN, that never compares true?
- // not even if both rhs and lhs are blank.
+ { /*! blank is a sort of NaN, that never compares true,
+ not even if both rhs and lhs are blank.
+ */
return true;
}
return (r != rhs.r) || (g != rhs.g) || (b != rhs.b);
@@ -167,27 +180,31 @@
// Note operator== and operator<< are both needed to use Boost.Test.
bool operator== (const svg_color& lhs, const svg_color& rhs)
- { // Note operator== and operator << both needed to use Boost.Test.
+ { //! Compare colors (for equal)
+ // Note operator== and operator << both needed to use Boost.Test.
if ((rhs.is_blank == true) || (rhs.is_blank == true))
- { // Make blank a sort of NaN, that never compares true?
- // not even if both rhs and lhs are blank.
+ { /*! blank is a sort of NaN, that never compares true,
+ not even if both rhs and lhs are blank.
+ */
return false;
}
return (lhs.r == rhs.r) && (lhs.g == rhs.g) && (lhs.b == rhs.b);
}
bool operator!= (const svg_color& lhs, const svg_color& rhs)
- { // Note operator== and operator << both needed to use Boost.Test.
+ { //! Compare colors (for not equal).
+ // Note operator== and operator << both needed to use Boost.Test.
if ((rhs.is_blank == true) || (rhs.is_blank == true))
- { // Make blank a sort of NaN, that never compares true?
- // not even if both rhs and lhs are blank.
+ { /*! blank is a sort of NaN, that never compares true,
+ not even if both rhs and lhs are blank.
+ */
return true;
}
return (lhs.r == rhs.r) || (lhs.g == rhs.g) || (lhs.b == rhs.b);
}
std::ostream& operator<< (std::ostream& os, const svg_color& color)
- { //
+ { //! Output color to stream.
if(!color.is_blank)
{
os << "RGB(" // Note deliberate uppercase to show difference between write and operator<<
@@ -199,15 +216,16 @@
{
os << "blank";
}
- // Usage: svg_color my_color(127, 255, 212); cout << "my_color " << my_color << endl;
- // Outputs: my_color RGB(127,255,212)
- // cout << "magenta " << svg_color(magenta) << endl;
- // but caution! cout << magenta << endl; outputs 85 because magenta is an enum!
+ /*! Usage: svg_color my_color(127, 255, 212); cout << "my_color " << my_color << endl;
+ Outputs: my_color RGB(127,255,212)
+ cout << "magenta " << svg_color(magenta) << endl;
+ but caution! cout << magenta << endl; outputs 85 because magenta is an enum!
+ */
return os;
- } // std::ostream& operator<<
+ } // std::ostream& operator<<
svg_color color_array[] =
- {
+ { //! SVG standard colors, see also enum svg_color_constant.
svg_color(240, 248, 255), // aliceblue
svg_color(250, 235, 215), // antiquewhite
svg_color(0 , 255, 255), // aqua
@@ -360,7 +378,7 @@
void constant_to_rgb(svg_color_constant c,
unsigned char& r, unsigned char& g, unsigned char& b)
- { // Convert a named SVG standard color to update three rgb variables.
+ { //! Convert a named SVG standard color to update three rgb variables.
// Assume is c NOT the blank color.
BOOST_ASSERT(c != blank);
svg_color color(color_array[c]);
@@ -370,9 +388,13 @@
} // void constant_to_rgb
svg_color constant_to_rgb(svg_color_constant c)
- {
+ { //! Convert a svg color enum constant to a svg_color.
+ /*! Example:
+ constant_to_rgb(0) or constant_to_rgb(aliceblue)
+ gives svg_color(240, 248, 255), // aliceblue
+ */
return color_array[c];
- }
+ } // svg_color constant_to_rgb(svg_color_constant c)
} // svg
} // boost
Modified: sandbox/SOC/2007/visualization/boost/svg_plot/svg_fwd.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/svg_fwd.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/svg_fwd.hpp 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,4 +1,10 @@
-// svg_fwd.cpp
+/*!
+ \file svg_fwd.hpp
+ \author Jacob Voytko & Paul A. Bristow
+
+ \brief Forward declarations of SVG classes and functions.
+ \details Doxygen descriptions are in the corresponding .hpp files.
+*/
// Copyright Jacob Voytko 2007
// Copyright Paul A. Bristow 2007, 2008
@@ -8,8 +14,6 @@
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
-// Forward declarations of SVG classes and functions.
-
#ifndef BOOST_SVG_FWD_HPP
#define BOOST_SVG_FWD_HPP
@@ -18,7 +22,7 @@
namespace svg
{
-// svg_color.hpp
+// svg_color.hpp contains definitions.
struct svg_color;
enum svg_color_constant;
void constant_to_rgb(svg_color_constant c, unsigned char &r,
@@ -26,7 +30,7 @@
std::ostream& operator<< (std::ostream&, const svg_color&);
enum svg_color_constant;
-// svg_style.hpp
+// svg_style.hpp contains definitions.
enum point_shape;
class plot_point_style;
@@ -43,12 +47,11 @@
svg_style& stroke_color(const svg_color& col);
svg_style& fill_color(const svg_color& col);
svg_style& stroke_width(unsigned int width);
-//void write(std::ostream& rhs);
+//void write(std::ostream& rhs);
// \detail\svg_style.hpp
using boost::svg::detail::plot_doc_structure;
-
enum plot_doc_structure;
// svg.hpp
@@ -148,7 +151,7 @@
struct l_path; // lineto coordinates (x, y).
struct z_path; // z indicates a closepath.
struct h_path; // Draws a horizontal line from the current point (cpx, cpy) to (x, cpy).
-struct v_path; // Draws a vertical line from the current point (cpx, cpy) to (cpx, y).
+struct v_path; // Draws a vertical line from the current point (cpx, cpy) to (cpx, y).
struct c_path; // Draws a cubic Bézier curve from the current point to (x,y) using (x1,y1).
struct q_path; // Draws a quadratic Bézier curve from the current point to (x,y).
struct s_path; // Draws a cubic Bézier curve from the current point to (x,y).
@@ -158,7 +161,7 @@
// svg_1d_plot.hpp
struct svg_plot_series;
-class svg_1d_plot;
+class svg_1d_plot;
} // namespace svg
} // namespace boost
Modified: sandbox/SOC/2007/visualization/boost/svg_plot/svg_style.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/svg_style.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/svg_style.hpp 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,4 +1,9 @@
-// svg_style.hpp
+/*!
+ \file svg_style.hpp
+ \author Jacob Voytko and Paul A. Bristow
+
+ \brief styles for SVG specifying font, sizes, shape, color etc for text, values, lines, axes etc.
+*/
// Copyright Jacob Voytko 2007
// Copyright Paul A. Bristow 2008
@@ -14,7 +19,7 @@
// svg style information is fill, stroke, width, line & bezier curve.
// This module provides struct plot_point_style & struct plot_line_style
// and class svg_style holding the styles.
-// http://www.w3.org/TR/SVG11/styling.html
+// http://www.w3.org/TR/SVG11/styling.html
#include "svg_color.hpp"
#include "detail/svg_style_detail.hpp"
@@ -44,17 +49,17 @@
class bar_style; // Style of bars.
enum rotate_style
-{ // Rotation in degrees from horizontal.
- horizontal = 0, // normal left to right, centered.
- uphill = -45, // slope up.
- upward = -90, // vertical writing up.
- backup = -135, // // slope up backwards - upside down!
- leftward= -180, // horizontal to left.
- rightward = 360, // horizontal to right.
- downhill = 45, // slope down.
- downward = 90, // vertical writing down.
- backdown = 135, // slope down backwards.
- upsidedown = 180 // == -180 - upside down!
+{ //! \enum rotate_style Rotation in degrees clockwise from horizontal.
+ horizontal = 0, //!< normal horizontal left to right, centered.
+ uphill = -45, //!< slope up.
+ upward = -90, //!< vertical writing up.
+ backup = -135, //!< slope up backwards - upside down!
+ leftward= -180, //!< horizontal to left.
+ rightward = 360, //!< horizontal to right.
+ downhill = 45, //!< slope down.
+ downward = 90, //!< vertical writing down.//! \enum
+ backdown = 135, //!< slope down backwards.
+ upsidedown = 180 //!< upside down! (== -180)
};
const std::string strip_e0s(std::string s);
@@ -84,19 +89,19 @@
// and this is not a graphic.
class svg_style
-{ // Holds the basic stroke, fill colors and width, and their switches.
+{ //! \class svg_style Holds the basic stroke, fill colors and width, and their switches.
friend std::ostream& operator<< (std::ostream&, svg_style&);
private: // Accesses only by set and get member functions below.
// Private data member variables names end with _,
// to permit use of names for set & get member functions.
- svg_color stroke_;
- svg_color fill_;
- double width_; // Only valid if > 0 & width_on_ == true
- bool stroke_on_;
- bool fill_on_; // true means there is fill info.
- bool width_on_;
-
+ svg_color stroke_; //!< Color of SVG stroke (line or outline).
+ svg_color fill_; //!< Color of SVG fill.
+ double width_; //!< Width of line. Only valid if > 0 & width_on_ == true
+ bool stroke_on_; //!< true if stroke is to be specified.
+ bool fill_on_; //!< true if fill to be specified.
+ bool width_on_; //!< true if width to be specified.
+
public:
// Constructors declarations:
svg_style();
@@ -141,7 +146,7 @@
svg_style::svg_style()
:
stroke_(svg_color(0, 0, 0)), // == black.
- fill_(blank),
+ fill_(blank),
width_(0), // No width specified.
fill_on_(false), stroke_on_(false), width_on_(false)
{ // Default constructor initialises all private data.
@@ -149,29 +154,30 @@
// Member Functions definitions.
svg_color svg_style::fill_color() const
- {
- return svg_color(fill_);
+ { //! Get SVG fill color.
+ return svg_color(fill_);
}
svg_color svg_style::stroke_color() const
- {
+ { //! Get SVG stroke color.
return svg_color(stroke_);
}
double svg_style::stroke_width() const
- {
+ { //! Get SVG stroke width.
return width_;
}
bool svg_style::fill_on() const
- {
+ { //! \return true if fill wanted.
return fill_on_;
}
- svg_style& svg_style::fill_on(bool is)
- { // fill is wanted.
+ svg_style& svg_style::fill_on(bool is)
+ { // Set fill is wanted.
fill_on_ = is;
return *this; // Make chainable.
+ //! \return svg_style& to make chainable.
}
bool svg_style::stroke_on() const
@@ -179,10 +185,11 @@
return stroke_on_;
}
- svg_style& svg_style::stroke_on(bool is)
+ svg_style& svg_style::stroke_on(bool is)
{
stroke_on_ = is;
return *this; // Make chainable.
+ //! \return svg_style& to make chainable.
}
bool svg_style::width_on() const
@@ -190,56 +197,60 @@
return width_on_;
}
- svg_style& svg_style::width_on(bool is)
+ svg_style& svg_style::width_on(bool is)
{
width_on_ = is;
return *this; // Make chainable.
+ //! \return svg_style& to make chainable.
}
// Set svg_style member functions to set fill, stroke & width.
- svg_style& svg_style::stroke_color(const svg_color& col)
- {
+ svg_style& svg_style::stroke_color(const svg_color& col)
+ {
stroke_ = col;
stroke_on_ = true; // Assume want a stroke if color is set.
return *this; // Make chainable.
- }
+ //! \return svg_style& to make chainable.
+}
svg_style& svg_style::fill_color(const svg_color& col)
- {
+ {
fill_ = col;
fill_on_ = ! col.is_blank; // If blank fill is off or "none".
return *this; // Make chainable.
- }
+ //! \return svg_style& to make chainable.
+}
svg_style& svg_style::stroke_width(double width)
- {
+ {
width_ = width;
width_on_ = ((width > 0) ? true : false);
return *this; // Make chainable.
- }
-
+ //! \return svg_style& to make chainable.
+}
+
bool svg_style::operator==(svg_style& s)
- {
+ { //! Compare styles.
return (s.fill_color() == fill_)
&& (s.stroke_color() == stroke_)
&& (s.stroke_width() == width_)
&& (s.fill_on() == fill_on_)
&& (s.stroke_on() == stroke_on_)
- && (s.width_on() == width_on_);
+ && (s.width_on() == width_on_);
}
bool svg_style::operator!=(svg_style& s)
- {
+ {//! Compare styles (for inequality).
return (s.fill_color() != fill_)
|| (s.stroke_color() != stroke_)
|| (s.stroke_width() != width_)
|| (s.fill_on() != fill_on_)
|| (s.stroke_on() != stroke_on_)
- || (s.width_on() != width_on_);
+ || (s.width_on() != width_on_);
}
std::ostream& operator<< (std::ostream& os, svg_style& s)
- { //
+ { //! \brief Output a string description of a svg_style.
os << "svg_style("
<< s.fill_ << ", "
<< s.stroke_ << ", "
@@ -247,13 +258,14 @@
<< ((s.fill_on_) ? "fill, " : "no fill, ")
<< ((s.stroke_on_) ? "stroke, " : "no stroke, ")
<< ((s.fill_on_) ? "width)" : "no width)");
- // Usage: svg_style my_svg_style; cout << my_svg_style << endl;
- // Outputs: svg_style(RGB(0,0,0), RGB(0,0,0), 0, no fill, no stroke, no width)
+ /*! \details Usage: svg_style my_svg_style; cout << my_svg_style << endl;
+ Outputs: svg_style(RGB(0,0,0), RGB(0,0,0), 0, no fill, no stroke, no width)
+ */
return os;
} // std::ostream& operator<<
void svg_style::write(std::ostream& os)
- { // Write any stroke, fill colors and/or width info (start with space).
+ { //! Write any stroke, fill colors and/or width info (start with space) to svg XML document.
if(stroke_on_)
{
os << " stroke=\"";
@@ -273,33 +285,35 @@
<< width_
<< "\"";
}
- // Examples: <g id="yMinorTicks" stroke="rgb(0,0,0)" stroke-width="1">
+ /*! \details Example output: <g id="yMinorTicks" stroke="rgb(0,0,0)" stroke-width="1">
+ */
} // void write
// End of svg_style definitions.
class text_style
-{ // text style - font family, size, weight, style, stretch, decoration.
+{ //! \class text style font family, size, weight, style, stretch, decoration.
friend std::ostream& operator<< (std::ostream&, const text_style&);
friend bool operator== (const text_style&, const text_style&);
friend bool operator!= (const text_style&, const text_style&);
private:
- int font_size_;
- std::string font_family_;
- std::string weight_;
- std::string style_;
- std::string stretch_;
- std::string decoration_;
-
-public:
- text_style(int size = 20,
- const std::string& font = "", // Examples: "Arial", "Times New Roman", "Verdana", "Lucida Sans Unicode"
- const std::string& style = "", // font-style: normal | bold | italic | oblique
- const std::string& weight = "", // Examples: "bold", "normal"
- const std::string& stretch = "", // font-stretch: normal | wider | narrower ...
- const std::string& decoration = ""); // Examples: "underline" | "overline" | "line-through"
-
+ int font_size_; //!< Font size (SVG units, default pixels).
+ std::string font_family_; //!< Font family, examples: "Arial", "Times New Roman", "Verdana", "Lucida Sans Unicode".
+ std::string weight_; //!< Font weight, examples: normal | bold | italic | oblique.
+ std::string style_; //!< Font style, examples: "bold", "normal".
+ std::string stretch_; //!< Font stretch, examples: normal | wider | narrower.
+ std::string decoration_; //!< Font decoration, examples: "underline" | "overline" | "line-through".
+
+public:
+ text_style(
+ int size = 20,
+ const std::string& font = "", // Examples: "Arial", "Times New Roman", "Verdana", "Lucida Sans Unicode"
+ const std::string& style = "", // font-style: normal | bold | italic | oblique
+ const std::string& weight = "", // Examples: "bold", "normal"
+ const std::string& stretch = "", // font-stretch: normal | wider | narrower ...
+ const std::string& decoration = ""); // Examples: "underline" | "overline" | "line-through"
+
text_style& font_size(unsigned int i);
text_style& font_family(const std::string& s);
text_style& font_style(const std::string& s);
@@ -323,13 +337,13 @@
// class text_style function *Definitions*.
- text_style::text_style(
- int size,
- const std::string& font , // Default for browser is sans with Firefox & IE but serif with Opera.
- const std::string& style, // font-style: normal | bold | italic | oblique
- const std::string& weight, // Examples: "bold", "normal"
- const std::string& stretch, // font-stretch: normal | wider | narrower ...
- const std::string& decoration) // Examples: "underline" | "overline" | "line-through"
+ text_style::text_style(//! Default constructor only sets font size = 20, and leaves other font details as SVG defaults.
+ int size,
+ const std::string& font, //!< Default for browser is sans with Firefox & IE but serif with Opera.
+ const std::string& style, //!< font-style: normal
+ const std::string& weight, //!< font weight "normal"
+ const std::string& stretch, //!< font-stretch: normal
+ const std::string& decoration) //!< No decoration.
: // Constructor.
font_size_(size),
font_family_(font),
@@ -341,14 +355,15 @@
}
int text_style::font_size() const
- {
+ { //! Get font size (svg units, usually pixels).
return font_size_;
}
text_style& text_style::font_size(unsigned int i)
- { // pixels, default 10.
+ { //! Set font size (svg units usually pixels) default 10.
font_size_ = i;
- return *this; // Should be chainable (but isn't?).
+ return *this; // Should be chainable.
+ //! \return reference to text_style to make chainable.
// error C2663: 'boost::svg::text_style::font_size' : 2 overloads have no legal conversion for 'this' pointer
// label_style.font_size(20).font_family("sans");
// MS docs say:
@@ -357,33 +372,43 @@
}
const std::string& text_style::font_family() const
- {
+ { //! Get font family as string.
return font_family_;
}
text_style& text_style::font_family(const std::string& s)
- { // Default for browser is sans with Firefox & IE but serif with Opera.
- // Examples: "Arial", "Times New Roman", "Verdana", "Lucida Sans Unicode"
- // http://www.croczilla.com/~alex/conformance_suite/svg/text-fonts-01-t.svg
- // tests three styles of font, serfi, sans-serif and mono-spaced.
- // <text font-family="Georgia, 'Minion Web', 'Times New Roman', Times, 'MS PMincho', Heisei-Mincho, serif " x="20" y="80">A serifed face</text>
- // <text font-family="Arial, 'Arial Unicode', 'Myriad Web', Geneva, 'Lucida Sans Unicode', 'MS PGothic', Osaka, sans-serif " x="20" y="160">A sans-serif face</text>
- // <text font-family="'Lucida Console', 'Courier New', Courier, Monaco, 'MS Gothic', Osaka-Mono, monospace" x="20" y="240">A mono (iW) face</text>
- // Helvetica,sans-serif,
+ { //! Set font family, for example: "Arial", "Times New Roman", "Verdana", "Lucida Sans Unicode".
+ /*! \details Default for browser is sans with Firefox & IE but serif with Opera.\n
+ See also browser conformance test at\n
+ http://www.croczilla.com/~alex/conformance_suite/svg/text-fonts-01-t.svg\n
+ which tests three styles of font, serif, sans-serif and mono-spaced.\n
+ <text font-family="Georgia, 'Minion Web', 'Times New Roman', Times, 'MS PMincho', Heisei-Mincho, serif " x="20" y="80">A serifed face</text>\n
+ <text font-family="Arial, 'Arial Unicode', 'Myriad Web', Geneva, 'Lucida Sans Unicode', 'MS PGothic', Osaka, sans-serif " x="20" y="160">A sans-serif face</text>\n
+ <text font-family="'Lucida Console', 'Courier New', Courier, Monaco, 'MS Gothic', Osaka-Mono, monospace" x="20" y="240">A mono (iW) face</text>
+ */
font_family_ = s;
return *this;
+ //! \return reference to text_style to make chainable.
}
const std::string& text_style::font_style() const
- { // font-style: normal | bold | italic | oblique
- return style_; // example "normal"
- }
+ { //! Get font style.
+ /*! \details font-style: normal | bold | italic | oblique.
+ Example "normal" is default.
+ */
+ return style_;
+ //! \return reference to text_style to make chainable.
+ }
text_style& text_style::font_style(const std::string& s)
- { // Examples: "italic"
- // http://www.croczilla.com/~alex/conformance_suite/svg/text-fonts-02-t.svg
+ { //! Set font style.
+ /*! Examples: my_text_style.font_style("italic");\n
+ See also browser conformance tests:\n
+ http://www.croczilla.com/~alex/conformance_suite/svg/text-fonts-02-t.svg
+ */
style_ = s;
return *this;
+ //! \return reference to text_style to make chainable.
}
const std::string& text_style::font_weight() const
@@ -393,11 +418,12 @@
text_style& text_style::font_weight(const std::string& s)
{ // svg font-weight: normal | bold | bolder | lighter | 100 | 200 .. 900
- // Examples: "bold", "normal"
+ // Examples: "bold", "normal"
// http://www.croczilla.com/~alex/conformance_suite/svg/text-fonts-02-t.svg
// tests conformance. Only two weights are supported by Firefox, Opera, Inkscape
weight_ = s;
return *this;
+ //! \return reference to text_style to make chainable.
}
const std::string& text_style::font_stretch() const
@@ -410,29 +436,34 @@
// font-stretch: normal | wider | narrower ...
stretch_ = s;
return *this;
+ //! \return reference to text_style to make chainable.
}
const std::string& text_style::font_decoration() const
- {
+ { //! Get font decoration.
return decoration_;
}
text_style& text_style::font_decoration(const std::string& s)
- { // Examples: "underline" | "overline" | "line-through"
- decoration_ = s; // But implementation varies.
- // http://www.croczilla.com/~alex/conformance_suite/svg/text-deco-01-b.svg
- // tests line-through and underline. (Firefox 3 Beta 4 fails)
+ { //! Set font decoration.
+ /*! Examples: "underline" | "overline" | "line-through"
+ http://www.croczilla.com/~alex/conformance_suite/svg/text-deco-01-b.svg
+ tests line-through and underline.
+ But implementation varies.
+ */
+ decoration_ = s;
return *this;
+ //! \return reference to text_style to make chainable.
}
// http://www.croczilla.com/~alex/conformance_suite/svg/text-align-02-b.svg
// tests for baseline shifted text. This is needed for subscript and superscript,
// vital for nice display of units like m^2 and chemical formulae like H2O
- // IE (Adobe SVG viewer) and Opera conforms but not Firefox.
+ // IE (Adobe SVG viewer) and Opera conforms but not Firefox (yet).
// operators needed for testing at least.
bool text_style::operator==(const text_style& ts)
- {
+ { //! Compare text_style for equality (needed for testing).
return (ts.font_size_ == font_size_)
&& (ts.font_family_ == font_family_)
&& (ts.stretch_ == stretch_)
@@ -442,7 +473,7 @@
} // operator==
bool text_style::operator!=(const text_style& ts)
- {
+ {//! Compare text_style for inequality (needed for testing).
return (ts.font_size_ != font_size_)
|| (ts.font_family_ != font_family_)
|| (ts.stretch_ != stretch_)
@@ -463,12 +494,12 @@
//bool operator!= (const text_style& lhs, const text_style& rhs)
//{ // Note operator== and operator << both needed to use Boost.Test.
-// But can be avoided with a macro whose name I forget.
+// But can be avoided with a macro whose name I forget.
// return false;
//}
std::ostream& operator<< (std::ostream& os, const text_style& ts)
-{ //
+{ //! Output a text style as a text string (mainly useful for diagnostic use).
os << "text_style("
<< ts.font_size_ << ", \""
<< ts.font_family_ << "\", \""
@@ -477,56 +508,60 @@
// enable if implemented by rendering programs.
<< "\", \""
<< ts.stretch_ << "\", \""
- << ts.decoration_
+ << ts.decoration_
<< "\")" ;
- // Usage: text_style ts(12, "Arial", "italic", "bold", "", ""); cout << t << endl;
- // Outputs: text_style(18, "Arial", "italic", "bold", "", "")
-
+ /*! \details Usage: text_style ts(12, "Arial", "italic", "bold", "", ""); cout << t << endl;
+ Outputs: text_style(18, "Arial", "italic", "bold", "", "")
+ */
return os;
} // std::ostream& operator<<
// End of class text_style function *Definitions* separated.
-text_style no_style; // Uses all constructor defaults.
+text_style no_style; //!< Text style that uses all constructor defaults.
class value_style
-{ // Data series point value information, text, color, uncertainty & df, orientation.
- // for example to output: 5.123 +- 0.01 (19)
+{ //! Data series point value label information, text, color, orientation, uncertainty & df.
+ //! \details For example, to output: 5.123 +- 0.01 (19)
public:
//private: // ??
- rotate_style value_label_rotation_; // Direction point value labels written.
- int value_precision_; // Precision of value.
- std::ios_base::fmtflags value_ioflags_; // Control of scientific, fixed etc.
- bool strip_e0s_;
- text_style values_text_style_; // Font etc used for data point value marking.
- // svg_style
- svg_color fill_color_;
- svg_color stroke_color_;
- bool plusminus_on_; // If an uncertainty is to be appended.
- // http://en.wikipedia.org/wiki/Plus-minus_sign
- bool df_on_; // If an degrees of freedom estimate is to be appended.
-
+ rotate_style value_label_rotation_; //< Direction point value labels written.
+ int value_precision_; //!< Decimal digits of precision of value.
+ std::ios_base::fmtflags value_ioflags_; //!< Control of scientific, fixed, hex etc.
+ bool strip_e0s_; //!< If true, then unnecessary zeros will be stripped to reduce length.
+ text_style values_text_style_; //!< Font etc used for data point value marking.
+ // svg_style
+ svg_color fill_color_; //!< Fill color.
+ svg_color stroke_color_; //!< Stroke color.
+ bool plusminus_on_; //!< If an uncertainty estimate is to be appended (as + or - value).
+ /* \details See \n
+ http://en.wikipedia.org/wiki/Plus-minus_sign
+ */
+ bool df_on_; //!< If a degrees of freedom estimate is to be appended.
public:
- value_style();
- value_style(rotate_style r, int p, std::ios_base::fmtflags f, bool s,
- text_style ts, const svg_color& scol /* = black */, svg_color fcol, bool pm /*= false*/, bool df /*= false*/);
+ value_style(); //!< Default style for a data point value label.
+ value_style( //!< Set style for a data point value label.
+ rotate_style r, int p, std::ios_base::fmtflags f, bool s,
+ text_style ts, const svg_color& scol /* = black */, svg_color fcol, bool pm /*= false*/, bool df /*= false*/);
-}; // class value_style
+}; // class value_style
// class value_style Member Functions definitions.
// Constructor.
-value_style::value_style()
+value_style::value_style() //! Default data point value label style.
:
- value_label_rotation_(horizontal),
- value_precision_(3), // Reduced from default of 6 which is usually too long.
- value_ioflags_(std::ios::dec),
- strip_e0s_(true), // See also similar x_ticks value
- values_text_style_(no_style), // All defaults, black etc.
- stroke_color_(black), // == black.
- fill_color_(svg_color(0, 0, 0)), // == black.
- plusminus_on_(false),
- df_on_(false)
+ value_label_rotation_(horizontal), //!< Label orientation, default horizontal.
+ value_precision_(3), //!< Reduced from default of 6 which is usually too long.
+ value_ioflags_(std::ios::dec), //!< Any std::ios::ioflags, for example hex, fixed, scientific.
+ strip_e0s_(true), //!< If true, then unnecessary zeros will be stripped to reduce length.
+ values_text_style_(no_style), //!< All defaults, black etc.
+ stroke_color_(black), //!< == black.
+ fill_color_(svg_color(0, 0, 0)), //!< no fill.
+ // TODO should be
+ // fill_color_(false), //!< no fill.
+ plusminus_on_(false), //! If uncertainty estimate to be appended.
+ df_on_(false) //!< If a degrees of freedom estimate to be appended.
{ // Default constructor initialises all private data.
}
@@ -541,55 +576,57 @@
// End class value_style Member Functions definitions.
enum point_shape
-{ // Marking a data point.
+{ //! \enum Shape used for marking a data point.
// Used in draw_plot_point in axis_plot_frame.hpp
- none = 0,
- round, // 1 Note name circle changed to round to avoid clash with function named circle.
- square, // 2
- point, // 3
- egg, // 4 ellipse
- vertical_line, // line up & down from axis.
- horizontal_line, // line left & right from axis.
- vertical_tick, // tick up from axis.
- horizontal_tick, // line left & right from axis.
- // Note horizontal will not be useful for 1D plot - will be on the axis.
- cone, // pointing up - 'rightwayup'.
- triangle, // pointing down 'upsidedown'.
- star, // using polygon.
- lozenge,
- diamond,
- heart,
- club,
- spade,
- asterisk, // *
- x, // x
- cross,
- symbol //Unicode symbol including letters, digits, greek & 'squiggles'.
- // Default "X", "Ω"= greek omega, "✡" = Star of David hexagram
- // ઠ Maltese cross & other dingbats
- // http://en.wikipedia.org/wiki/List_of_Unicode_characters#Basic_Latin geometric shapes
- // may be a better way to make these symbols.
- // A0 black square ...to FF
- // But unclear how many browsers implement these properly.
+ none = 0, //!< No marker for data point.
+ round, //!< Circle but name changed to round to avoid clash with function named circle.
+ square, //!< Square.
+ point, //!< Small solid point.
+ egg, //!< Ellipse.
+ vertical_line, //!< Vertical line up & down from axis.
+ horizontal_line, //!< Horizontal line left & right from axis.
+ vertical_tick, //!< Vertical tick up from axis.
+ horizontal_tick, //!< Horizontal line right from axis.
+ //!< Note horizontal will not be useful for 1D plot - will be on the axis.
+ cone, //!< Cone pointing up - 'rightwayup'.
+ triangle, //!< Triangle pointing down 'upsidedown'.
+ star, //!< Star (using polygon).
+ lozenge, //!< Lozenge or square with corners pointing up and down..
+ diamond, //!< Diamond card shape.
+ heart, //!< Heart playing card shape.
+ club, //!< Club playing card shape.
+ spade, //!< Spade playing card shape.
+ asterisk, //!< Asterix as * symbol
+ x, //!< letter x
+ cross, //!< cross
+ symbol //!< Unicode symbol including letters, digits, greek & 'squiggles'.
+ //! Default letter "X".\n
+ //! Other examples: "Ω"= greek omega, "✡" = Star of David hexagram
+ //! ઠ Maltese cross & other dingbats. \n
+ //! See also http://en.wikipedia.org/wiki/List_of_Unicode_characters#Basic_Latin geometric shapes
+ //! that may be a better way to make these symbols: A0 black square ...to FF
+ //! But unclear how many browsers implement these properly.
}; // enum point_shape
class plot_point_style
-{ // Shape, color, (optional value & uncertainty) of data point markers.
+{ //! Shape, color, (optional value & uncertainty) of data point markers.
friend std::ostream& operator<< (std::ostream&, plot_point_style);
public:
- svg_color fill_color_; // Color of the centre of the shape.
- svg_color stroke_color_; // Color of circumference of shape.
- int size_; // diameter of circle, height of square, font_size ...
- point_shape shape_; // round, square, point...
- std::string symbols_; // Unicode symbol (letters, digits, squiggles etc)
- // Caution: not all Unicode symbols are output by all browsers! Example:
- // U2721 is Star of David or hexagram http://en.wikipedia.org/wiki/Hexagram
- // symbols("✡")
- text_style symbols_style_;
- bool show_x_value_; // Show the X value near the point.
- bool show_y_value_; // Show the Y value near the point.
- // If both true, then shows both as a pair "1.2, 3.4"
+ svg_color fill_color_; //!< Color of the centre of the shape.
+ svg_color stroke_color_; //!< Color of circumference of shape.
+ int size_; //!< Diameter of circle, height of square, font_size ...
+ point_shape shape_; //!< shape: round, square, point...
+ std::string symbols_; //!< Unicode symbol(s) (letters, digits, squiggles etc).\n
+ //! Caution: not all Unicode symbols are output by all browsers!\n
+ //! Example: U2721 is Star of David or hexagram,
+ //! see http://en.wikipedia.org/wiki/Hexagram, symbols("✡")
+ //! Positioning of symbols (especially > 1 symbols) may be inprecise.
+
+ text_style symbols_style_; //!< font, size, decoration of symbols.
+ bool show_x_value_; //!< If true, show the X value like "1.2" near the point. (If both true, then show both X and Y as a pair like "1.2, 3.4".)
+ bool show_y_value_; //!< If true, show the Y value like "3.4" near the point. (If both true, then show both X and Y as a pair like "1.2, 3.4".)
+
//int dist; // from the point to the value.
//rotate_style orient_; // Orientation of the value from the point.
//// Note that this needs to alter the text alignment, center, left or right,
@@ -599,7 +636,8 @@
//// to avoid writing over the point marker.
//text_style value_style_; // Size, font, color etc of the value.
- plot_point_style(const svg_color& stroke = black, const svg_color& fill = blank,
+ plot_point_style( //! Constructor with all defaults.
+ const svg_color& stroke = black, const svg_color& fill = blank,
int size = 10, point_shape shape = round, const std::string& symbols = "X");
plot_point_style& size(int i);
@@ -619,7 +657,8 @@
// class plot_point_style function Definitions.
// Constructor.
- plot_point_style::plot_point_style(const svg_color& stroke, const svg_color& fill,
+ plot_point_style::plot_point_style( //! Constructor with all defaults (see declaration).
+ const svg_color& stroke, const svg_color& fill,
int size, point_shape shape, const std::string& symbols)
:
fill_color_(fill), stroke_color_(stroke), size_(size),
@@ -634,54 +673,57 @@
// Member function Definitions.
plot_point_style& plot_point_style::size(int i)
- {
+ { //! Set size of shape or symbol used to mark data value plot point(s).
size_ = i; // Shapes.
symbols_style_.font_size(i); // In case using a symbol.
return *this;
+ //! \return plot_point_style& to make chainable.
}
int plot_point_style::size()
- {
+ { //!< Get size of shape or symbol used to mark data value plot point(s).
return size_;
}
plot_point_style& plot_point_style::fill_color(const svg_color& f)
- {
+ { //! Set fill color of shape or symbol used to mark data value plot point(s).
fill_color_ = f;
return *this;
+ //! \return plot_point_style& to make chainable.
}
svg_color& plot_point_style::fill_color()
- {
+ { //! Get fill color of shape or symbol used to mark data value plot point(s).
return fill_color_;
}
plot_point_style& plot_point_style::stroke_color(const svg_color& f)
- {
+ { //! Set stroke color of shape or symbol used to mark data value plot point(s).
stroke_color_ = f;
- return *this;
+ return *this; //! \return plot_point_style& to make chainable.
}
svg_color& plot_point_style::stroke_color()
- {
+ { //! Get stroke color of shape or symbol used to mark data value plot point(s).
return stroke_color_;
}
plot_point_style& plot_point_style::shape(point_shape s)
- {
+ { //! Set shape used to mark data value plot point(s).
shape_ = s;
- return *this;
+ return *this; //! \return plot_point_style& to make chainable.
}
point_shape plot_point_style::shape()
- {
+ { //! Get shape used to mark data value plot point(s).
return shape_;
}
plot_point_style& plot_point_style::symbols(const std::string s)
{ // Override default symbol "X" - only effective if .shape(symbol) used.
symbols_ = s;
- return *this;
+ return *this; //! \return plot_point_style& to make chainable.
+
}
std::string& plot_point_style::symbols()
@@ -692,41 +734,45 @@
plot_point_style& plot_point_style::style(text_style ts)
{
symbols_style_ = ts;
- return *this;
+ return *this; //! \return plot_point_style& to make chainable.
}
text_style& plot_point_style::style() const
{ // To allow control of symbol font, size, decoration etc.
- return const_cast<text_style&>(symbols_style_);
+ return const_cast<text_style&>(symbols_style_);
}
// End class plot_point_style function *Definitions* separated.
std::ostream& operator<< (std::ostream& os, plot_point_style p)
-{ //
- os << "point_style("
+{ //! Output description of data value plot point marker(s).
+ os << "plot_point_style("
<< p.shape_ << ", "
<< p.stroke_color_ << ", "
<< p.fill_color_ << ", "
<< p.size_ << ", "
- << p.symbols_ << ")" ;
-// Usage: plot_point_style p; cout << p << endl;
-// Outputs: point_style(1, RGB(0,0,0), RGB(0,0,0), 10, X)
- return os;
+ << p.symbols_
+// << ", symbols style: " << p.symbols_style_ // TODO check this works and alter example.
+ << ")";
+/*! \details Example: plot_point_style p; cout << p << endl;
+ Outputs: point_style(1, RGB(0,0,0), RGB(0,0,0), 10, X)
+*/
+return os;
} // std::ostream& operator<<
plot_point_style default_plot_point_style(); // Uses all the defaults.
class plot_line_style
-{ // Style of line joining data series values.
- // TODO dotted and dashed line style? Useful for B&W?
+{ //! \class plot_line_style Style of line joining data series values.
+ // TODO dotted and dashed line style would be useful for B&W.
public:
- svg_color stroke_color_; // line stroke color. (no fill color for lines)
- svg_color area_fill_; // Fill color from line to axis. == false means color.is_blank = true, or = blank.
- double width_;
- bool line_on_;
- bool bezier_on_;
- plot_line_style(const svg_color& col = black, const svg_color& fill_col = blank, double width = 2, bool line_on = true, bool bezier_on = false);
+ svg_color stroke_color_; //!< Stroke color of line. (no fill color for lines)
+ svg_color area_fill_; //!< Fill color from line to axis. == false means color.is_blank = true, or = blank.
+ double width_; //!< Width of line joining data series values.
+ bool line_on_; //!< If true, data points will be joined by straight line(s).
+ bool bezier_on_; //!< If true, data points will be joined by bezier curved line(s).
+
+ plot_line_style(const svg_color& col = black, const svg_color& fill_col = blank, double width = 2, bool line_on = true, bool bezier_on = false);
plot_line_style& width(double w);
double width();
@@ -737,7 +783,7 @@
bool line_on() const;
plot_line_style& line_on(bool is) ;
bool bezier_on() const;
- plot_line_style& bezier_on(bool is);
+ plot_line_style& bezier_on(bool is);
}; // class plot_line_style
@@ -747,112 +793,113 @@
plot_line_style::plot_line_style(const svg_color& col, const svg_color& fill_col, double width, bool line_on, bool bezier_on)
:
stroke_color_(col), area_fill_(fill_col), width_(width), line_on_(line_on), bezier_on_(bezier_on)
- { // Defaults for all private data.
+ { // Provides defaults for all private data.
}
// Member Functions.
plot_line_style& plot_line_style::width(double w)
- {
+ { //! Set width of line(s) joining data points.
width_ = w;
return *this; // Make chainable.
+ //! \return plot_line_style& to make chainable.
}
double plot_line_style::width()
- {
+ { //! Get width of line(s) joining data points.
return width_;
}
plot_line_style& plot_line_style::color(const svg_color& f)
- {
+ { //! Set color of line(s) joining data points.
stroke_color_ = f;
- return *this; // Make chainable.
+ return *this; //! \return plot_line_style& to make chainable.
}
svg_color& plot_line_style::color()
- {
+ { //! Get color of line(s) joining data points.
return stroke_color_;
}
plot_line_style& plot_line_style::area_fill(const svg_color& f)
- {
+ {//! Set if area under line joining data points is to be color filled.
area_fill_ = f;
- return *this; // Make chainable.
+ return *this; //! \return plot_line_style& to make chainable.
}
svg_color& plot_line_style::area_fill()
- {
+ { //! Get if area under line joining data points is to be color filled.
return area_fill_;
}
bool plot_line_style::line_on() const
- {
+ { // True if line(s) will join data points.
return line_on_;
}
- plot_line_style& plot_line_style::line_on(bool is)
- {
+ plot_line_style& plot_line_style::line_on(bool is)
+ { // Set true if line(s) are to join data points.
line_on_ = is;
- return *this; // Make chainable.
+ return *this; //! \return plot_line_style& to make chainable.
}
bool plot_line_style::bezier_on() const
- {
+ { // Get true if bezier curved line(s) are to join data points.
return bezier_on_;
}
- plot_line_style& plot_line_style::bezier_on(bool is)
- {
+ plot_line_style& plot_line_style::bezier_on(bool is)
+ { // Set true if bezier curved line(s) are to join data points.
bezier_on_ = is;
- return *this; // Make chainable.
+ return *this; //! \return plot_line_style& to make chainable.
}
// End class plot_line_style function Definitions.
-
std::ostream& operator<< (std::ostream& os, plot_line_style p)
-{ //
+{ //! Output description of plot_line_style. (mainly useful for diagnosis).
+ /*! \details Example Usage: plot_line_style p; cout << p << endl;
+ Outputs: point_line_style(RGB(0,0,0), blank, line, no bezier)
+ */
os << "point_line_style("
<< p.stroke_color_ << ", "
<< p.area_fill_ << " area fill, "
<< ((p.line_on_) ? "line, " : "no line, ")
<< ((p.bezier_on_) ? "bezier)" : "no bezier)");
-// Usage: plot_line_style p; cout << p << endl;
-// Outputs: point_line_style(RGB(0,0,0), blank, line, )
return os;
} // std::ostream& operator<<
-enum dim{N = 0, X = 1, Y = 2, Z = 3}; // Used so that an axis knows what type it is, or none = N.
+enum dim
+{ //! \enum dim dimension of plot. (Used so that an axis knows what type it is, or none = N).
+ N = 0, X = 1, Y = 2, Z = 3
+};
class axis_line_style
-{ // Style of the x and/or y axes lines.
- // But NOT the ticks and value labels.
- // (Different styles for x and y are possible).
+{ //! Style of the x and/or y axes lines.\n
+ //! (But NOT the ticks and value labels because different styles for x and y are possible).
public:
- dim dim_; // x, y or z
- double min_; // minimum x value (Cartesian units).
- double max_; // maximum x value (Cartesian units).
+ dim dim_; //!< X, Y or none.
+ double min_; //!< minimum x value (Cartesian units).
+ double max_; //!< maximum x value (Cartesian units).
// Note that these duplicate the same named in ticks_labels_style,
// but they might have different uses, so are left pro tem.
// TODO reconsider the implications of this (largely accidental) decision.
// double interval_; does NOT duplicate major_interval_ in ticks_label_style.
- double axis_; //
- // X-axis (y = 0) transformed into SVG Y coordinates. -1 if not calculated yet.
- // or Y-axis (x = 0) transformed into SVG X coordinates. -1 if not calculated yet.
-
- svg_color color_; // line stroke color.
- double axis_width_; // line width.
- int axis_position_; // How the axes intersect with values as below:
- // enum x_axis_intersect {bottom = -1, x_intersects_y = 0, top = +1};
- // enum y_axis_intersect {left = -1, y_intersects_x = 0, right = +1};
- // If axes look like an L, then is bottom left.
- // If a T then y intersects and x is at bottom.
- bool label_on_; // Label X-axis with text - example: "length".
- bool label_units_on_; // Label X-axis units, example: "cm".
- bool axis_line_on_; // Draw a X horizontal or Y vertical axis line.
+ double axis_; //!< Depending on value of dim, either X-axis (y = 0) transformed into SVG Y coordinates or Y-axis (x = 0) transformed into SVG X coordinates (-1 if not calculated yet).
+ svg_color color_; //!< Axis line (stroke) color.
+ double axis_width_; //!< Axis line width.
+ int axis_position_; /*!< How the axes intersect with values as below:\n
+ enum x_axis_intersect {bottom = -1, x_intersects_y = 0, top = +1};
+ enum y_axis_intersect {left = -1, y_intersects_x = 0, right = +1};
+ If axes look like an L, then is bottom left.
+ If a T then y intersects and X is at bottom.
+ */
+ bool label_on_; //!< Label axis with text - example: "length".
+ bool label_units_on_; //!< Label axis units, example: "cm".
+ bool axis_line_on_; //!< Draw an X horizontal or Y vertical axis line.
- // class axis_line_style constructor.
- axis_line_style(dim d = X,
+ axis_line_style( // class axis_line_style default constructor, sets all member data items.
+ dim d = X,
double min = -10.,
double max = +10., // Defaults.
// See also default in ticks_labels_style.
@@ -875,15 +922,20 @@
axis_line_style& label_units_on(bool is) ;
axis_line_style& position(int pos);
double position();
+ bool axis_line_on() const;
}; // class axis_line_style
// class axis_line_style Member Functions Definitions:
- axis_line_style::axis_line_style(dim d,
- double min, double max, // Defaults.
+ axis_line_style::axis_line_style( //! \class axis_line_style Default constructor, sets all member data items.
+ dim d,
+ double min,
+ double max, // Defaults.
// See also default in ticks_labels_style.
- const svg_color col, double width,
- int axis_position, bool label_on,
+ const svg_color col,
+ double width,
+ int axis_position,
+ bool label_on,
bool label_units_on,
bool axis_lines_on)
:
@@ -902,117 +954,123 @@
{ // Range too small to display.
throw std::runtime_error("Axis range too small!" );
}
- } // axis_line_style constructor
+ } // axis_line_style constructor
-axis_line_style& axis_line_style::color(const svg_color& color)
- {
+ axis_line_style& axis_line_style::color(const svg_color& color)
+ { //! Set color of an axis line.
color_ = color;
- return *this; // Make chainable.
+ return *this; //! \return plot_line_style& to make chainable.
}
svg_color axis_line_style::color()
- {
+ { //! Get color of an axis line.
return color_;
}
-
+
axis_line_style& axis_line_style::width(double w)
- {
+ { //! Set width of an axis line.
axis_width_ = w;
- return *this; // Make chainable.
+ return *this; //! \return plot_line_style& to make chainable.
}
double axis_line_style::width()
- {
+ { //! Get width of an axis line.
return axis_width_;
}
bool axis_line_style::label_on() const
- {
+ { //! If returns true, then axis to be labelled, for example "X axis".
return label_on_;
}
- axis_line_style& axis_line_style::label_on(bool is)
- {
+ axis_line_style& axis_line_style::label_on(bool is)
+ { //! If set true, then axis to be labelled with the label, for example "X axis" (but default "").
label_on_ = is;
- return *this; // Make chainable.
+ return *this; //! \return plot_line_style& to make chainable.
}
bool axis_line_style::label_units_on() const
- {
+ { //! If returns true, then axis to be labelled with unit, for example " (mm)"
return label_units_on_;
}
- axis_line_style& axis_line_style::label_units_on(bool is)
- {
+ axis_line_style& axis_line_style::label_units_on(bool is)
+ { //! If set true, then axis to be labelled with the units label, for example " (mm)" (but default "").
label_units_on_ = is;
- return *this; // Make chainable.
+ return *this; //! \return plot_line_style& to make chainable.
}
axis_line_style& axis_line_style::position(int pos)
- {
+ { //! How the axes intersect.
axis_position_ = pos;
- return *this; // Make chainable.
+ return *this; //! \return plot_line_style& to make chainable.
}
double axis_line_style::position()
- {
+ { //! \returns How the axes intersect.\n
+ //! enum x_axis_intersect {bottom = -1, x_intersects_y = 0, top = +1};
+ //! enum y_axis_intersect {left = -1, y_intersects_x = 0, right = +1};
+ //! If axes look like an L, then is bottom left.
+ //! If a T then y intersects and X is at bottom.
return axis_position_;
}
+ bool axis_line_style::axis_line_on() const
+ { //! If returns true, then either an X or a Y axis line to be drawn.
+ return label_on_;
+ }
// End class axis_line_style member functions definitions:
class ticks_labels_style
-{ // Style of the x and y axes ticks, grids and their value labels.
- // But NOT the x and y axes lines.
- // These can be either on the axis lines or on the plot window edge(s).
- // (Different styles for x and y are possible).
+{ //! Style of the x and y axes ticks, grids and their value labels.
+ //! But NOT the x and y axes lines.
+ //! These can be either on the axis lines or on the plot window edge(s),
+ //! (because different styles for x and y are possible).
friend class svg_2d_plot;
public:
- dim dim_;
- double min_; // minimum x value (Cartesian units).
- double max_; // maximum x value (Cartesian units).
- double major_interval_; // x_major_interval_ is the stride or interval for major x ticks.
- // (Cartesian units) set/get by x or y _major_interval
- double minor_interval_; // Interval (Cartesian units) between minor ticks.
- // No set function because x_num_minor_ticks_ used to determine this instead,
- // but one could calculate x_minor_interval_.
- unsigned int num_minor_ticks_; // number of minor ticks, eg 4 gives major 0, minor 1,2,3,4, major 5
- // All units in pixels.
- svg_color major_tick_color_; // line stroke color.
- double major_tick_width_;
- double major_tick_length_;
- svg_color minor_tick_color_; // line stroke color.
- double minor_tick_width_;
- double minor_tick_length_;
- svg_color major_grid_color_;
- double major_grid_width_; // pixels.
- svg_color minor_grid_color_;
- double minor_grid_width_; // pixels.
-
- bool up_ticks_on_; // Draw ticks up from horizontal X-axis line.
- bool down_ticks_on_; // Draw ticks down from horizontal X-axis line.
- bool left_ticks_on_; // Draw ticks left from vertical Y-axis line.
- bool right_ticks_on_; // Draw ticks right from vertical Y-axis line.
+ dim dim_; //!< X, Y, or None.
+ double min_; //!< Minimum x value (Cartesian units).
+ double max_; //!< Maximum x value (Cartesian units).
+ double major_interval_; //!< Stride or interval between major x ticks (Cartesian units).
+ double minor_interval_; //!< Interval (Cartesian units) between minor ticks.
+ // No set function because x_num_minor_ticks_ used to determine this instead,
+ // but one could calculate x_minor_interval_.
+ unsigned int num_minor_ticks_; //! number of minor ticks, eg 4 gives major 0, minor 1,2,3,4, major 5 (All units in svg units, default pixels).
+ svg_color major_tick_color_; //!< Color (stroke) of tick lines.
+ double major_tick_width_; //!< Width of major tick lines.
+ double major_tick_length_;//!< Length of major tick lines.
+ svg_color minor_tick_color_; //!< Color (stroke) of tick lines.
+ double minor_tick_width_; //!< Width of minor tick lines.
+ double minor_tick_length_; //!< Length of minor tick lines.
+ svg_color major_grid_color_; //!< Color of major grid lines.
+ double major_grid_width_; //!< Width of major grid lines.
+ svg_color minor_grid_color_; //!< color of minor grid lines.
+ double minor_grid_width_; //!< Wdith of minor grid lines.
+
+ bool up_ticks_on_; //!< Draw ticks up from horizontal X-axis line.
+ bool down_ticks_on_; //!< Draw ticks down from horizontal X-axis line.
+ bool left_ticks_on_; //!< Draw ticks left from vertical Y-axis line.
+ bool right_ticks_on_; //!< Draw ticks right from vertical Y-axis line.
// Simplest to have all of these although only one pair (up or down) or (left or right) is used.
// Unused are always false.
- int major_value_labels_side_; // Label values for major ticks, and direction.
+ int major_value_labels_side_; //!< Which side of axis for label values for major ticks.
// < 0 means to left or down (default), 0 (false) means none, > 0 means to right (or top)/
- rotate_style label_rotation_; // Direction axis value labels written.
- bool major_grid_on_; // Draw X grid at major ticks.
- bool minor_grid_on_;// Draw X grid at minor ticks.
- int value_precision_; // precision for tick value labels, usually 3 will suffice.
- std::ios_base::fmtflags value_ioflags_; // IO formatting flags for the axis default std::ios::dec.
- bool strip_e0s_; // If redundant zero, + and e are to be stripped.
- double label_max_length_; // width (in SVG units) of longest value label text on axis.
- double label_max_space_; // Space needed for value label adjusted for rotation.
- int ticks_on_window_or_axis_; // Value labels & ticks on the plot window border
- // (rather than on X or Y-axis).
+ rotate_style label_rotation_; //!< Direction axis value labels written.
+ bool major_grid_on_; //!< Draw X grid at major ticks.
+ bool minor_grid_on_; //!< Draw X grid at minor ticks.
+ int value_precision_; //!< precision for tick value labels, usually 3 will suffice.
+ std::ios_base::fmtflags value_ioflags_; //!< IO formatting flags for the axis default std::ios::dec.
+ bool strip_e0s_; //!< If redundant zero, + and e are to be stripped.
+ double label_max_length_; //!< width (in SVG units) of longest value label text on axis.
+ double label_max_space_; //!< Space needed for value label adjusted for rotation.
+ int ticks_on_window_or_axis_; //!< Value labels & ticks on the plot window border
+ //! (rather than on X or Y-axis).
// For Y-axis -1 = left, 0 = false, +1 = right. Default -1 to left of plot window.
// For X-axis -1 = bottom, 0 = false, +1 = top. Default -1 below bottom of plot window.
- const text_style& value_label_style_;
+ const text_style& value_label_style_; //!< text style (font, size...) for value labels.
ticks_labels_style(dim d = X,
const text_style& style = no_style,
@@ -1031,7 +1089,7 @@
// These are the defaults.
//major_interval_(2.), // x stride between major ticks & value label.
//num_minor_ticks_(4), // suits: major 0, minor 2, 4, 6, 8, major 10
- minor_interval_(0), // Calculated from x & y_num_minor_ticks_
+ minor_interval_(0), //!< Calculated from x & y_num_minor_ticks_
// but given a value here for safety.
major_tick_color_(black), // line stroke color.
major_tick_width_(2),
@@ -1075,7 +1133,7 @@
} // ticks_labels_style constructor.
double label_length(double value)
- { // Find the length of label for a value.
+ { //! Find the length of label (like "1.23E-5") for a value.
// Needs to know the IO precision & flags for the axis,
// and if zeros are to be stripped, so can't be a free function.
std::stringstream label;
@@ -1095,17 +1153,17 @@
} // double label_length
double longest_label()
- { // Update label_max_length_ with the longest value label as pixels,
- // return the count of digits etc.
+ { //! Update label_max_length_ with the longest value label as pixels,
+ //! return the count of digits etc.
if(major_value_labels_side_ != 0) // ! none
{ // Show values by the tick as "1.2" or "3.4e+000"...
double longest = 0;
-
+
//axis_line_style& axis = (dim_ = X) ? y_axis() : x_axis(); // The intersecting *other* axis.
// || !axis.axis_line_on_ ignore these tests to avoid the above that doesn't work.
// Zero isn't likely to be the longest value label.
// ticks_labels_style& tick_labels = (dim_ = X) ? x_ticks() : y_ticks(); // doesn't work.
- //
+ //
// Check length of label for the ticks on the positive side (right or above zero).
for(double v = 0.; v <= max_; v += major_interval_)
@@ -1137,7 +1195,7 @@
}
} // for v
label_max_length_ = longest;
- return longest;
+ return longest;
}
else
{
@@ -1149,54 +1207,52 @@
bool use_up_ticks() const
{
- return up_ticks_on_;
+ return up_ticks_on_; //! \return true if to draw ticks up from horizontal X-axis line.
}
- ticks_labels_style& use_up_ticks(bool is)
- {
+ ticks_labels_style& use_up_ticks(bool is)
+ { //! Set true to draw ticks up from horizontal X-axis line.
up_ticks_on_ = is;
- return *this; // Make chainable.
+ return *this; //! \return ticks_labels_style& to make chainable.
}
bool use_down_ticks() const
{
- return down_ticks_on_;
+ return down_ticks_on_; //! \return true if to draw ticks down from horizontal X-axis line.
}
- ticks_labels_style& use_down_ticks(bool side)
- {
+ ticks_labels_style& use_down_ticks(bool side)
+ { //! Set true if to draw ticks down from horizontal X-axis line.
down_ticks_on_ = side;
- return *this; // Make chainable.
+ return *this; //! \return ticks_labels_style& to make chainable.
}
int major_value_labels_side() const
- { // Get tick value labels to left (<0), none (==0) or right (>0).
+ { // Get side for tick value labels: left (<0), none (==0) or right (>0).
return major_value_labels_side_;
}
- ticks_labels_style& major_value_labels_side(int is)
- { // Set tick value labels to left (<0), none (==0) or right (>0).
+ ticks_labels_style& major_value_labels_side(int is)
+ { // Set side for tick value labels: left (<0), none (==0) or right (>0).
major_value_labels_side_ = is;
- return *this; // Make chainable.
+ return *this; //! \return ticks_labels_style& to make chainable.
}
-
}; // class ticks_labels_style
class box_style
-{ // Style of a rectangular box.
- // Use for image and plot window.
+{ //! \class box_style Style of a rectangular box. (Used for boxplot image and plot window).
public:
- svg_color stroke_; // box line stroke color.
- svg_color fill_; // box fill color.
- double width_; // plot border rectangle width.
- double margin_; // Marginal (pixels) space around the box (inside or out).
- bool border_on_; // Display the border.
- bool fill_on_; // Color fill the box.
+ svg_color stroke_; //!< Box line (stroke) color.
+ svg_color fill_; //!< Box fill color.
+ double width_; //!< plot border rectangle width.
+ double margin_; //!< Marginal (pixels) space around the box (inside or out).
+ bool border_on_; //!< Display the border of the box.
+ bool fill_on_; //!< Color fill the box.
box_style(const svg_color& scolor = black,
const svg_color& fcolor = white, // No fill.
double width = 1, // of border
- double margin = 4., //
+ double margin = 4., //
bool border_on = true, // Draw a border of width.
bool fill_on = false); // Apply fill color.
@@ -1219,108 +1275,108 @@
// Constructor.
-box_style::box_style(const svg_color& scolor, // = black,
- const svg_color& fcolor, // = white, // No fill.
- double width,// = 1, // of border
- double margin, // = 4., //
- bool border_on,// = true, // Draw a border of width.
- bool fill_on) //= false) // Apply fill color.
- :
- stroke_(scolor), fill_(fcolor), width_(width),
- margin_(margin),
- border_on_(border_on),
- fill_on_(fill_on)
- { // Initializes all private data with defaults.
- }
+box_style::box_style(
+ const svg_color& scolor, // = black,
+ const svg_color& fcolor, // = white, // No fill.
+ double width,// = 1, // of border
+ double margin, // = 4., //
+ bool border_on,// = true, // Draw a border of width.
+ bool fill_on) //= false) // Apply fill color.
+ :
+ stroke_(scolor), fill_(fcolor), width_(width),
+ margin_(margin),
+ border_on_(border_on),
+ fill_on_(fill_on)
+ { // Initializes all private member data with defaults.
+ }
// Member Functions definitions.
box_style& box_style::stroke(const svg_color& color)
- {
+ { //! Set (stroke) color for box outline.
stroke_ = color;
- return *this; // Make chainable.
+ return *this; //! \return box_style& to make chainable.
}
svg_color box_style::stroke()
{
- return stroke_;
+ return stroke_; //! \return (stroke) color for box outline.
}
box_style& box_style::fill(const svg_color& color)
- {
+ { //! Set fill color for box.
fill_ = color;
- return *this; // Make chainable.
+ return *this; //! \return box_style& to make chainable.
}
svg_color box_style::fill()
{
- return fill_;
+ return fill_; //! \return Fill color for box.
}
box_style& box_style::width(double w)
- {
+ { //! Set width for box.
width_ = w;
- return *this; // Make chainable.
+ return *this; //! \return box_style& to make chainable.
}
double box_style::width()
{
- return width_;
+ return width_; //! \return width for box.
}
box_style& box_style::margin(double w)
- {
+ { //! Set marginal (default pixels) space around the box (inside or out).
margin_ = w;
- return *this; // Make chainable.
+ return *this; //! \return box_style& to make chainable.
}
double box_style::margin()
{
- return margin_;
+ return margin_; //! \return marginal (default pixels) space around the box (inside or out).
}
bool box_style::border_on() const
{
- return border_on_;
+ return border_on_; //! \return If the box border should be shown.
}
- box_style& box_style::border_on(bool is)
- {
+ box_style& box_style::border_on(bool is)
+ { //! Set true if the box border should be shown.
border_on_ = is;
- return *this; // Make chainable.
- }
-
+ return *this; //! \return box_style& to make chainable.
+ }
+
bool box_style::fill_on() const
{
- return fill_on_;
+ return fill_on_; //! \return if the box should be filled.
}
- box_style& box_style::fill_on(bool is)
- {
+ box_style& box_style::fill_on(bool is)
+ {//! Set true if the box should be filled.
fill_on_ = is;
return *this; // Make chainable.
}
// End class box_style Definitions.
-
enum bar_option
-{
- y_block = -2, // Rectangular (optionally filled) block style horizontal to Y-axis,
- y_stick = -1, // Bar or row line (stroke width) horizontal to Y-axis.
- no_bar = 0, // No bar.
- x_stick = +1, // Stick or column line (stroke width) vertical to X-axis.
- x_block = +2 // Rectangular (optionally filled) block style vertical to X-axis,
+{ //! \enum bar_option
+ y_block = -2, //!< Rectangular (optionally filled) block style horizontal to Y-axis,
+ y_stick = -1, //!< Bar or row line (stroke width) horizontal to Y-axis.
+ no_bar = 0, //!< No bar.
+ x_stick = +1, //!< Stick or column line (stroke width) vertical to X-axis.
+ x_block = +2 //!< Rectangular (optionally filled) block style vertical to X-axis,
// Other options like cylinders and cones might be added here?
// x_cyl = +3, x_cone = +4 ...
};
enum histogram_option
-{
+{ //! \enum histogram_option
//row = -1, // Row line (stroke width) horizontal to Y-axis. Not implemented.
// See svg_2d_plot for details of why not.
- no_histogram = 0,
- column = +1 // Stick or column line (stroke width) vertically to/from X-axis.
+ no_histogram = 0, //!< No histogram.
+ column = +1 //!< Stick or column line (stroke width) vertically to/from X-axis.
// Column is the most common histogram style.
};
@@ -1349,23 +1405,24 @@
// Member Functions Definitions.
histogram_style& histogram_style::histogram(histogram_option opt)
-{ // stick or bar.
+{ //! Histogram to be shown as sticks or bars.
histogram_option_ = opt;
- return *this; // Make chainable.
+ return *this; //! \return box_style& to make chainable.
}
double histogram_style::histogram()
-{ //
+{ //
return histogram_option_;
}
// End class histogram_style Definitions.
class bar_style
-{ // TODO should inherit from svg_style?
+{ //! \class bar_style Style (color, width, fill ...) of histogram bars.
+ // TODO should inherit from svg_style?
public:
- svg_color color_; // line stroke color. (no fill color for lines).
- svg_color area_fill_; // Fill color from line to axis. == true means color.blank = true.
- double width_; // of bar, not enclosing line width.
+ svg_color color_; //!< Color of line (stroke) (no fill color for lines).
+ svg_color area_fill_; //!< Fill color from line to axis.
+ double width_; //!< Width of bar, not enclosing line width.
bar_option bar_option_; // stick or bar.
bar_style(const svg_color& col = black, const svg_color& acol = true, double width = 2, bar_option opt = no_bar);
@@ -1395,45 +1452,45 @@
bar_style& bar_style::width(double w)
{ // of bar, not the enclosing line (stroke) width.
width_ = w;
- return *this; // Make chainable.
+ return *this; //! \return box_style& to make chainable.
}
double bar_style::width()
-{ // of bar, not enclosing line width.
- return width_;
+{
+ return width_; //! \return Width of bar, not enclosing line width.
}
bar_style& bar_style::color(const svg_color& f)
-{ // of line or enclosing line.
+{ // Set color of line or enclosing line.
color_ = f;
- return *this; // Make chainable.
+ return *this; //! \return box_style& to make chainable.
}
svg_color& bar_style::color()
-{ // of line or enclosing line.
- return color_;
+{ //
+ return color_; //! \return Color of bar line or enclosing line.
}
bar_style& bar_style::area_fill(const svg_color& f)
-{ // rectangle fill color.
+{ // Set bar rectangle fill color.
area_fill_ = f;
- return *this; // Make chainable.
+ return *this; //! \return box_style& to make chainable.
}
svg_color& bar_style::area_fill()
-{ // rectangle fill color.
- return area_fill_;
+{
+ return area_fill_; //! \return bar rectangle fill color.
}
bar_style& bar_style::bar_opt(bar_option option)
-{ // stick or bar.
+{ // Set to use stick or bar for histograms.
bar_option_ = option;
- return *this; // Make chainable.
+ return *this; //! \return box_style& to make chainable.
}
double bar_style::bar_opt()
-{ // stick or bar.
- return bar_option_;
+{
+ return bar_option_; //! \return If to use stick or bar for histograms.
}
// End class bar_style Member Functions Definitions.
@@ -1442,13 +1499,15 @@
const std::string strip_e0s(std::string s);
const std::string strip_e0s(std::string s)
-{ // Ugly hack to remove unwanted sign and leading zero(s) in exponent.
- // Use to work out the longest value label before calculate_plot_window.
- // Should also be useful for values that spill over into exponent format
- // 'by accident' - when leading zeros are likely.
- // For example, "1.2e+000" becomes "1.2"
- // (Could also do the same for uppercase E cases).
- // (Considered doing a repeated strip but complicated).
+{ /* To remove redundant sign and leading zero(s) in exponent, for example, "1.2e+000" becomes "1.2"
+ \details Used to work out the longest value label before calculate_plot_window.
+ Should also be useful for values that spill over into exponent format
+ 'by accident' - when leading zeros are likely.
+ */
+
+ // An ugly hack but works...
+ // (Could also do the same for uppercase E cases).
+ // (Considered doing a repeated strip but complicated).
using std::string;
size_t j = s.find("e+000");
@@ -1487,19 +1546,20 @@
{
s.erase(j+2, 1); // remove "0", leave "-dd"
}
- return s; // Perhaps unchanged.
+ return s; // \return length of trimmed string (perhaps unchanged).
} // const std::string strip(double d)
- static const double wh = 0.7; // font text width/height ratio.
- // Even after reading http://www.w3.org/TR/SVG/fonts.html, unclear how to
- // determine the exact width of digits, so an
- // arbitrary average width height ratio wh = 0.7 is used as a good approximation.
+ static const double wh = 0.7; //!< font text width/height ratio.
+ /*! \details Even after reading http://www.w3.org/TR/SVG/fonts.html,\n
+ unclear how to determine the exact width of digits, so an
+ arbitrary average width height ratio wh = 0.7 is used as a good approximation.
+ */
double string_svg_length(const std::string& s, const text_style& style)
-{ // Return length of string in SVG units depending on font size etc.
+{ //! \return length of string in SVG units depending on text_style (font size etc).
// If possible use an actual length, but probably platform and/or browser-dependent,
// else use average char width,
- // and deal with Unicode, for example Ω = greek omega,
+ // and deal with Unicode, for example Ω = greek omega,
// counting each symbol(s) embedded between & amd ; as one character,
// and ignore embedded xml like <sub> (not implemented by browsers yet).
@@ -1530,7 +1590,7 @@
}
d++;
}
- // std::cout << "string " << s << " has " << d << " characters." << std::endl;
+ // std::cout << "string " << s << " has " << d << " characters." << std::endl;
return d * style.font_size() * wh;
} // double string_svg_length(
Modified: sandbox/SOC/2007/visualization/boost/svg_plot/svg_test.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/svg_test.cpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/svg_test.cpp 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,5 +1,6 @@
#include "svg_2d_plot.hpp"
#include "svg_boxplot.hpp"
+
#include <map>
#include <cmath>
@@ -34,7 +35,7 @@
.x_major_labels_on(true)
.plot_window_on(true)
.y_external_style_on(true);
-
+
for(double i=.1; i < 10; i+=.1)
{
data1.insert(std::pair<double, double>(i, h(i)));
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/1d_autoscale_containers.qbk
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/1d_autoscale_containers.qbk (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/1d_autoscale_containers.qbk 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -10,7 +10,7 @@
[warning The containers must be of the same type to use the function range_all.
If different types of containers, for example some in a set and some in a vector,
then the min and max for each container must be computed separately
-and the minimum of the minimums and the maximum of the maximums injected into the
+and the minimum of the minimums and the maximum of the maximums injected into the
x_autoscale (or y_autoscale) call.]
Typical output is:
@@ -20,3 +20,11 @@
for full source code and sample output.
[endsect] [/ section:1d_autoscale_containers Tutorial: 1D Autoscale with Multiple Containers]
+
+[/ 1d_autoscale_containers.qbk
+ Copyright 2008 Jake Voytko and Paul A. Bristow 2008, 2009.
+ 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/1d_simple_tutorial.qbk
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/1d_simple_tutorial.qbk (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/1d_simple_tutorial.qbk 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,9 +1,10 @@
[section:tutorial_code_1d_example Simple 1D Example]
+
#include <boost/svg_plot/svg_1d_plot.hpp>
using namespace boost::svg;
#include <vector>
using std::vector;
-
+
int main()
{
// STL containers for the data to plot.
@@ -14,17 +15,17 @@
dan_times.push_back(4.2);
elaine_times.push_back(2.1);
elaine_times.push_back(7.8);
-
+
svg_1d_plot my_plot; // Construct a plot.
-
+
my_plot.title("Race Times") // Set title and legend.
.legend_on(true)
.x_range(-1, 11);
-
+
// Add the containers of data to the plot.
my_plot.plot(dan_times, "Dan", blue);
my_plot.plot(elaine_times, "Elaine", orange);
-
+
// And finally write the plot to a file.
my_plot.write("simple.svg");
return 0;
@@ -33,53 +34,58 @@
[$images/1d_simple.png] [/ TODO All .png should be .svg?]
[h4 A Note On Syntax]
-The syntax "`my_plot.title("Hello").legend_on(true)...`" may appear unfamiliar.
-However, it works on the same 'chaining' principle that the assignment operator, addition
-operator, and output operator in the following code works:
+The syntax
+
+`my_plot.title("Hello").legend_on(true)...`
+
+may appear unfamiliar.
+However, it works on the same 'chaining' principle that the assignment operator,
a = b = c = d = 3;
+and the addition operator, and output operator in the following code works:
+
std::cout << a + b + c + d << std::endl; // prints 12
Within all of the plot classes, 'chaining' works the same way.
-Equivalent tradional code for the example is as follows:
+Equivalent traditional code for the example is as follows:
my_plot.title("Race Times");
my_plot.legend_on(true);
my_plot.x_range(-1, 11);
-
+
Chaining allows you to avoid repeatedly typing `myplot.`
and to easily group related settings like plot window, axes, ... together,
and avoids relying on the order of arguments in ordinary function calls.
Order would clearly become impracticable with dozens of arguments required
to set all the myriad plot options.
-In the long run, I think you will find that chaining helps organize your code
-to read more clearly!
+In the long run, I think you will find that chaining helps organize your code
+to read more clearly!
[h4 Simple 1D Example Breakdown]
-Let's examine what this does in detail.
+Let's examine what this does in detail.
svg_1d_plot my_plot;
-This constructor initializes a new 1D plot, called my_plot, and also sets all the many default values.
+This constructor initializes a new 1D plot, called my_plot, and also sets all the many default values.
my_plot.title("Race Times")
.legend_on(true)
.x_range(-1, 11);
-All of the setter methods (or member functions) are fairly self-explanatory. To walk through it once,
+All of the setter methods (or member functions) are fairly self-explanatory. To walk through it once,
-* the title, which will appear at the top of the graph, will say "Race Times".
+* the title, which will appear at the top of the graph, will say "Race Times".
* `legend_on(true)` means that the legend will display.
* `x_range(-1, 11)` means that the axis displayed will be between -1 and 11,
as you can see in the above image.
-
+
my_plot.plot(my_data, "Race times");
-This draws `my_data` onto `my_plot`. As many containers as you want can be drawn
+This draws `my_data` onto `my_plot`. As many containers as you want can be drawn
to `my_plot`. The name of this data series is "Race times", and this text will show up
-in the legend (if my_plot.legend_on() == true). These are the two required parameters for this plot function call.
+in the legend (if my_plot.legend_on() == true). These are the two required parameters for this plot function call.
There are also optional parameters, as seen in the section
[@.\html\svg_plot\interface\svg_1d_plot_interface.html svg_1d_plot_interface.html]
@@ -93,7 +99,7 @@
[/ 1d_simple_tutorial.qbk
- Copyright 2008 Jake Voytko and Paul A. Bristow.
+ Copyright 2008 Jake Voytko and Paul A. Bristow 2008, 2009.
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/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 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,18 +1,13 @@
[section:tutorial_code_1d_simple Tutorial: 1D]
[include 1d_simple_tutorial.qbk]
-
[include 1d_vector_tutorial.qbk]
[include demo_1d_containers.qbk]
-[/include auto_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]
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/Jamfile.v2
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/Jamfile.v2 (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/Jamfile.v2 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,18 +1,22 @@
-# Copyright Jake Voytko 2007
-# Copyright Paul A. Bristow 2007
-
-# 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)
+# jamfile.v2 for SVG_plot using Doxygen
-# Reminder: whitespace MUST terminate variable name!
-# so space BEFORE ; and :
+# Copyright Paul A. Bristow 2009
+# Derived from Copyright Eric Niebler 2005 Boost xPressive docs.
-# SVG plot documentation as html and pdf from Quickbook.
+# 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)
+
+# Reminder: whitespace MUST terminate variable name!
+# so spaces or newlines BEFORE ; and : and AFTER too.
+# (because : and ; are keywords!)
+
+# SVG plot documentation as html and pdf from Quickbook, using Doxygen.
# project boost/doc ;
using quickbook ;
+using doxygen ;
path-constant images_location : html ;
# location of SVG images referenced by Quickbook.
@@ -23,69 +27,91 @@
:
;
+doxygen autodoc
+ :
+ [ glob ../../../boost/svg_plot/*.hpp ]
+ [ glob ../../../boost/svg_plot/detail/*.hpp ]
+ :
+ <doxygen:param>EXTRACT_ALL=YES
+ #<doxygen:param>"PREDEFINED=\"BOOST_DEDUCED_TYPENAME=typename\" "
+ #<doxygen:param>HIDE_UNDOC_MEMBERS=NO
+ #<doxygen:param>EXTRACT_PRIVATE=NO
+ #<doxygen:param>ENABLE_PREPROCESSING=YES
+ #<doxygen:param>MACRO_EXPANSION=YES
+ #<doxygen:param>EXPAND_ONLY_PREDEF=YES
+ #<doxygen:param>SEARCH_INCLUDES=YES
+ #<doxygen:param>INCLUDE_PATH=$(BOOST_ROOT)
+;
+
+
# import boostbook : boostbook ;
-boostbook standalone
- :
+boostbook standalone
+ :
svg_plot
:
-
- # Path for links to Boost:
- <xsl:param>boost.root=../../../../../../../../trunk
- # Path for libraries index:
- <xsl:param>boost.libraries=$(boost-root)/libs/libraries.htm
- # Use the main Boost stylesheet:
- <xsl:param>html.stylesheet=../../../../../../../../trunk/doc/html/boostbook.css
- # Use the svg_plot local Boost stylesheet:
- # <xsl:param>html.stylesheet=./html/boostbook.css
-
- # Some general style settings:
- <xsl:param>table.footnote.number.format=1
- <xsl:param>footnote.number.format=1
-
- # HTML options first:
- # Use graphics not text for navigation:
- <xsl:param>navig.graphics=1
- # How far down we chunk nested sections, basically all of them:
- <xsl:param>chunk.section.depth=10
- # Don't put the first section on the same page as the TOC:
- <xsl:param>chunk.first.sections=1
- # How far down sections get TOC's
- <xsl:param>toc.section.depth=10
- # Max depth in each TOC:
- <xsl:param>toc.max.depth=4
- # How far down we go with TOC's
- <xsl:param>generate.section.toc.level=10
- #<xsl:param>root.filename="sf_dist_and_tools"
-
+
+ # Path for links to Boost:
+ #<xsl:param>boost.root=../../../../../../../../trunk
+ <xsl:param>boost.root=../../../../../../../../boost_trunk
+ # Path for libraries index:
+ <xsl:param>boost.libraries=$(boost-root)/libs/libraries.htm
+ # Use the main Boost stylesheet:
+ <xsl:param>html.stylesheet=../../../../../../../../boost_trunk/doc/html/boostbook.css
+ #<xsl:param>html.stylesheet=../../../../../../../../trunk/doc/html/boostbook.css
+ # Use the svg_plot local Boost stylesheet:
+ # <xsl:param>html.stylesheet=./html/boostbook.css
+
+ # Some general style settings:
+ <xsl:param>table.footnote.number.format=1
+ <xsl:param>footnote.number.format=1
+
+ # HTML options first:
+ # Use graphics not text for navigation:
+ <xsl:param>navig.graphics=1
+ # How far down we chunk nested sections, basically all of them:
+ <xsl:param>chunk.section.depth=10
+ # Don't put the first section on the same page as the TOC:
+ <xsl:param>chunk.first.sections=1
+ # How far down sections get TOC's
+ <xsl:param>toc.section.depth=10
+ # Max depth in each TOC:
+ <xsl:param>toc.max.depth=4
+ # How far down we go with TOC's
+ <xsl:param>generate.section.toc.level=10
+ #<xsl:param>root.filename="sf_dist_and_tools"
+
# <xsl:param>project.root=http://beta.boost.org/development
# <xsl:param>annotation.support=1
# <xsl:param>quickbook.source.style.show="'true'"
-
- # PDF Options:
- # TOC Generation: this is needed for FOP-0.9 and later:
- # <xsl:param>fop1.extensions=1
- <format>pdf:<xsl:param>xep.extensions=1
- # TOC generation: this is needed for FOP 0.2, but must not be set to zero for FOP-0.9!
- <format>pdf:<xsl:param>fop.extensions=0
- # No indent on body text:
- <format>pdf:<xsl:param>body.start.indent=0pt
- # Margin size:
- <format>pdf:<xsl:param>page.margin.inner=0.5in
- # Margin size:
- <format>pdf:<xsl:param>page.margin.outer=0.5in
- # Paper type = A4
- <format>pdf:<xsl:param>paper.type=A4
- # Yes, we want graphics for admonishments:
- <xsl:param>admon.graphics=1
- # Set this one for PDF generation *only*:
- # default pnd graphics are awful in PDF form,
- # better use SVG's instead:
- <format>pdf:<xsl:param>admon.graphics.extension=".svg"
- <format>pdf:<xsl:param>use.role.for.mediaobject=1
- <format>pdf:<xsl:param>preferred.mediaobject.role=print
- <format>pdf:<xsl:param>img.src.path=$(images_location)/
- <format>pdf:<xsl:param>admon.graphics.path=$(images_location)/images/
- <format>pdf:<xsl:param>draft.mode="no"
- ;
+
+ # PDF Options:
+ # TOC Generation: this is needed for FOP-0.9 and later:
+ # <xsl:param>fop1.extensions=1
+ <format>pdf:<xsl:param>xep.extensions=1
+ # TOC generation: this is needed for FOP 0.2, but must not be set to zero for FOP-0.9!
+ <format>pdf:<xsl:param>fop.extensions=0
+ # No indent on body text:
+ <format>pdf:<xsl:param>body.start.indent=0pt
+ # Margin size:
+ <format>pdf:<xsl:param>page.margin.inner=0.5in
+ # Margin size:
+ <format>pdf:<xsl:param>page.margin.outer=0.5in
+ # Paper type = A4
+ <format>pdf:<xsl:param>paper.type=A4
+ # Yes, we want graphics for admonishments:
+ <xsl:param>admon.graphics=1
+ # Set this one for PDF generation *only*:
+ # default pnd graphics are awful in PDF form,
+ # better use SVG's instead:
+ <format>pdf:<xsl:param>admon.graphics.extension=".svg"
+ <format>pdf:<xsl:param>use.role.for.mediaobject=1
+ <format>pdf:<xsl:param>preferred.mediaobject.role=print
+ <format>pdf:<xsl:param>img.src.path=$(images_location)/
+ <format>pdf:<xsl:param>admon.graphics.path=$(images_location)/images/
+ <format>pdf:<xsl:param>draft.mode="no"
+
+ <dependency>autodoc
+
+ ;
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/acknowledgements.qbk
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/acknowledgements.qbk (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/acknowledgements.qbk 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -3,14 +3,19 @@
* [*Google]: For offering Summer of Code, and giving me the opportunity to do
something I never would have done otherwise.
+
* [*JoaquÃn Mª López Muñoz]: My GSoC mentor. His proofreading and advice
-helped shape the project into what it is today, and prevented small problems
+helped shape the project into what it is today, and prevented small problems
from becoming major problems.
+
* [*Paul A. Bristow]: For showing an active interest, offering literally dozens
of minor and major features he'd like to see, and for helping with Boost.Build.
+
* [*Matias Capeletto]: For showing an active interest, and offering feature
suggestions.
+
* [*Sarah Braun]: For helping me pick colors for examples.
+
* [*Boost Community]: For all of the encouragement, suggestions, disagreements,
and patience.
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/how_to_use.qbk
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/how_to_use.qbk (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/how_to_use.qbk 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,19 +1,18 @@
[section:howtouse How To Use This Documentation]
* Tutorial pages are intended for those who do not know how to use the program.
- * The pages that begin with the tag "Tutorial: Simple" are for absolute
- beginners.
- * "Tutorial: Full" should give the intermediate user a good
+ * The pages that begin with the tag "Tutorial: Simple" are for absolute beginners.
+ * "Tutorial: Full" should give the intermediate user a good
reference, as well as show how the program can be used
* "Tutorial: Special" shows other features/options that the headers
provide to the user.
-* The pages labelled "*Public Interface*" give reference information for
-their respective subjects. You can find all public methods (and data members,
+* The pages labelled "*Public Interface*" give reference information for
+their respective subjects. You can find all public methods (and data members,
when structs are concerned) in these sections.
* If you have a feature request, or if it appears that my implementation
is in error, please check the [@svg_plot/todo.html To Do] page first, as well
-as the respective rationale section, if it exists. If I
-you do not find your idea/complaint, please reach me either through the Boost
+as the respective rationale section, if it exists. If I
+you do not find your idea/complaint, please reach me either through the Boost
development list, or email me at jakevoytko (at) gmail (dot) com
[heading Admonishments]
@@ -21,11 +20,11 @@
[note These blocks typically go into more detail about an explanation given
above.]
[tip These blocks contain information that you may find helpful while coding.]
-[important These contain information that is imperative to understanding a
+[important These contain information that is imperative to understanding a
concept.
-Failure to follow suggestions in these blocks will probably result in undesired behavior.
+Failure to follow suggestions in these blocks will probably result in undesired behavior.
Read all of these you find.]
-[warning It is imperative that you follow these. Failure to do so will lead to
+[warning It is imperative that you follow these. Failure to do so will lead to
incorrect, and likely undesired, results in the plot.]
And the first admonishment I will use is as follows:
@@ -35,17 +34,17 @@
whose mentor organization is Boost.]
[heading Preface]
-Humans have a fantastic capacity for visual understanding, and merely looking
-at data organized in one, two, or three dimensions allows us to see relations
-not otherwise visible in a list of numbers. Computers, however, deal with
+Humans have a fantastic capacity for visual understanding, and merely looking
+at data organized in one, two, or three dimensions allows us to see relations
+not otherwise visible in a list of numbers. Computers, however, deal with
information numerically, and C++ and the
[@http://en.wikipedia.org/wiki/Standard_Template_Library Standard Template Library (STL)]
do not currently offer a way to bridge the gap.
This library helps the user to easily plot data stored in STL containers.
-This project is focused on using STL containers in order to graph data on a
-one-dimensional and two-dimensional (and in future, perhaps, 3D) plot. The plot
-will currently be written to a
+This project is focused on using STL containers in order to graph data on a
+one-dimensional and two-dimensional (and in future, perhaps, 3D) plot. The plot
+will currently be written to a
[@http://en.wikipedia.org/wiki/Scalable_Vector_Graphics Scalable Vector Graphic image].
[@http://www.w3.org/TR/SVG11/ Scalable Vector Graphics (SVG)] is an
@@ -58,25 +57,35 @@
[@http://www.adobe.com/products/acrobat/readstep2.htmlAdobe Acrobat Reader],
* [@www.opera.com Opera] has [@http://www.opera.com/docs/specs/svg/ svg support]
but the quality if redering is often not as good as other browsers.
+
* Microsoft Internet Explorer, provided a suitable
[@http://www.adobe.com/svg/ Adobe SVG Viewer plug-in for SVG files] is installed,
+(note that Adobe have stopped offering this (as they warned years ago)
+but the download software can still be obtained elsewhere, for example from
+[@http://adobe-svg-viewer.software.informer.com/download/ software.informer].
+Shamefully, even IE8 does not yet offer SVG rendering.
+Information about limitations of IE with Vista are given on the
+[@http://www.adobe.com/svg/viewer/install/main.html Adobe End of Line FAQ]
+
* [@http://www.inkscape.org/ Inkscape, a fine Open Source SVG viewer
with excellent rendering, full scaling and other editing features.
-* and by many other graphics programs.
+
+* and by many other graphics programs, for example see
+[@http://svg.software.informer.com/software/ Most popular SVG software].
The goals of the project are:
-* To let users produce simple plots with minimal intervention by using sane
+* To let users produce simple plots with minimal intervention by using sane
defaults.
* To allow users to easily customize plots.
-* To allow the user to talk to the plot classes using coordinate units
+* To allow the user to talk to the plot classes using coordinate units
rather than pixels or other arbitrary measures.
-* To create the backbone of a `svg` class that can be extended to fully support
+* To create the backbone of a `svg` class that can be extended to fully support
the standard.
-* compliance with the
+* compliance with the
[@http://www.w3.org/TR/SVG11/ W3C Scalable vector Graph standard].
-[note Comments and suggestions to Jake Voytko
-at jakevoytko (at) gmail (dot) com]
+[note Comments and suggestions to Jake Voytko at jakevoytko (at) gmail (dot) com
+or Paul.A.Bristow (at) gmail (dot) com]
[endsect] [/section:howtouse How To Use This Documentation]
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/index.html
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/index.html (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/index.html 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,34 +1,39 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>SVG_Plot</title>
-<link rel="stylesheet" href="../../../../../../../../trunk/doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
-<link rel="start" href="index.html" title="SVG_Plot">
-<link rel="next" href="svg_plot/howtouse.html" title=" How To Use This Documentation">
+<title>SVG_Plot Manual</title>
+<link rel="stylesheet" href="../../../../../../../../boost_trunk/doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="index.html" title="SVG_Plot Manual">
+<link rel="next" href="index/s01.html" title="Reference">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
-<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../trunk/boost.png"></td>
-<td align="center">Home</td>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost_trunk/boost.png"></td>
+<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
-<td align="center">More</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
</tr></table>
<hr>
-<div class="spirit-nav"><a accesskey="n" href="svg_plot/howtouse.html"><img src="../../../../../../../../trunk/doc/html/images/next.png" alt="Next"></a></div>
+<div class="spirit-nav"><a accesskey="n" href="index/s01.html"><img src="../../../../../../../../boost_trunk/doc/html/images/next.png" alt="Next"></a></div>
<div class="article" lang="en">
<div class="titlepage">
<div>
<div><h2 class="title">
-<a name="svg_plot"></a>SVG_Plot</h2></div>
-<div><div class="authorgroup"><div class="author"><h3 class="author">
+<a name="SVG%20plot%20documentation"></a>SVG_Plot Manual</h2></div>
+<div><div class="authorgroup">
+<div class="author"><h3 class="author">
<span class="firstname">Jake</span> <span class="surname">Voytko</span>
-</h3></div></div></div>
-<div><p class="copyright">Copyright © 2007 Jake Voytko</p></div>
+</h3></div>
+<div class="author"><h3 class="author">
+<span class="firstname">Paul A.</span> <span class="surname">Bristow</span>
+</h3></div>
+</div></div>
+<div><p class="copyright">Copyright © 2007 , 2008, 2009 Jake Voytko and Paul A. Bristow</p></div>
<div><div class="legalnotice">
-<a name="id506771"></a><p>
+<a name="id816494"></a><p>
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)
</p>
@@ -39,81 +44,102 @@
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
-<dt><span class="section"> How To Use This Documentation</span></dt>
-<dt><span class="section"> To Do List</span></dt>
-<dt><span class="section"> Colors</span></dt>
-<dt><span class="section"> SVG tutorial</span></dt>
-<dt><span class="section"> Tutorial: 1D</span></dt>
+<dt><span class="section">Reference</span></dt>
+<dd><dl>
+<dt><span class="section">Header <boost/svg_plot/detail/auto_axes.hpp></span></dt>
+<dt><span class="section">Header <boost/svg_plot/detail/axis_plot_frame.hpp></span></dt>
+<dt><span class="section">Header <boost/svg_plot/detail/functors.hpp></span></dt>
+<dt><span class="section">Header <boost/svg_plot/detail/numeric_limits_handling.hpp></span></dt>
+<dt><span class="section">Header <boost/svg_plot/detail/pair.hpp></span></dt>
+<dt><span class="section">Header <boost/svg_plot/detail/svg_boxplot_detail.hpp></span></dt>
+<dt><span class="section">Header <boost/svg_plot/detail/svg_style_detail.hpp></span></dt>
+<dt><span class="section">Header <boost/svg_plot/quantile.hpp></span></dt>
+<dt><span class="section">Header <boost/svg_plot/show_1d_settings.hpp></span></dt>
+<dt><span class="section">Header <boost/svg_plot/show_2d_settings.hpp></span></dt>
+<dt><span class="section">Header <boost/svg_plot/stylesheet.hpp></span></dt>
+<dt><span class="section">Header <boost/svg_plot/svg_1d_plot.hpp></span></dt>
+<dt><span class="section">Header <boost/svg_plot/svg_boxplot.hpp></span></dt>
+<dt><span class="section">Header <boost/svg_plot/svg_color.hpp></span></dt>
+<dt><span class="section">Header <boost/svg_plot/svg_style.hpp></span></dt>
+</dl></dd>
+<dt><span class="section"> testing links</span></dt>
+<dt><span class="section"> How To Use This Documentation</span></dt>
+<dt><span class="section"> To Do List</span></dt>
+<dt><span class="section"> Colors</span></dt>
+<dt><span class="section"> SVG tutorial</span></dt>
+<dt><span class="section"> Tutorial: 1D</span></dt>
<dd><dl>
-<dt><span class="section"><a href="svg_plot/tutorial_code_1d_simple/tutorial_code_1d_example.html">
+<dt><span class="section"><a href="svg_plot_manual/tutorial_code_1d_simple/tutorial_code_1d_example.html">
Simple 1D Example</a></span></dt>
-<dt><span class="section"><a href="svg_plot/tutorial_code_1d_simple/1d_vector_tutorial.html">
+<dt><span class="section"><a href="svg_plot_manual/tutorial_code_1d_simple/1d_vector_tutorial.html">
1-D Vector Example</a></span></dt>
-<dt><span class="section"><a href="svg_plot/tutorial_code_1d_simple/demo_1d_containers_tutorial.html">
+<dt><span class="section"><a href="svg_plot_manual/tutorial_code_1d_simple/demo_1d_containers_tutorial.html">
1-D Containers Examples</a></span></dt>
-<dt><span class="section"><a href="svg_plot/tutorial_code_1d_simple/full_1d_layout.html"> Tutorial:
- 1D Full Layout Example</a></span></dt>
-<dt><span class="section"><a href="svg_plot/tutorial_code_1d_simple/1d_special.html"> Tutorial:
- 1D Special Features</a></span></dt>
-<dt><span class="section"><a href="svg_plot/tutorial_code_1d_simple/1d_autoscale_containers.html">
+<dt><span class="section"><a href="svg_plot_manual/tutorial_code_1d_simple/full_1d_layout.html">
+ Tutorial: 1D Full Layout Example</a></span></dt>
+<dt><span class="section"><a href="svg_plot_manual/tutorial_code_1d_simple/1d_special.html">
+ Tutorial: 1D Special Features</a></span></dt>
+<dt><span class="section"><a href="svg_plot_manual/tutorial_code_1d_simple/1d_autoscale_containers.html">
Tutorial: 1D Autoscale with Multiple Containers</a></span></dt>
-<dt><span class="section"><a href="svg_plot/tutorial_code_1d_simple/demo_1d_axis_scaling.html">
+<dt><span class="section"><a href="svg_plot_manual/tutorial_code_1d_simple/demo_1d_axis_scaling.html">
1-D Axis Scaling</a></span></dt>
-<dt><span class="section"><a href="svg_plot/tutorial_code_1d_simple/demo_1d_autoscaling.html">
+<dt><span class="section"><a href="svg_plot_manual/tutorial_code_1d_simple/demo_1d_autoscaling.html">
1-D Autoscaling Various Containers Examples</a></span></dt>
-<dt><span class="section"><a href="svg_plot/tutorial_code_1d_simple/demo_1d_values.html"> 1-D
- Data Values Examples</a></span></dt>
+<dt><span class="section"><a href="svg_plot_manual/tutorial_code_1d_simple/demo_1d_values.html">
+ 1-D Data Values Examples</a></span></dt>
</dl></dd>
-<dt><span class="section"> Tutorial: 2D</span></dt>
+<dt><span class="section"> Tutorial: 2D</span></dt>
<dd><dl>
-<dt><span class="section"><a href="svg_plot/tutorial_2d_code_simple/2d_simple_code_example.html">
+<dt><span class="section"><a href="svg_plot_manual/tutorial_2d_code_simple/2d_simple_code_example.html">
Simple Code Example</a></span></dt>
-<dt><span class="section"><a href="svg_plot/tutorial_2d_code_simple/full_2d_layout.html"> Tutorial:
- Fuller Layout Example</a></span></dt>
-<dt><span class="section"><a href="svg_plot/tutorial_2d_code_simple/2d_special.html"> Tutorial:
- 2D Special Features</a></span></dt>
+<dt><span class="section"><a href="svg_plot_manual/tutorial_2d_code_simple/full_2d_layout.html">
+ Tutorial: Fuller Layout Example</a></span></dt>
+<dt><span class="section"><a href="svg_plot_manual/tutorial_2d_code_simple/2d_special.html">
+ Tutorial: 2D Special Features</a></span></dt>
</dl></dd>
-<dt><span class="section"> Tutorial: Boxplot</span></dt>
+<dt><span class="section"> Tutorial: Boxplot</span></dt>
<dd><dl>
-<dt><span class="section"><a href="svg_plot/svg_boxplot_tutorial/svg_boxplot_tutorial_simple.html">
+<dt><span class="section"><a href="svg_plot_manual/svg_boxplot_tutorial/svg_boxplot_tutorial_simple.html">
Simple Example</a></span></dt>
-<dt><span class="section"><a href="svg_plot/svg_boxplot_tutorial/svg_boxplot_tutorial_full.html">
+<dt><span class="section"><a href="svg_plot_manual/svg_boxplot_tutorial/svg_boxplot_tutorial_full.html">
Full Boxplot Layout</a></span></dt>
-<dt><span class="section"><a href="svg_plot/svg_boxplot_tutorial/svg_boxplot_quartiles.html">
+<dt><span class="section"><a href="svg_plot_manual/svg_boxplot_tutorial/svg_boxplot_quartiles.html">
Definitions of the Quartiles</a></span></dt>
</dl></dd>
-<dt><span class="section"> Stylesheet Tutorial</span></dt>
-<dt><span class="section"> Behavior</span></dt>
+<dt><span class="section"> Stylesheet Tutorial</span></dt>
+<dt><span class="section"> Behavior</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="svg_plot_manual/behavior/behavior_limits.html"> Numerical
+ Limits</a></span></dt>
+<dt><span class="section"> Stylesheets</span></dt>
+</dl></dd>
+<dt><span class="section"> Plot Defaults</span></dt>
<dd><dl>
-<dt><span class="section"> Numerical Limits</span></dt>
-<dt><span class="section"> Stylesheets</span></dt>
+<dt><span class="section"> svg_1d_plot
Defaults</span></dt>
+<dt><span class="section"> svg_2d_plot
Defaults</span></dt>
</dl></dd>
-<dt><span class="section"> Plot Defaults</span></dt>
+<dt><span class="section"> Public Interfaces</span></dt>
<dd><dl>
-<dt><span class="section"><a href="svg_plot/plot_defaults/1d_defaults.html"> <code class="computeroutput"><span class="identifier">svg_1d_plot</span></code>
- Defaults</a></span></dt>
-<dt><span class="section"><a href="svg_plot/plot_defaults/2d_defaults.html"> <code class="computeroutput"><span class="identifier">svg_2d_plot</span></code>
- Defaults</a></span></dt>
-</dl></dd>
-<dt><span class="section"> Public Interfaces</span></dt>
-<dd><dl>
-<dt><span class="section"><a href="svg_plot/interface/svg_interface.html"> <code class="computeroutput"><span class="identifier">svg</span></code>
- Public Interface</a></span></dt>
-<dt><span class="section"> svg_1d_plot
Public Interface</span></dt>
-<dt><span class="section"> svg_2d_plot
Public Interface</span></dt>
-<dt><span class="section"> svg_boxplot
Public Interface</span></dt>
-<dt><span class="section"> Show settings Public Interface</span></dt>
+<dt><span class="section"> svg
Public Interface</span></dt>
+<dt><span class="section"> svg_1d_plot
Public Interface</span></dt>
+<dt><span class="section"> svg_2d_plot
Public Interface</span></dt>
+<dt><span class="section"> svg_boxplot
Public Interface</span></dt>
+<dt><span class="section"><a href="svg_plot_manual/interface/settings.html"> Show settings Public
+ Interface</a></span></dt>
</dl></dd>
-<dt><span class="section"> Implementation & Rationale</span></dt>
-<dt><span class="section"> Acknowledgements</span></dt>
+<dt><span class="section"> Implementation & Rationale</span></dt>
+<dt><span class="section"> Acknowledgements</span></dt>
</dl>
</div>
+<p>
+ [/ $images is ref to folder where images are held.
+ </p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: June 11, 2008 at 17:21:34 GMT</small></p></td>
+<td align="left"><p><small>Last revised: January 22, 2009 at 16:00:36 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
-<div class="spirit-nav"><a accesskey="n" href="svg_plot/howtouse.html"><img src="../../../../../../../../trunk/doc/html/images/next.png" alt="Next"></a></div>
+<div class="spirit-nav"><a accesskey="n" href="index/s01.html"><img src="../../../../../../../../boost_trunk/doc/html/images/next.png" alt="Next"></a></div>
</body>
</html>
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/acknowledgements.html
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/acknowledgements.html (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/acknowledgements.html 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,20 +1,20 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> Acknowledgements</title>
+<title>Acknowledgements</title>
<link rel="stylesheet" href="../../../../../../../../../trunk/doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
-<link rel="start" href="../index.html" title="SVG_Plot">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../index.html" title="SVG_Plot">
<link rel="up" href="../index.html" title="SVG_Plot">
-<link rel="prev" href="implementation.html" title=" Implementation & Rationale">
+<link rel="prev" href="implementation.html" title="Implementation & Rationale">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../../trunk/boost.png"></td>
<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
@@ -23,7 +23,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="svg_plot.acknowledgements"></a> Acknowledgements
+<a name="svg_plot.acknowledgements"></a><a class="link" href="acknowledgements.html" title="Acknowledgements"> Acknowledgements</a>
</h2></div></div></div>
<p>
I would like to thank the following people:
@@ -59,7 +59,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2007 Jake Voytko<p>
+<td align="right"><div class="copyright-footer">Copyright © 2007 , 2008, 2009 Jake Voytko and Paul A. Bristow<p>
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)
</p>
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/behavior.html
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/behavior.html (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/behavior.html 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,21 +1,21 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> Behavior</title>
+<title>Behavior</title>
<link rel="stylesheet" href="../../../../../../../../../trunk/doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
-<link rel="start" href="../index.html" title="SVG_Plot">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../index.html" title="SVG_Plot">
<link rel="up" href="../index.html" title="SVG_Plot">
-<link rel="prev" href="tutorial_stylesheet.html" title=" Stylesheet Tutorial">
-<link rel="next" href="behavior/behavior_limits.html" title=" Numerical Limits">
+<link rel="prev" href="tutorial_stylesheet.html" title="Stylesheet Tutorial">
+<link rel="next" href="behavior/behavior_limits.html" title="Numerical Limits">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../../trunk/boost.png"></td>
<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
@@ -24,7 +24,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="svg_plot.behavior"></a> Behavior
+<a name="svg_plot.behavior"></a><a class="link" href="behavior.html" title="Behavior"> Behavior</a>
</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section"> Numerical Limits</span></dt>
@@ -33,7 +33,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2007 Jake Voytko<p>
+<td align="right"><div class="copyright-footer">Copyright © 2007 , 2008, 2009 Jake Voytko and Paul A. Bristow<p>
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)
</p>
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/behavior/behavior_limits.html
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/behavior/behavior_limits.html (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/behavior/behavior_limits.html 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,21 +1,21 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> Numerical Limits</title>
+<title>Numerical Limits</title>
<link rel="stylesheet" href="../../../../../../../../../../trunk/doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
-<link rel="start" href="../../index.html" title="SVG_Plot">
-<link rel="up" href="../behavior.html" title=" Behavior">
-<link rel="prev" href="../behavior.html" title=" Behavior">
-<link rel="next" href="behavior_stylesheets.html" title=" Stylesheets">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../../index.html" title="SVG_Plot">
+<link rel="up" href="../behavior.html" title="Behavior">
+<link rel="prev" href="../behavior.html" title="Behavior">
+<link rel="next" href="behavior_stylesheets.html" title="Stylesheets">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../../../trunk/boost.png"></td>
<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
@@ -24,7 +24,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="svg_plot.behavior.behavior_limits"></a> Numerical Limits
+<a name="svg_plot.behavior.behavior_limits"></a><a class="link" href="behavior_limits.html" title="Numerical Limits"> Numerical Limits</a>
</h3></div></div></div>
<p>
All limits that are dealt with are double precision floating-point limits.
@@ -43,8 +43,8 @@
<span class="identifier">whitesmoke</span></code>. This will become customizable.
</p>
<a name="svg_plot.behavior.behavior_limits.nan"></a><h5>
-<a name="id550740"></a>
- NaN
+<a name="id748192"></a>
+ <a class="link" href="behavior_limits.html#svg_plot.behavior.behavior_limits.nan">NaN</a>
</h5>
<p>
Any double precision floating-point numbers that return a nonzero value for
@@ -53,15 +53,14 @@
user-defined coordinates as 0.
</p>
<a name="svg_plot.behavior.behavior_limits.infinity"></a><h5>
-<a name="id550799"></a>
- Infinity
+<a name="id748226"></a>
+ <a class="link" href="behavior_limits.html#svg_plot.behavior.behavior_limits.infinity">Infinity</a>
</h5>
<p>
Any double precision floating point number that is equal to either of the
following is considered to be Infinity:
</p>
-<pre class="programlisting">
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special"><</span><span class="keyword">double</span><span class="special">>::</span><span class="identifier">max</span><span class="special">()</span>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special"><</span><span class="keyword">double</span><span class="special">>::</span><span class="identifier">max</span><span class="special">()</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special"><</span><span class="keyword">double</span><span class="special">>::</span><span class="identifier">infinity</span><span class="special">()</span>
</pre>
<p>
@@ -70,16 +69,15 @@
appear at the top of the graph.
</p>
<a name="svg_plot.behavior.behavior_limits.negative_infinity"></a><h5>
-<a name="id550936"></a>
- <a href="behavior_limits.html#svg_plot.behavior.behavior_limits.negative_infinity">Negative
+<a name="id748862"></a>
+ <a class="link" href="behavior_limits.html#svg_plot.behavior.behavior_limits.negative_infinity">Negative
Infinity</a>
</h5>
<p>
Any double precision floating point number that is equal to either of the
following is considered to be Negative Infinity:
</p>
-<pre class="programlisting">
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special"><</span><span class="keyword">double</span><span class="special">>::</span><span class="identifier">min</span><span class="special">()</span>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special"><</span><span class="keyword">double</span><span class="special">>::</span><span class="identifier">min</span><span class="special">()</span>
<span class="special">-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special"><</span><span class="keyword">double</span><span class="special">>::</span><span class="identifier">infinity</span><span class="special">()</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special"><</span><span class="keyword">double</span><span class="special">>::</span><span class="identifier">denorm_min</span><span class="special">()</span>
</pre>
@@ -97,7 +95,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2007 Jake Voytko<p>
+<td align="right"><div class="copyright-footer">Copyright © 2007 , 2008, 2009 Jake Voytko and Paul A. Bristow<p>
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)
</p>
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/behavior/behavior_stylesheets.html
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/behavior/behavior_stylesheets.html (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/behavior/behavior_stylesheets.html 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,21 +1,21 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> Stylesheets</title>
+<title>Stylesheets</title>
<link rel="stylesheet" href="../../../../../../../../../../trunk/doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
-<link rel="start" href="../../index.html" title="SVG_Plot">
-<link rel="up" href="../behavior.html" title=" Behavior">
-<link rel="prev" href="behavior_limits.html" title=" Numerical Limits">
-<link rel="next" href="../plot_defaults.html" title=" Plot Defaults">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../../index.html" title="SVG_Plot">
+<link rel="up" href="../behavior.html" title="Behavior">
+<link rel="prev" href="behavior_limits.html" title="Numerical Limits">
+<link rel="next" href="../plot_defaults.html" title="Plot Defaults">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../../../trunk/boost.png"></td>
<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
@@ -24,7 +24,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="svg_plot.behavior.behavior_stylesheets"></a> Stylesheets
+<a name="svg_plot.behavior.behavior_stylesheets"></a><a class="link" href="behavior_stylesheets.html" title="Stylesheets"> Stylesheets</a>
</h3></div></div></div>
<p>
Stylesheets currently have only a single way of being used with the program:
@@ -50,8 +50,7 @@
preclude a method that extracts appropriate data from the CSS file and calls
the appropriate functions. For example, if the user provides the following:
</p>
-<pre class="programlisting">
-<span class="preprocessor">#Background</span>
+<pre class="programlisting"><span class="preprocessor">#Background</span>
<span class="special">{</span>
<span class="identifier">fill</span> <span class="special">:</span> <span class="preprocessor">#FFF</span><span class="special">;</span>
<span class="identifier">stroke</span> <span class="special">:</span> #<span class="number">041010</span> <span class="special">;</span>
@@ -60,8 +59,7 @@
<p>
why shouldn't
</p>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">background_color</span><span class="special">(</span><span class="identifier">black</span><span class="special">);</span>
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">background_color</span><span class="special">(</span><span class="identifier">black</span><span class="special">);</span>
<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">background_border_color</span><span class="special">(</span><span class="identifier">svg_color</span><span class="special">(</span><span class="number">4</span><span class="special">,</span> <span class="number">16</span><span class="special">,</span> <span class="number">16</span><span class="special">));</span>
</pre>
<p>
@@ -89,8 +87,7 @@
<p>
</p>
-<pre class="programlisting">
-<span class="identifier">rect</span>
+<pre class="programlisting"><span class="identifier">rect</span>
<span class="special">{</span>
<span class="identifier">fill</span> <span class="special">:</span> #<span class="number">00FF</span><span class="number">00</span><span class="special">;</span>
<span class="identifier">stroke</span> <span class="special">:</span> #<span class="number">00FF</span><span class="number">00</span><span class="special">;</span>
@@ -113,7 +110,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2007 Jake Voytko<p>
+<td align="right"><div class="copyright-footer">Copyright © 2007 , 2008, 2009 Jake Voytko and Paul A. Bristow<p>
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)
</p>
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/color.html
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/color.html (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/color.html 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,21 +1,21 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> Colors</title>
+<title>Colors</title>
<link rel="stylesheet" href="../../../../../../../../../trunk/doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
-<link rel="start" href="../index.html" title="SVG_Plot">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../index.html" title="SVG_Plot">
<link rel="up" href="../index.html" title="SVG_Plot">
-<link rel="prev" href="todo.html" title=" To Do List">
-<link rel="next" href="svg_tutorial.html" title=" SVG tutorial">
+<link rel="prev" href="todo.html" title="To Do List">
+<link rel="next" href="svg_tutorial.html" title="SVG tutorial">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../../trunk/boost.png"></td>
<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
@@ -24,7 +24,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="svg_plot.color"></a> Colors
+<a name="svg_plot.color"></a><a class="link" href="color.html" title="Colors"> Colors</a>
</h2></div></div></div>
<p>
The project supports any <a href="http://en.wikipedia.org/wiki/RGB_color_model" target="_top">RGB
@@ -32,8 +32,8 @@
by the SVG standard</a>.
</p>
<a name="svg_plot.color._code__phrase_role__identifier__svg_color_constant__phrase___code_"></a><h4>
-<a name="id450711"></a>
- svg_color_constant
+<a name="id698153"></a>
+ <a class="link" href="color.html#svg_plot.color._code__phrase_role__identifier__svg_color_constant__phrase___code_"><code class="computeroutput"><span class="identifier">svg_color_constant</span></code></a>
</h4>
<p>
<code class="computeroutput"><span class="identifier">svg_color_constant</span></code> is simply
@@ -62,12 +62,11 @@
for defining defaults for functions, for example.
</p>
<a name="svg_plot.color.example_of_using__code__phrase_role__identifier__svg_color_constant__phrase___code_"></a><h5>
-<a name="id450844"></a>
- <a href="color.html#svg_plot.color.example_of_using__code__phrase_role__identifier__svg_color_constant__phrase___code_">Example
+<a name="id698228"></a>
+ <a class="link" href="color.html#svg_plot.color.example_of_using__code__phrase_role__identifier__svg_color_constant__phrase___code_">Example
of using <code class="computeroutput"><span class="identifier">svg_color_constant</span></code></a>
</h5>
-<pre class="programlisting">
-<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">svg</span><span class="special">;</span>
+<pre class="programlisting"><span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">svg</span><span class="special">;</span>
<span class="identifier">svg_2d_plot</span> <span class="identifier">my_plot</span><span class="special">;</span>
@@ -91,8 +90,7 @@
currently an <code class="computeroutput"><span class="identifier">svg_color</span><span class="special">::</span><span class="keyword">operator</span><span class="special">=(</span><span class="identifier">svg_color_constant</span><span class="special">)</span></code>
overload, so
</p>
-<pre class="programlisting">
-<span class="identifier">svg_color</span> <span class="identifier">my_color</span> <span class="special">=</span> <span class="identifier">red</span><span class="special">;</span>
+<pre class="programlisting"><span class="identifier">svg_color</span> <span class="identifier">my_color</span> <span class="special">=</span> <span class="identifier">red</span><span class="special">;</span>
</pre>
<p>
does not have the desired effect, and nor does <code class="computeroutput"><span class="identifier">cout</span>
@@ -103,15 +101,14 @@
</td></tr>
</table></div>
<a name="svg_plot.color._code__phrase_role__identifier__svg_color__phrase___code__interface"></a><h5>
-<a name="id506933"></a>
- svg_color
interface
+<a name="id698482"></a>
+ <a class="link" href="color.html#svg_plot.color._code__phrase_role__identifier__svg_color__phrase___code__interface"><code class="computeroutput"><span class="identifier">svg_color</span></code> interface</a>
</h5>
<p>
You can define a <code class="computeroutput"><span class="identifier">svg_color</span></code>
using two different constructors:
</p>
-<pre class="programlisting">
-<span class="comment">// The parameters are red, green, and blue respectively.
+<pre class="programlisting"><span class="comment">// The parameters are red, green, and blue respectively.
</span><span class="identifier">svg_color</span><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">);</span>
<span class="comment">// Use a pre-existing color constant.
@@ -128,12 +125,11 @@
</p></td></tr>
</table></div>
<a name="svg_plot.color.example_of_using__code__phrase_role__identifier__svg_color__phrase___code_"></a><h5>
-<a name="id507085"></a>
- <a href="color.html#svg_plot.color.example_of_using__code__phrase_role__identifier__svg_color__phrase___code_">Example
+<a name="id698579"></a>
+ <a class="link" href="color.html#svg_plot.color.example_of_using__code__phrase_role__identifier__svg_color__phrase___code_">Example
of using <code class="computeroutput"><span class="identifier">svg_color</span></code></a>
</h5>
-<pre class="programlisting">
-<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">svg</span><span class="special">;</span>
+<pre class="programlisting"><span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">svg</span><span class="special">;</span>
<span class="identifier">svg_color</span> <span class="identifier">my_white</span><span class="special">(</span><span class="number">255</span><span class="special">,</span> <span class="number">255</span><span class="special">,</span> <span class="number">255</span><span class="special">);</span> <span class="comment">// RGB constructor.
</span><span class="identifier">svg_color</span> <span class="identifier">const_white</span><span class="special">(</span><span class="identifier">white</span><span class="special">);</span> <span class="comment">// SVG defined named constructor.
@@ -166,8 +162,8 @@
</p></td></tr>
</table></div>
<a name="svg_plot.color.colors_internals_and_rationale"></a><h4>
-<a name="id507382"></a>
- <a href="color.html#svg_plot.color.colors_internals_and_rationale">Colors Internals
+<a name="id698780"></a>
+ <a class="link" href="color.html#svg_plot.color.colors_internals_and_rationale">Colors Internals
and Rationale</a>
</h4>
<p>
@@ -188,7 +184,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2007 Jake Voytko<p>
+<td align="right"><div class="copyright-footer">Copyright © 2007 , 2008, 2009 Jake Voytko and Paul A. Bristow<p>
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)
</p>
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/howtouse.html
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/howtouse.html (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/howtouse.html 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,21 +1,21 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> How To Use This Documentation</title>
+<title>How To Use This Documentation</title>
<link rel="stylesheet" href="../../../../../../../../../trunk/doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
-<link rel="start" href="../index.html" title="SVG_Plot">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../index.html" title="SVG_Plot">
<link rel="up" href="../index.html" title="SVG_Plot">
<link rel="prev" href="../index.html" title="SVG_Plot">
-<link rel="next" href="todo.html" title=" To Do List">
+<link rel="next" href="todo.html" title="To Do List">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../../trunk/boost.png"></td>
<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
@@ -24,7 +24,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="svg_plot.howtouse"></a> How To Use This Documentation
+<a name="svg_plot.howtouse"></a><a class="link" href="howtouse.html" title="How To Use This Documentation"> How To Use This Documentation</a>
</h2></div></div></div>
<div class="itemizedlist"><ul type="disc">
<li>
@@ -58,8 +58,8 @@
</li>
</ul></div>
<a name="svg_plot.howtouse.admonishments"></a><h4>
-<a name="id495481"></a>
- Admonishments
+<a name="id697798"></a>
+ <a class="link" href="howtouse.html#svg_plot.howtouse.admonishments">Admonishments</a>
</h4>
<div class="note"><table border="0" summary="Note">
<tr>
@@ -114,8 +114,8 @@
</p></td></tr>
</table></div>
<a name="svg_plot.howtouse.preface"></a><h4>
-<a name="id495563"></a>
- Preface
+<a name="id697855"></a>
+ <a class="link" href="howtouse.html#svg_plot.howtouse.preface">Preface</a>
</h4>
<p>
Humans have a fantastic capacity for visual understanding, and merely looking
@@ -195,12 +195,13 @@
</tr>
<tr><td align="left" valign="top"><p>
Comments and suggestions to Jake Voytko at jakevoytko (at) gmail (dot) com
+ or Paul.A.Bristow (at) gmail (dot) com
</p></td></tr>
</table></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2007 Jake Voytko<p>
+<td align="right"><div class="copyright-footer">Copyright © 2007 , 2008, 2009 Jake Voytko and Paul A. Bristow<p>
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)
</p>
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/interface.html
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/interface.html (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/interface.html 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,23 +1,21 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> Public Interfaces</title>
+<title>Public Interfaces</title>
<link rel="stylesheet" href="../../../../../../../../../trunk/doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
-<link rel="start" href="../index.html" title="SVG_Plot">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../index.html" title="SVG_Plot">
<link rel="up" href="../index.html" title="SVG_Plot">
-<link rel="prev" href="plot_defaults/2d_defaults.html" title=" svg_2d_plot
- Defaults">
-<link rel="next" href="interface/svg_interface.html" title=" svg
- Public Interface">
+<link rel="prev" href="plot_defaults/2d_defaults.html" title="svg_2d_plot Defaults">
+<link rel="next" href="interface/svg_interface.html" title="svg Public Interface">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../../trunk/boost.png"></td>
<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
@@ -26,7 +24,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="svg_plot.interface"></a> Public Interfaces
+<a name="svg_plot.interface"></a><a class="link" href="interface.html" title="Public Interfaces"> Public Interfaces</a>
</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="interface/svg_interface.html"> <code class="computeroutput"><span class="identifier">svg</span></code>
@@ -39,7 +37,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2007 Jake Voytko<p>
+<td align="right"><div class="copyright-footer">Copyright © 2007 , 2008, 2009 Jake Voytko and Paul A. Bristow<p>
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)
</p>
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/interface/svg_1d_plot_interface.html
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/interface/svg_1d_plot_interface.html (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/interface/svg_1d_plot_interface.html 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,22 +1,21 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> svg_1d_plot Public Interface</title>
+<title>svg_1d_plot Public Interface</title>
<link rel="stylesheet" href="../../../../../../../../../../trunk/doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
-<link rel="start" href="../../index.html" title="SVG_Plot">
-<link rel="up" href="../interface.html" title=" Public Interfaces">
-<link rel="prev" href="svg_interface.html" title=" svg
- Public Interface">
-<link rel="next" href="svg_2d_plot_interface.html" title=" svg_2d_plot Public Interface">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../../index.html" title="SVG_Plot">
+<link rel="up" href="../interface.html" title="Public Interfaces">
+<link rel="prev" href="svg_interface.html" title="svg Public Interface">
+<link rel="next" href="svg_2d_plot_interface.html" title="svg_2d_plot Public Interface">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../../../trunk/boost.png"></td>
<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
@@ -25,10 +24,10 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="svg_plot.interface.svg_1d_plot_interface"></a> svg_1d_plot
Public Interface
+<a name="svg_plot.interface.svg_1d_plot_interface"></a><a class="link" href="svg_1d_plot_interface.html" title="svg_1d_plot Public Interface"> <code class="computeroutput"><span class="identifier">svg_1d_plot</span></code> Public Interface</a>
</h3></div></div></div>
<div class="table">
-<a name="id558510"></a><p class="title"><b>Table 8. 1D_plot Miscellaneous Functions</b></p>
+<a name="id757366"></a><p class="title"><b>Table 8. 1D_plot Miscellaneous Functions</b></p>
<div class="table-contents"><table class="table" summary="1D_plot Miscellaneous Functions">
<colgroup>
<col>
@@ -274,7 +273,7 @@
</table></div>
</div>
<br class="table-break"><div class="table">
-<a name="id559436"></a><p class="title"><b>Table 9. 1D_plot Commands</b></p>
+<a name="id758069"></a><p class="title"><b>Table 9. 1D_plot Commands</b></p>
<div class="table-contents"><table class="table" summary="1D_plot Commands">
<colgroup>
<col>
@@ -497,7 +496,7 @@
</table></div>
</div>
<br class="table-break"><div class="table">
-<a name="id560184"></a><p class="title"><b>Table 10. 1D_plot Colors</b></p>
+<a name="id758655"></a><p class="title"><b>Table 10. 1D_plot Colors</b></p>
<div class="table-contents"><table class="table" summary="1D_plot Colors">
<colgroup>
<col>
@@ -710,7 +709,7 @@
</table></div>
</div>
<br class="table-break"><div class="table">
-<a name="id561253"></a><p class="title"><b>Table 11. 1D_plot X-Axis Definition</b></p>
+<a name="id759454"></a><p class="title"><b>Table 11. 1D_plot X-Axis Definition</b></p>
<div class="table-contents"><table class="table" summary="1D_plot X-Axis Definition">
<colgroup>
<col>
@@ -923,8 +922,8 @@
</table></div>
</div>
<br class="table-break"><a name="svg_plot.interface.svg_1d_plot_interface.the_1d_plot__code__phrase_role__identifier__plot__phrase__phrase_role__special______phrase___code__method"></a><h5>
-<a name="id562298"></a>
- <a href="svg_1d_plot_interface.html#svg_plot.interface.svg_1d_plot_interface.the_1d_plot__code__phrase_role__identifier__plot__phrase__phrase_role__special______phrase___code__method">The
+<a name="id760229"></a>
+ <a class="link" href="svg_1d_plot_interface.html#svg_plot.interface.svg_1d_plot_interface.the_1d_plot__code__phrase_role__identifier__plot__phrase__phrase_role__special______phrase___code__method">The
1D_plot <code class="computeroutput"><span class="identifier">plot</span><span class="special">()</span></code>
Method</a>
</h5>
@@ -934,7 +933,7 @@
named parameters, as well as a deduced parameter.
</p>
<div class="table">
-<a name="id562356"></a><p class="title"><b>Table 12. 1D_plot Required parameter</b></p>
+<a name="id760264"></a><p class="title"><b>Table 12. 1D_plot Required parameter</b></p>
<div class="table-contents"><table class="table" summary="1D_plot Required parameter">
<colgroup>
<col>
@@ -1015,7 +1014,7 @@
</p></td></tr>
</table></div>
<div class="table">
-<a name="id562502"></a><p class="title"><b>Table 13. 1D_plot Deduced parameter</b></p>
+<a name="id760382"></a><p class="title"><b>Table 13. 1D_plot Deduced parameter</b></p>
<div class="table-contents"><table class="table" summary="1D_plot Deduced parameter">
<colgroup>
<col>
@@ -1076,7 +1075,7 @@
</table></div>
</div>
<br class="table-break"><div class="table">
-<a name="id562615"></a><p class="title"><b>Table 14. 1D_plot Optional Parameters</b></p>
+<a name="id760478"></a><p class="title"><b>Table 14. 1D_plot Optional Parameters</b></p>
<div class="table-contents"><table class="table" summary="1D_plot Optional Parameters">
<colgroup>
<col>
@@ -1192,8 +1191,7 @@
to double, for example, age of a user-defined type <code class="computeroutput"><span class="identifier">humans</span></code>.
For example:
</p>
-<pre class="programlisting">
-<span class="keyword">class</span> <span class="identifier">my_functor</span>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">my_functor</span>
<span class="special">{</span>
<span class="identifier">typdef</span> <span class="keyword">double</span> <span class="identifier">result_type</span><span class="special">;</span>
@@ -1227,19 +1225,18 @@
method:
</p>
<a name="svg_plot.interface.svg_1d_plot_interface.using_1d_plot_fill_and_stroke_colors"></a><h5>
-<a name="id563175"></a>
- <a href="svg_1d_plot_interface.html#svg_plot.interface.svg_1d_plot_interface.using_1d_plot_fill_and_stroke_colors">Using
+<a name="id760897"></a>
+ <a class="link" href="svg_1d_plot_interface.html#svg_plot.interface.svg_1d_plot_interface.using_1d_plot_fill_and_stroke_colors">Using
1D_plot fill and stroke colors</a>
</h5>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">plot</span><span class="special">(</span><span class="identifier">my_data</span><span class="special">,</span> <span class="string">"Lions"</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">plot</span><span class="special">(</span><span class="identifier">my_data</span><span class="special">,</span> <span class="string">"Lions"</span><span class="special">)</span>
<span class="special">.</span><span class="identifier">fill_color</span><span class="special">(</span><span class="identifier">red</span><span class="special">).</span>
<span class="special">.</span><span class="identifier">line_color</span><span class="special">(</span><span class="identifier">black</span><span class="special">);</span>
</pre>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2007 Jake Voytko<p>
+<td align="right"><div class="copyright-footer">Copyright © 2007 , 2008, 2009 Jake Voytko and Paul A. Bristow<p>
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)
</p>
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/interface/svg_2d_plot_interface.html
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/interface/svg_2d_plot_interface.html (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/interface/svg_2d_plot_interface.html 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,21 +1,21 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> svg_2d_plot Public Interface</title>
+<title>svg_2d_plot Public Interface</title>
<link rel="stylesheet" href="../../../../../../../../../../trunk/doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
-<link rel="start" href="../../index.html" title="SVG_Plot">
-<link rel="up" href="../interface.html" title=" Public Interfaces">
-<link rel="prev" href="svg_1d_plot_interface.html" title=" svg_1d_plot Public Interface">
-<link rel="next" href="svg_boxplot_interface.html" title=" svg_boxplot Public Interface">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../../index.html" title="SVG_Plot">
+<link rel="up" href="../interface.html" title="Public Interfaces">
+<link rel="prev" href="svg_1d_plot_interface.html" title="svg_1d_plot Public Interface">
+<link rel="next" href="svg_boxplot_interface.html" title="svg_boxplot Public Interface">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../../../trunk/boost.png"></td>
<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
@@ -24,10 +24,10 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="svg_plot.interface.svg_2d_plot_interface"></a> svg_2d_plot
Public Interface
+<a name="svg_plot.interface.svg_2d_plot_interface"></a><a class="link" href="svg_2d_plot_interface.html" title="svg_2d_plot Public Interface"> <code class="computeroutput"><span class="identifier">svg_2d_plot</span></code> Public Interface</a>
</h3></div></div></div>
<div class="table">
-<a name="id563329"></a><p class="title"><b>Table 15. 2D_plot Miscellaneous</b></p>
+<a name="id760998"></a><p class="title"><b>Table 15. 2D_plot Miscellaneous</b></p>
<div class="table-contents"><table class="table" summary="2D_plot Miscellaneous">
<colgroup>
<col>
@@ -142,7 +142,7 @@
</table></div>
</div>
<br class="table-break"><div class="table">
-<a name="id563720"></a><p class="title"><b>Table 16. 2D_plot On/Off Switches</b></p>
+<a name="id761306"></a><p class="title"><b>Table 16. 2D_plot On/Off Switches</b></p>
<div class="table-contents"><table class="table" summary="2D_plot On/Off Switches">
<colgroup>
<col>
@@ -663,8 +663,7 @@
<code class="computeroutput"><span class="keyword">enum</span> <span class="identifier">rotate_style</span></code>
provides control is 45 degree steps. Default is horizontal.
</p>
-<pre class="programlisting">
-<span class="keyword">enum</span> <span class="identifier">rotate_style</span>
+<pre class="programlisting"><span class="keyword">enum</span> <span class="identifier">rotate_style</span>
<span class="special">{</span> <span class="comment">// Rotation in degrees from horizontal. horizontal = 0, // normal left to right.
</span> <span class="identifier">uphill</span> <span class="special">=</span> <span class="special">-</span><span class="number">45</span><span class="special">,</span> <span class="comment">// slope up.
</span> <span class="identifier">upward</span> <span class="special">=</span> <span class="special">-</span><span class="number">90</span><span class="special">,</span> <span class="comment">// vertical writing up.
@@ -860,7 +859,7 @@
</table></div>
</div>
<br class="table-break"><div class="table">
-<a name="id567058"></a><p class="title"><b>Table 17. 2D_plot Colors</b></p>
+<a name="id764872"></a><p class="title"><b>Table 17. 2D_plot Colors</b></p>
<div class="table-contents"><table class="table" summary="2D_plot Colors">
<colgroup>
<col>
@@ -1217,7 +1216,7 @@
</table></div>
</div>
<br class="table-break"><div class="table">
-<a name="id568571"></a><p class="title"><b>Table 18. 2D_plot Axis Information</b></p>
+<a name="id766288"></a><p class="title"><b>Table 18. 2D_plot Axis Information</b></p>
<div class="table-contents"><table class="table" summary="2D_plot Axis Information">
<colgroup>
<col>
@@ -1724,8 +1723,7 @@
<p>
For example, after a call of
</p>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">y_num_minor_ticks</span><span class="special">(</span><span class="number">9</span><span class="special">);</span> <span class="comment">// Chose 9 minor ticks between y major ticks.
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">y_num_minor_ticks</span><span class="special">(</span><span class="number">9</span><span class="special">);</span> <span class="comment">// Chose 9 minor ticks between y major ticks.
</span>
<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">y_num_minor_ticks</span><span class="special">()</span> <span class="special">==</span> <span class="number">9</span>
</pre>
@@ -1734,7 +1732,7 @@
the settings from accessors below.
</p>
<div class="table">
-<a name="id570954"></a><p class="title"><b>Table 19. 2D_plot Accessor functions</b></p>
+<a name="id768058"></a><p class="title"><b>Table 19. 2D_plot Accessor functions</b></p>
<div class="table-contents"><table class="table" summary="2D_plot Accessor functions">
<colgroup>
<col>
@@ -1843,8 +1841,8 @@
</table></div>
</div>
<br class="table-break"><a name="svg_plot.interface.svg_2d_plot_interface.the__code__phrase_role__identifier__plot__phrase__phrase_role__special______phrase___code__method"></a><h5>
-<a name="id571386"></a>
- <a href="svg_2d_plot_interface.html#svg_plot.interface.svg_2d_plot_interface.the__code__phrase_role__identifier__plot__phrase__phrase_role__special______phrase___code__method">The
+<a name="id768931"></a>
+ <a class="link" href="svg_2d_plot_interface.html#svg_plot.interface.svg_2d_plot_interface.the__code__phrase_role__identifier__plot__phrase__phrase_role__special______phrase___code__method">The
<code class="computeroutput"><span class="identifier">plot</span><span class="special">()</span></code>
Method</a>
</h5>
@@ -1853,7 +1851,7 @@
method supports two parameters & some chained functions.
</p>
<div class="table">
-<a name="id571445"></a><p class="title"><b>Table 20. 2D_plot Required Parameter</b></p>
+<a name="id768966"></a><p class="title"><b>Table 20. 2D_plot Required Parameter</b></p>
<div class="table-contents"><table class="table" summary="2D_plot Required Parameter">
<colgroup>
<col>
@@ -1916,7 +1914,7 @@
</table></div>
</div>
<br class="table-break"><div class="table">
-<a name="id571566"></a><p class="title"><b>Table 21. 2D_plotChained Functions</b></p>
+<a name="id769069"></a><p class="title"><b>Table 21. 2D_plotChained Functions</b></p>
<div class="table-contents"><table class="table" summary="2D_plotChained Functions">
<colgroup>
<col>
@@ -1971,7 +1969,7 @@
</table></div>
</div>
<br class="table-break"><div class="table">
-<a name="id571666"></a><p class="title"><b>Table 22. 2D_plot Optional Parameters</b></p>
+<a name="id769155"></a><p class="title"><b>Table 22. 2D_plot Optional Parameters</b></p>
<div class="table-contents"><table class="table" summary="2D_plot Optional Parameters">
<colgroup>
<col>
@@ -2180,8 +2178,7 @@
not convert to double, for example, like plotting a vector of humans:
</p>
-<pre class="programlisting">
-<span class="keyword">class</span> <span class="identifier">my_functor</span>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">my_functor</span>
<span class="special">{</span>
<span class="identifier">typdef</span> <span class="identifier">pair</span><span class="special"><</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">double</span><span class="special">></span> <span class="identifier">result_type</span><span class="special">;</span>
@@ -2213,19 +2210,18 @@
Here are some examples of correct uses:
</p>
<a name="svg_plot.interface.svg_2d_plot_interface.using_fill_and_stroke_colors"></a><h4>
-<a name="id572494"></a>
- <a href="svg_2d_plot_interface.html#svg_plot.interface.svg_2d_plot_interface.using_fill_and_stroke_colors">Using
+<a name="id769779"></a>
+ <a class="link" href="svg_2d_plot_interface.html#svg_plot.interface.svg_2d_plot_interface.using_fill_and_stroke_colors">Using
fill and stroke colors</a>
</h4>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.(</span><span class="identifier">my_data</span><span class="special">,</span> <span class="string">"Lions"</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.(</span><span class="identifier">my_data</span><span class="special">,</span> <span class="string">"Lions"</span><span class="special">)</span>
<span class="special">.</span><span class="identifier">fill_color</span><span class="special">(</span><span class="identifier">red</span><span class="special">)</span>
<span class="special">.</span><span class="identifier">stroke_color</span><span class="special">(</span><span class="identifier">black</span><span class="special">);</span>
</pre>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2007 Jake Voytko<p>
+<td align="right"><div class="copyright-footer">Copyright © 2007 , 2008, 2009 Jake Voytko and Paul A. Bristow<p>
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)
</p>
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/interface/svg_boxplot_interface.html
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/interface/svg_boxplot_interface.html (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/interface/svg_boxplot_interface.html 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,21 +1,21 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> svg_boxplot Public Interface</title>
+<title>svg_boxplot Public Interface</title>
<link rel="stylesheet" href="../../../../../../../../../../trunk/doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
-<link rel="start" href="../../index.html" title="SVG_Plot">
-<link rel="up" href="../interface.html" title=" Public Interfaces">
-<link rel="prev" href="svg_2d_plot_interface.html" title=" svg_2d_plot Public Interface">
-<link rel="next" href="settings.html" title=" Show settings Public Interface">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../../index.html" title="SVG_Plot">
+<link rel="up" href="../interface.html" title="Public Interfaces">
+<link rel="prev" href="svg_2d_plot_interface.html" title="svg_2d_plot Public Interface">
+<link rel="next" href="settings.html" title="Show settings Public Interface">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../../../trunk/boost.png"></td>
<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
@@ -24,10 +24,10 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="svg_plot.interface.svg_boxplot_interface"></a> svg_boxplot
Public Interface
+<a name="svg_plot.interface.svg_boxplot_interface"></a><a class="link" href="svg_boxplot_interface.html" title="svg_boxplot Public Interface"> <code class="computeroutput"><span class="identifier">svg_boxplot</span></code> Public Interface</a>
</h3></div></div></div>
<div class="table">
-<a name="id572638"></a><p class="title"><b>Table 23. Boxplot Miscellaneous</b></p>
+<a name="id769872"></a><p class="title"><b>Table 23. Boxplot Miscellaneous</b></p>
<div class="table-contents"><table class="table" summary="Boxplot Miscellaneous">
<colgroup>
<col>
@@ -102,7 +102,7 @@
</table></div>
</div>
<br class="table-break"><div class="table">
-<a name="id572932"></a><p class="title"><b>Table 24. Boxplot Commands</b></p>
+<a name="id770101"></a><p class="title"><b>Table 24. Boxplot Commands</b></p>
<div class="table-contents"><table class="table" summary="Boxplot Commands">
<colgroup>
<col>
@@ -190,7 +190,7 @@
</table></div>
</div>
<br class="table-break"><div class="table">
-<a name="id573262"></a><p class="title"><b>Table 25. Boxplot Colors</b></p>
+<a name="id770355"></a><p class="title"><b>Table 25. Boxplot Colors</b></p>
<div class="table-contents"><table class="table" summary="Boxplot Colors">
<colgroup>
<col>
@@ -341,7 +341,7 @@
</table></div>
</div>
<br class="table-break"><div class="table">
-<a name="id573994"></a><p class="title"><b>Table 26. Boxplot Axis Information</b></p>
+<a name="id770907"></a><p class="title"><b>Table 26. Boxplot Axis Information</b></p>
<div class="table-contents"><table class="table" summary="Boxplot Axis Information">
<colgroup>
<col>
@@ -528,8 +528,8 @@
preceeding code).
</p>
<a name="svg_plot.interface.svg_boxplot_interface.the__code__phrase_role__identifier__plot__phrase__phrase_role__special______phrase___code__function"></a><h5>
-<a name="id574898"></a>
- <a href="svg_boxplot_interface.html#svg_plot.interface.svg_boxplot_interface.the__code__phrase_role__identifier__plot__phrase__phrase_role__special______phrase___code__function">The
+<a name="id773218"></a>
+ <a class="link" href="svg_boxplot_interface.html#svg_plot.interface.svg_boxplot_interface.the__code__phrase_role__identifier__plot__phrase__phrase_role__special______phrase___code__function">The
<code class="computeroutput"><span class="identifier">plot</span><span class="special">()</span></code>
Function</a>
</h5>
@@ -539,7 +539,7 @@
control their display.
</p>
<div class="table">
-<a name="id574958"></a><p class="title"><b>Table 27. Required parameters</b></p>
+<a name="id773252"></a><p class="title"><b>Table 27. Required parameters</b></p>
<div class="table-contents"><table class="table" summary="Required parameters">
<colgroup>
<col>
@@ -602,7 +602,7 @@
</table></div>
</div>
<br class="table-break"><div class="table">
-<a name="id575079"></a><p class="title"><b>Table 28. Optional Functions</b></p>
+<a name="id773357"></a><p class="title"><b>Table 28. Optional Functions</b></p>
<div class="table-contents"><table class="table" summary="Optional Functions">
<colgroup>
<col>
@@ -865,8 +865,7 @@
a container of a user-defined class, for example human, that does not
have a conversion to double. For example:
</p>
-<pre class="programlisting">
-<span class="keyword">class</span> <span class="identifier">my_functor</span>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">my_functor</span>
<span class="special">{</span>
<span class="identifier">typdef</span> <span class="keyword">double</span> <span class="identifier">result_type</span><span class="special">;</span>
@@ -895,8 +894,8 @@
</table></div>
</div>
<br class="table-break"><a name="svg_plot.interface.svg_boxplot_interface.styles___provide_additional_control"></a><h5>
-<a name="id576224"></a>
- <a href="svg_boxplot_interface.html#svg_plot.interface.svg_boxplot_interface.styles___provide_additional_control">Styles
+<a name="id774224"></a>
+ <a class="link" href="svg_boxplot_interface.html#svg_plot.interface.svg_boxplot_interface.styles___provide_additional_control">Styles
- provide Additional Control</a>
</h5>
<p>
@@ -904,8 +903,7 @@
use too. For most applications the functions listed above will provide enough
control, but styles are documented here:
</p>
-<pre class="programlisting">
-<span class="keyword">class</span> <span class="identifier">svg_style</span><span class="special">;</span>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">svg_style</span><span class="special">;</span>
<span class="keyword">class</span> <span class="identifier">text_style</span><span class="special">;</span> <span class="comment">// Font, size, etc parameters of text like title, legend, labels ...
</span><span class="keyword">class</span> <span class="identifier">plot_point_style</span><span class="special">;</span> <span class="comment">// Parameters of points maarking data series values.
</span><span class="keyword">class</span> <span class="identifier">plot_line_style</span><span class="special">;</span> <span class="comment">// Parameters of lines joining data series values.
@@ -913,15 +911,14 @@
</span><span class="keyword">class</span> <span class="identifier">ticks_labels_style</span><span class="special">;</span> <span class="comment">// Parameters of the axis, grids, & ticks and their value labels.
</span></pre>
<a name="svg_plot.interface.svg_boxplot_interface.box_style_defines_a_rectangular_box_"></a><h4>
-<a name="id576404"></a>
- <a href="svg_boxplot_interface.html#svg_plot.interface.svg_boxplot_interface.box_style_defines_a_rectangular_box_">Box
+<a name="id774342"></a>
+ <a class="link" href="svg_boxplot_interface.html#svg_plot.interface.svg_boxplot_interface.box_style_defines_a_rectangular_box_">Box
Style defines a rectangular box.</a>
</h4>
<p>
A box has a border and may be filled with the same or a different color.
</p>
-<pre class="programlisting">
-<span class="keyword">class</span> <span class="identifier">box_style</span>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">box_style</span>
<span class="special">{</span> <span class="comment">// Style of a rectangular box.
</span> <span class="comment">// Use for image, legend & plot window.
</span><span class="keyword">public</span><span class="special">:</span>
@@ -949,7 +946,7 @@
<span class="special">};</span> <span class="comment">// class box_style
</span></pre>
<div class="table">
-<a name="id577047"></a><p class="title"><b>Table 29. Box Style Constructor</b></p>
+<a name="id774807"></a><p class="title"><b>Table 29. Box Style Constructor</b></p>
<div class="table-contents"><table class="table" summary="Box Style Constructor">
<colgroup>
<col>
@@ -1117,7 +1114,7 @@
</table></div>
</div>
<br class="table-break"><div class="table">
-<a name="id577298"></a><p class="title"><b>Table 30. Box Style Accessor functions (all are chainable).</b></p>
+<a name="id775031"></a><p class="title"><b>Table 30. Box Style Accessor functions (all are chainable).</b></p>
<div class="table-contents"><table class="table" summary="Box Style Accessor functions (all are chainable).">
<colgroup>
<col>
@@ -1320,15 +1317,14 @@
</table></div>
</div>
<br class="table-break"><a name="svg_plot.interface.svg_boxplot_interface.text_style_defines_font__size__style___amp__stretch__weight__decoration__"></a><h4>
-<a name="id577615"></a>
- <a href="svg_boxplot_interface.html#svg_plot.interface.svg_boxplot_interface.text_style_defines_font__size__style___amp__stretch__weight__decoration__">Text
+<a name="id775305"></a>
+ <a class="link" href="svg_boxplot_interface.html#svg_plot.interface.svg_boxplot_interface.text_style_defines_font__size__style___amp__stretch__weight__decoration__">Text
Style defines Font, Size, Style (& stretch, weight, decoration).</a>
</h4>
<p>
Text style constructor.
</p>
-<pre class="programlisting">
-<span class="identifier">text_style</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">size</span> <span class="special">=</span> <span class="number">20</span><span class="special">,</span>
+<pre class="programlisting"><span class="identifier">text_style</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">size</span> <span class="special">=</span> <span class="number">20</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">font</span> <span class="special">=</span> <span class="string">""</span><span class="special">,</span> <span class="comment">// Default is sans with Firefox & IE, but serif with Opera.
</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">style</span> <span class="special">=</span> <span class="string">""</span><span class="special">,</span> <span class="comment">// italic, bold.
</span> <span class="comment">// Functions not yet implemented by most browsers.
@@ -1346,7 +1342,7 @@
</span><span class="special">}</span>
</pre>
<div class="table">
-<a name="id578147"></a><p class="title"><b>Table 31. Text Style Constructor</b></p>
+<a name="id775683"></a><p class="title"><b>Table 31. Text Style Constructor</b></p>
<div class="table-contents"><table class="table" summary="Text Style Constructor">
<colgroup>
<col>
@@ -1529,14 +1525,13 @@
<p>
produces a normal default font of size 20 svg units (usually pixels).
</p>
-<pre class="programlisting">
-<span class="identifier">text_style</span> <span class="identifier">my_style</span><span class="special">(</span><span class="number">14</span><span class="special">,</span> <span class="string">"Lucida Sans Unicode"</span><span class="special">,</span> <span class="string">"italic"</span><span class="special">);</span>
+<pre class="programlisting"><span class="identifier">text_style</span> <span class="identifier">my_style</span><span class="special">(</span><span class="number">14</span><span class="special">,</span> <span class="string">"Lucida Sans Unicode"</span><span class="special">,</span> <span class="string">"italic"</span><span class="special">);</span>
</pre>
<p>
produces a Lucida Sans Unicode font of size of 14 svg units (usually pixels).
</p>
<div class="table">
-<a name="id578484"></a><p class="title"><b>Table 32. Text Style Accessor functions</b></p>
+<a name="id775968"></a><p class="title"><b>Table 32. Text Style Accessor functions</b></p>
<div class="table-contents"><table class="table" summary="Text Style Accessor functions">
<colgroup>
<col>
@@ -1750,12 +1745,11 @@
</table></div>
</div>
<br class="table-break"><a name="svg_plot.interface.svg_boxplot_interface.plot_point_style_defines_how_data_points_are_marked_"></a><h4>
-<a name="id578811"></a>
- <a href="svg_boxplot_interface.html#svg_plot.interface.svg_boxplot_interface.plot_point_style_defines_how_data_points_are_marked_">plot_point_style
+<a name="id776248"></a>
+ <a class="link" href="svg_boxplot_interface.html#svg_plot.interface.svg_boxplot_interface.plot_point_style_defines_how_data_points_are_marked_">plot_point_style
defines how data points are marked.</a>
</h4>
-<pre class="programlisting">
-<span class="keyword">class</span> <span class="identifier">plot_point_style</span>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">plot_point_style</span>
<span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="identifier">svg_color</span> <span class="identifier">fill_color_</span><span class="special">;</span> <span class="comment">// Color of the centre of the shape.
@@ -1777,7 +1771,7 @@
<span class="special">}</span>
</pre>
<div class="table">
-<a name="id579443"></a><p class="title"><b>Table 33. Plot Point Style Constructor</b></p>
+<a name="id776705"></a><p class="title"><b>Table 33. Plot Point Style Constructor</b></p>
<div class="table-contents"><table class="table" summary="Plot Point Style Constructor">
<colgroup>
<col>
@@ -1924,22 +1918,19 @@
<br class="table-break"><p>
Examples:
</p>
-<pre class="programlisting">
-<span class="identifier">point_style_</span><span class="special">(</span><span class="identifier">black</span><span class="special">,</span> <span class="identifier">blank</span><span class="special">,</span> <span class="number">10</span><span class="special">,</span> <span class="identifier">round</span><span class="special">),</span> <span class="comment">// Default point style, black 10 point unfilled circle.
+<pre class="programlisting"><span class="identifier">point_style_</span><span class="special">(</span><span class="identifier">black</span><span class="special">,</span> <span class="identifier">blank</span><span class="special">,</span> <span class="number">10</span><span class="special">,</span> <span class="identifier">round</span><span class="special">),</span> <span class="comment">// Default point style, black 10 point unfilled circle.
</span><span class="identifier">point_style_</span><span class="special">(</span><span class="identifier">red</span><span class="special">,</span> <span class="identifier">yellow</span><span class="special">,</span> <span class="number">5</span><span class="special">,</span> <span class="identifier">square</span><span class="special">),</span> <span class="comment">// Point style, red 5 square filled yellow.
</span></pre>
<p>
It is usually convenient to override point styles onto calls of plot function
by chaining thus:
</p>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">plot</span><span class="special">(</span><span class="identifier">data2</span><span class="special">,</span> <span class="string">"-2 + x^2"</span><span class="special">).</span><span class="identifier">fill_color</span><span class="special">(</span><span class="identifier">orange</span><span class="special">).</span><span class="identifier">size</span><span class="special">(</span><span class="number">5</span><span class="special">).</span><span class="identifier">shape</span><span class="special">(</span><span class="identifier">square</span><span class="special">);</span>
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">plot</span><span class="special">(</span><span class="identifier">data2</span><span class="special">,</span> <span class="string">"-2 + x^2"</span><span class="special">).</span><span class="identifier">fill_color</span><span class="special">(</span><span class="identifier">orange</span><span class="special">).</span><span class="identifier">size</span><span class="special">(</span><span class="number">5</span><span class="special">).</span><span class="identifier">shape</span><span class="special">(</span><span class="identifier">square</span><span class="special">);</span>
</pre>
<p>
Shapes available are:
</p>
-<pre class="programlisting">
-<span class="keyword">enum</span> <span class="identifier">point_shape</span>
+<pre class="programlisting"><span class="keyword">enum</span> <span class="identifier">point_shape</span>
<span class="special">{</span> <span class="comment">// Marking a data point.
</span> <span class="comment">// Used in draw_plot_point in axis_plot_frame.hpp
</span> <span class="identifier">none</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span>
@@ -1966,7 +1957,7 @@
</span><span class="special">};</span>
</pre>
<div class="table">
-<a name="id580318"></a><p class="title"><b>Table 34. Plot Point Style Accessor Functions</b></p>
+<a name="id778121"></a><p class="title"><b>Table 34. Plot Point Style Accessor Functions</b></p>
<div class="table-contents"><table class="table" summary="Plot Point Style Accessor Functions">
<colgroup>
<col>
@@ -2169,12 +2160,11 @@
</table></div>
</div>
<br class="table-break"><a name="svg_plot.interface.svg_boxplot_interface.plot_line_style_defines_how_data_points_are_joined_"></a><h4>
-<a name="id580635"></a>
- <a href="svg_boxplot_interface.html#svg_plot.interface.svg_boxplot_interface.plot_line_style_defines_how_data_points_are_joined_">plot_line_style
+<a name="id778391"></a>
+ <a class="link" href="svg_boxplot_interface.html#svg_plot.interface.svg_boxplot_interface.plot_line_style_defines_how_data_points_are_joined_">plot_line_style
defines how data points are joined.</a>
</h4>
-<pre class="programlisting">
-<span class="keyword">class</span> <span class="identifier">plot_line_style</span>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">plot_line_style</span>
<span class="special">{</span> <span class="comment">// Style of line joining data series values.
</span><span class="keyword">public</span><span class="special">:</span>
<span class="identifier">svg_color</span> <span class="identifier">color_</span><span class="special">;</span> <span class="comment">// Line stroke color. (No fill color for lines).
@@ -2190,7 +2180,7 @@
</span> <span class="special">}</span>
</pre>
<div class="table">
-<a name="id581145"></a><p class="title"><b>Table 35. Plot Line Style Constructor</b></p>
+<a name="id778758"></a><p class="title"><b>Table 35. Plot Line Style Constructor</b></p>
<div class="table-contents"><table class="table" summary="Plot Line Style Constructor">
<colgroup>
<col>
@@ -2355,19 +2345,17 @@
<br class="table-break"><p>
Examples:
</p>
-<pre class="programlisting">
-<span class="identifier">my_line_style</span> <span class="identifier">line_style_</span><span class="special">(</span><span class="identifier">black</span><span class="special">,</span> <span class="keyword">true</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="keyword">true</span><span class="special">,</span> <span class="keyword">false</span><span class="special">);</span>
+<pre class="programlisting"><span class="identifier">my_line_style</span> <span class="identifier">line_style_</span><span class="special">(</span><span class="identifier">black</span><span class="special">,</span> <span class="keyword">true</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="keyword">true</span><span class="special">,</span> <span class="keyword">false</span><span class="special">);</span>
<span class="comment">// Black straight line joining points (without area fill).
</span></pre>
<p>
In practice it is often convenient to chain function calls onto plot function
calls thus:
</p>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">plot</span><span class="special">(</span><span class="identifier">data3</span><span class="special">,</span> <span class="string">"-1 + 2x"</span><span class="special">).</span><span class="identifier">bezier_on</span><span class="special">(</span><span class="keyword">true</span><span class="special">).</span><span class="identifier">line_color</span><span class="special">(</span><span class="identifier">blue</span><span class="special">);</span>
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">plot</span><span class="special">(</span><span class="identifier">data3</span><span class="special">,</span> <span class="string">"-1 + 2x"</span><span class="special">).</span><span class="identifier">bezier_on</span><span class="special">(</span><span class="keyword">true</span><span class="special">).</span><span class="identifier">line_color</span><span class="special">(</span><span class="identifier">blue</span><span class="special">);</span>
</pre>
<div class="table">
-<a name="id581549"></a><p class="title"><b>Table 36. Plot Line Style Accessor functions</b></p>
+<a name="id779083"></a><p class="title"><b>Table 36. Plot Line Style Accessor functions</b></p>
<div class="table-contents"><table class="table" summary="Plot Line Style Accessor functions">
<colgroup>
<col>
@@ -2546,7 +2534,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2007 Jake Voytko<p>
+<td align="right"><div class="copyright-footer">Copyright © 2007 , 2008, 2009 Jake Voytko and Paul A. Bristow<p>
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)
</p>
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/interface/svg_interface.html
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/interface/svg_interface.html (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/interface/svg_interface.html 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,22 +1,21 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> svg
- Public Interface</title>
+<title>svg Public Interface</title>
<link rel="stylesheet" href="../../../../../../../../../../trunk/doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
-<link rel="start" href="../../index.html" title="SVG_Plot">
-<link rel="up" href="../interface.html" title=" Public Interfaces">
-<link rel="prev" href="../interface.html" title=" Public Interfaces">
-<link rel="next" href="svg_1d_plot_interface.html" title=" svg_1d_plot Public Interface">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../../index.html" title="SVG_Plot">
+<link rel="up" href="../interface.html" title="Public Interfaces">
+<link rel="prev" href="../interface.html" title="Public Interfaces">
+<link rel="next" href="svg_1d_plot_interface.html" title="svg_1d_plot Public Interface">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../../../trunk/boost.png"></td>
<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
@@ -25,12 +24,11 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="svg_plot.interface.svg_interface"></a><a href="svg_interface.html" title=" svg
- Public Interface"> <code class="computeroutput"><span class="identifier">svg</span></code>
+<a name="svg_plot.interface.svg_interface"></a><a class="link" href="svg_interface.html" title="svg Public Interface"> <code class="computeroutput"><span class="identifier">svg</span></code>
Public Interface</a>
</h3></div></div></div>
<div class="table">
-<a name="id553682"></a><p class="title"><b>Table 3. class `svg` Standard
+<a name="id750996"></a><p class="title"><b>Table 3. class `svg` Standard
C++ Methods</b></p>
<div class="table-contents"><table class="table" summary="class `svg` Standard
C++ Methods">
@@ -76,7 +74,7 @@
</table></div>
</div>
<br class="table-break"><div class="table">
-<a name="id553773"></a><p class="title"><b>Table 4. `svg` shapes</b></p>
+<a name="id751619"></a><p class="title"><b>Table 4. `svg` shapes</b></p>
<div class="table-contents"><table class="table" summary="`svg` shapes">
<colgroup>
<col>
@@ -231,8 +229,7 @@
to the back of the tree and returns a reference to it. This allows
chaining, for example:
</p>
-<pre class="programlisting">
-<span class="identifier">path_element</span><span class="special">&</span> <span class="identifier">my_path</span> <span class="special">=</span> <span class="identifier">image</span><span class="special">.</span><span class="identifier">path</span><span class="special">();</span>
+<pre class="programlisting"><span class="identifier">path_element</span><span class="special">&</span> <span class="identifier">my_path</span> <span class="special">=</span> <span class="identifier">image</span><span class="special">.</span><span class="identifier">path</span><span class="special">();</span>
<span class="identifier">my_path</span><span class="special">.</span><span class="identifier">M</span><span class="special">(</span><span class="number">3</span><span class="special">,</span> <span class="number">3</span><span class="special">).</span><span class="identifier">l</span><span class="special">(</span><span class="number">150</span><span class="special">,</span> <span class="number">150</span><span class="special">).</span><span class="identifier">m</span><span class="special">(</span><span class="number">5</span><span class="special">,</span> <span class="number">6</span><span class="special">).</span><span class="identifier">l</span><span class="special">(</span><span class="number">7</span><span class="special">,</span> <span class="number">8</span><span class="special">).</span><span class="identifier">l</span><span class="special">(</span><span class="number">9</span><span class="special">,</span> <span class="number">10</span><span class="special">);</span> <span class="comment">// and so
on.
</span></pre>
@@ -412,7 +409,7 @@
</table></div>
</div>
<br class="table-break"><div class="table">
-<a name="id556043"></a><p class="title"><b>Table 5. Special methods</b></p>
+<a name="id753303"></a><p class="title"><b>Table 5. Special methods</b></p>
<div class="table-contents"><table class="table" summary="Special methods">
<colgroup>
<col>
@@ -478,7 +475,7 @@
</table></div>
</div>
<br class="table-break"><div class="table">
-<a name="id556302"></a><p class="title"><b>Table 6. `svg` Copyright</b></p>
+<a name="id753503"></a><p class="title"><b>Table 6. `svg` Copyright</b></p>
<div class="table-contents"><table class="table" summary="`svg` Copyright">
<colgroup>
<col>
@@ -788,7 +785,7 @@
</table></div>
</div>
<br class="table-break"><div class="table">
-<a name="id557596"></a><p class="title"><b>Table 7. `svg` document settings and writing</b></p>
+<a name="id756664"></a><p class="title"><b>Table 7. `svg` document settings and writing</b></p>
<div class="table-contents"><table class="table" summary="`svg` document settings and writing">
<colgroup>
<col>
@@ -1025,7 +1022,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2007 Jake Voytko<p>
+<td align="right"><div class="copyright-footer">Copyright © 2007 , 2008, 2009 Jake Voytko and Paul A. Bristow<p>
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)
</p>
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/plot_defaults.html
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/plot_defaults.html (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/plot_defaults.html 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,22 +1,21 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> Plot Defaults</title>
+<title>Plot Defaults</title>
<link rel="stylesheet" href="../../../../../../../../../trunk/doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
-<link rel="start" href="../index.html" title="SVG_Plot">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../index.html" title="SVG_Plot">
<link rel="up" href="../index.html" title="SVG_Plot">
-<link rel="prev" href="behavior/behavior_stylesheets.html" title=" Stylesheets">
-<link rel="next" href="plot_defaults/1d_defaults.html" title=" svg_1d_plot
- Defaults">
+<link rel="prev" href="behavior/behavior_stylesheets.html" title="Stylesheets">
+<link rel="next" href="plot_defaults/1d_defaults.html" title="svg_1d_plot Defaults">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../../trunk/boost.png"></td>
<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
@@ -25,7 +24,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="svg_plot.plot_defaults"></a> Plot Defaults
+<a name="svg_plot.plot_defaults"></a><a class="link" href="plot_defaults.html" title="Plot Defaults"> Plot Defaults</a>
</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="plot_defaults/1d_defaults.html"> <code class="computeroutput"><span class="identifier">svg_1d_plot</span></code>
@@ -36,7 +35,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2007 Jake Voytko<p>
+<td align="right"><div class="copyright-footer">Copyright © 2007 , 2008, 2009 Jake Voytko and Paul A. Bristow<p>
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)
</p>
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/plot_defaults/1d_defaults.html
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/plot_defaults/1d_defaults.html (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/plot_defaults/1d_defaults.html 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,23 +1,21 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> svg_1d_plot
- Defaults</title>
+<title>svg_1d_plot Defaults</title>
<link rel="stylesheet" href="../../../../../../../../../../trunk/doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
-<link rel="start" href="../../index.html" title="SVG_Plot">
-<link rel="up" href="../plot_defaults.html" title=" Plot Defaults">
-<link rel="prev" href="../plot_defaults.html" title=" Plot Defaults">
-<link rel="next" href="2d_defaults.html" title=" svg_2d_plot
- Defaults">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../../index.html" title="SVG_Plot">
+<link rel="up" href="../plot_defaults.html" title="Plot Defaults">
+<link rel="prev" href="../plot_defaults.html" title="Plot Defaults">
+<link rel="next" href="2d_defaults.html" title="svg_2d_plot Defaults">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../../../trunk/boost.png"></td>
<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
@@ -26,8 +24,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="svg_plot.plot_defaults.1d_defaults"></a><a href="1d_defaults.html" title=" svg_1d_plot
- Defaults"> <code class="computeroutput"><span class="identifier">svg_1d_plot</span></code>
+<a name="svg_plot.plot_defaults.1d_defaults"></a><a class="link" href="1d_defaults.html" title="svg_1d_plot Defaults"> <code class="computeroutput"><span class="identifier">svg_1d_plot</span></code>
Defaults</a>
</h3></div></div></div>
<p>
@@ -35,7 +32,7 @@
of the plotting.
</p>
<div class="table">
-<a name="id551657"></a><p class="title"><b>Table 1. Default Values</b></p>
+<a name="id749352"></a><p class="title"><b>Table 1. Default Values</b></p>
<div class="table-contents"><table class="table" summary="Default Values">
<colgroup>
<col>
@@ -504,7 +501,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2007 Jake Voytko<p>
+<td align="right"><div class="copyright-footer">Copyright © 2007 , 2008, 2009 Jake Voytko and Paul A. Bristow<p>
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)
</p>
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/plot_defaults/2d_defaults.html
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/plot_defaults/2d_defaults.html (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/plot_defaults/2d_defaults.html 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,23 +1,21 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> svg_2d_plot
- Defaults</title>
+<title>svg_2d_plot Defaults</title>
<link rel="stylesheet" href="../../../../../../../../../../trunk/doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
-<link rel="start" href="../../index.html" title="SVG_Plot">
-<link rel="up" href="../plot_defaults.html" title=" Plot Defaults">
-<link rel="prev" href="1d_defaults.html" title=" svg_1d_plot
- Defaults">
-<link rel="next" href="../interface.html" title=" Public Interfaces">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../../index.html" title="SVG_Plot">
+<link rel="up" href="../plot_defaults.html" title="Plot Defaults">
+<link rel="prev" href="1d_defaults.html" title="svg_1d_plot Defaults">
+<link rel="next" href="../interface.html" title="Public Interfaces">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../../../trunk/boost.png"></td>
<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
@@ -26,8 +24,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="svg_plot.plot_defaults.2d_defaults"></a><a href="2d_defaults.html" title=" svg_2d_plot
- Defaults"> <code class="computeroutput"><span class="identifier">svg_2d_plot</span></code>
+<a name="svg_plot.plot_defaults.2d_defaults"></a><a class="link" href="2d_defaults.html" title="svg_2d_plot Defaults"> <code class="computeroutput"><span class="identifier">svg_2d_plot</span></code>
Defaults</a>
</h3></div></div></div>
<p>
@@ -35,7 +32,7 @@
beginning of the plotting. Here is a table of the defaults:
</p>
<div class="table">
-<a name="id552595"></a><p class="title"><b>Table 2. Default Values</b></p>
+<a name="id750114"></a><p class="title"><b>Table 2. Default Values</b></p>
<div class="table-contents"><table class="table" summary="Default Values">
<colgroup>
<col>
@@ -555,7 +552,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2007 Jake Voytko<p>
+<td align="right"><div class="copyright-footer">Copyright © 2007 , 2008, 2009 Jake Voytko and Paul A. Bristow<p>
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)
</p>
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/svg_boxplot_tutorial.html
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/svg_boxplot_tutorial.html (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/svg_boxplot_tutorial.html 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,23 +1,21 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> Tutorial: Boxplot</title>
+<title>Tutorial: Boxplot</title>
<link rel="stylesheet" href="../../../../../../../../../trunk/doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
-<link rel="start" href="../index.html" title="SVG_Plot">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../index.html" title="SVG_Plot">
<link rel="up" href="../index.html" title="SVG_Plot">
-<link rel="prev" href="tutorial_2d_code_simple/2d_special.html" title=" Tutorial:
- 2D Special Features">
-<link rel="next" href="svg_boxplot_tutorial/svg_boxplot_tutorial_simple.html" title="
- Simple Example">
+<link rel="prev" href="tutorial_2d_code_simple/2d_special.html" title="Tutorial: 2D Special Features">
+<link rel="next" href="svg_boxplot_tutorial/svg_boxplot_tutorial_simple.html" title="Simple Example">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../../trunk/boost.png"></td>
<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
@@ -26,7 +24,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="svg_plot.svg_boxplot_tutorial"></a> Tutorial: Boxplot
+<a name="svg_plot.svg_boxplot_tutorial"></a><a class="link" href="svg_boxplot_tutorial.html" title="Tutorial: Boxplot"> Tutorial: Boxplot</a>
</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="svg_boxplot_tutorial/svg_boxplot_tutorial_simple.html">
@@ -39,7 +37,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2007 Jake Voytko<p>
+<td align="right"><div class="copyright-footer">Copyright © 2007 , 2008, 2009 Jake Voytko and Paul A. Bristow<p>
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)
</p>
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/svg_boxplot_tutorial/svg_boxplot_tutorial_simple.html
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/svg_boxplot_tutorial/svg_boxplot_tutorial_simple.html (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/svg_boxplot_tutorial/svg_boxplot_tutorial_simple.html 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,23 +1,21 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>
- Simple Example</title>
+<title>Simple Example</title>
<link rel="stylesheet" href="../../../../../../../../../../trunk/doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
-<link rel="start" href="../../index.html" title="SVG_Plot">
-<link rel="up" href="../svg_boxplot_tutorial.html" title=" Tutorial: Boxplot">
-<link rel="prev" href="../svg_boxplot_tutorial.html" title=" Tutorial: Boxplot">
-<link rel="next" href="svg_boxplot_tutorial_full.html" title="
- Full Boxplot Layout">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../../index.html" title="SVG_Plot">
+<link rel="up" href="../svg_boxplot_tutorial.html" title="Tutorial: Boxplot">
+<link rel="prev" href="../svg_boxplot_tutorial.html" title="Tutorial: Boxplot">
+<link rel="next" href="svg_boxplot_tutorial_full.html" title="Full Boxplot Layout">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../../../trunk/boost.png"></td>
<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
@@ -26,12 +24,10 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="svg_plot.svg_boxplot_tutorial.svg_boxplot_tutorial_simple"></a><a href="svg_boxplot_tutorial_simple.html" title="
- Simple Example">
+<a name="svg_plot.svg_boxplot_tutorial.svg_boxplot_tutorial_simple"></a><a class="link" href="svg_boxplot_tutorial_simple.html" title="Simple Example">
Simple Example</a>
</h3></div></div></div>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">svg_plot</span><span class="special">/</span><span class="identifier">svg_2d_plot</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">svg_plot</span><span class="special">/</span><span class="identifier">svg_2d_plot</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">svg</span><span class="special">;</span>
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">vector</span><span class="special">></span>
<span class="keyword">using</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">;</span>
@@ -83,24 +79,24 @@
<span class="special">}</span>
</pre>
<a name="svg_plot.svg_boxplot_tutorial.svg_boxplot_tutorial_simple.image_boxplot_simple_svg"></a><h5>
-<a name="id545236"></a>
- <a href="svg_boxplot_tutorial_simple.html#svg_plot.svg_boxplot_tutorial.svg_boxplot_tutorial_simple.image_boxplot_simple_svg">Image
+<a name="id743259"></a>
+ <a class="link" href="svg_boxplot_tutorial_simple.html#svg_plot.svg_boxplot_tutorial.svg_boxplot_tutorial_simple.image_boxplot_simple_svg">Image
boxplot_simple.svg</a>
</h5>
<p>
<span class="inlinemediaobject"><img src="../../images/boxplot_simple.png" alt="boxplot_simple"></span>
</p>
<a name="svg_plot.svg_boxplot_tutorial.svg_boxplot_tutorial_simple.basic_example_breakdown"></a><h5>
-<a name="id545284"></a>
- <a href="svg_boxplot_tutorial_simple.html#svg_plot.svg_boxplot_tutorial.svg_boxplot_tutorial_simple.basic_example_breakdown">Basic
+<a name="id743290"></a>
+ <a class="link" href="svg_boxplot_tutorial_simple.html#svg_plot.svg_boxplot_tutorial.svg_boxplot_tutorial_simple.basic_example_breakdown">Basic
Example Breakdown</a>
</h5>
<p>
Let's examine what this does.
</p>
<a name="svg_plot.svg_boxplot_tutorial.svg_boxplot_tutorial_simple.initializing_a_new_boxplot"></a><h5>
-<a name="id545315"></a>
- <a href="svg_boxplot_tutorial_simple.html#svg_plot.svg_boxplot_tutorial.svg_boxplot_tutorial_simple.initializing_a_new_boxplot">Initializing
+<a name="id743307"></a>
+ <a class="link" href="svg_boxplot_tutorial_simple.html#svg_plot.svg_boxplot_tutorial.svg_boxplot_tutorial_simple.initializing_a_new_boxplot">Initializing
a new boxplot</a>
</h5>
<p>
@@ -108,20 +104,19 @@
svg_boxplot my_plot;
</p>
<a name="svg_plot.svg_boxplot_tutorial.svg_boxplot_tutorial_simple.setting_a_color"></a><h5>
-<a name="id545349"></a>
- <a href="svg_boxplot_tutorial_simple.html#svg_plot.svg_boxplot_tutorial.svg_boxplot_tutorial_simple.setting_a_color">Setting
+<a name="id743324"></a>
+ <a class="link" href="svg_boxplot_tutorial_simple.html#svg_plot.svg_boxplot_tutorial.svg_boxplot_tutorial_simple.setting_a_color">Setting
a color</a>
</h5>
<p>
This sets the border color of the entire image to black (not just the plot
area).
</p>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">background_border_color</span><span class="special">(</span><span class="identifier">black</span><span class="special">);</span>
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">background_border_color</span><span class="special">(</span><span class="identifier">black</span><span class="special">);</span>
</pre>
<a name="svg_plot.svg_boxplot_tutorial.svg_boxplot_tutorial_simple.setting_strings_in_the_plot"></a><h5>
-<a name="id545422"></a>
- <a href="svg_boxplot_tutorial_simple.html#svg_plot.svg_boxplot_tutorial.svg_boxplot_tutorial_simple.setting_strings_in_the_plot">Setting
+<a name="id743367"></a>
+ <a class="link" href="svg_boxplot_tutorial_simple.html#svg_plot.svg_boxplot_tutorial.svg_boxplot_tutorial_simple.setting_strings_in_the_plot">Setting
strings in the plot</a>
</h5>
<p>
@@ -129,14 +124,13 @@
label that appears at the bottom to name the X-axis, and the label that appears
to the left to name the Y-axis.
</p>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">title</span><span class="special">(</span><span class="string">"Boxplots of Common Functions"</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">title</span><span class="special">(</span><span class="string">"Boxplots of Common Functions"</span><span class="special">)</span>
<span class="special">.</span><span class="identifier">x_label</span><span class="special">(</span><span class="string">"Functions"</span><span class="special">)</span>
<span class="special">.</span><span class="identifier">y_label</span><span class="special">(</span><span class="string">"Population Size"</span><span class="special">);</span>
</pre>
<a name="svg_plot.svg_boxplot_tutorial.svg_boxplot_tutorial_simple.setting_axis_information"></a><h4>
-<a name="id545551"></a>
- <a href="svg_boxplot_tutorial_simple.html#svg_plot.svg_boxplot_tutorial.svg_boxplot_tutorial_simple.setting_axis_information">Setting
+<a name="id743448"></a>
+ <a class="link" href="svg_boxplot_tutorial_simple.html#svg_plot.svg_boxplot_tutorial.svg_boxplot_tutorial_simple.setting_axis_information">Setting
axis information</a>
</h4>
<p>
@@ -151,23 +145,22 @@
.y_major_interval(20);
</p>
<a name="svg_plot.svg_boxplot_tutorial.svg_boxplot_tutorial_simple.writing_to_a_file"></a><h5>
-<a name="id545594"></a>
- <a href="svg_boxplot_tutorial_simple.html#svg_plot.svg_boxplot_tutorial.svg_boxplot_tutorial_simple.writing_to_a_file">Writing
+<a name="id743469"></a>
+ <a class="link" href="svg_boxplot_tutorial_simple.html#svg_plot.svg_boxplot_tutorial.svg_boxplot_tutorial_simple.writing_to_a_file">Writing
to a file</a>
</h5>
<p>
This finally writes our plot to the file "boxplot_simple.svg".
</p>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">write</span><span class="special">(</span><span class="string">"boxplot_simple.svg"</span><span class="special">);</span>
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">write</span><span class="special">(</span><span class="string">"boxplot_simple.svg"</span><span class="special">);</span>
</pre>
<p>
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2007 Jake Voytko<p>
+<td align="right"><div class="copyright-footer">Copyright © 2007 , 2008, 2009 Jake Voytko and Paul A. Bristow<p>
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)
</p>
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/todo.html
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/todo.html (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/todo.html 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,21 +1,21 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> To Do List</title>
+<title>To Do List</title>
<link rel="stylesheet" href="../../../../../../../../../trunk/doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
-<link rel="start" href="../index.html" title="SVG_Plot">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../index.html" title="SVG_Plot">
<link rel="up" href="../index.html" title="SVG_Plot">
-<link rel="prev" href="howtouse.html" title=" How To Use This Documentation">
-<link rel="next" href="color.html" title=" Colors">
+<link rel="prev" href="howtouse.html" title="How To Use This Documentation">
+<link rel="next" href="color.html" title="Colors">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../../trunk/boost.png"></td>
<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
@@ -24,7 +24,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="svg_plot.todo"></a> To Do List
+<a name="svg_plot.todo"></a><a class="link" href="todo.html" title="To Do List"> To Do List</a>
</h2></div></div></div>
<p>
This project is still in development, so here is a list of things that I would
@@ -90,7 +90,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2007 Jake Voytko<p>
+<td align="right"><div class="copyright-footer">Copyright © 2007 , 2008, 2009 Jake Voytko and Paul A. Bristow<p>
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)
</p>
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_2d_code_simple.html
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_2d_code_simple.html (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_2d_code_simple.html 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,23 +1,21 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> Tutorial: 2D</title>
+<title>Tutorial: 2D</title>
<link rel="stylesheet" href="../../../../../../../../../trunk/doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
-<link rel="start" href="../index.html" title="SVG_Plot">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../index.html" title="SVG_Plot">
<link rel="up" href="../index.html" title="SVG_Plot">
-<link rel="prev" href="tutorial_code_1d_simple/demo_1d_values.html" title=" 1-D
- Data Values Examples">
-<link rel="next" href="tutorial_2d_code_simple/2d_simple_code_example.html" title="
- Simple Code Example">
+<link rel="prev" href="tutorial_code_1d_simple/demo_1d_values.html" title="1-D Data Values Examples">
+<link rel="next" href="tutorial_2d_code_simple/2d_simple_code_example.html" title="Simple Code Example">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../../trunk/boost.png"></td>
<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
@@ -26,7 +24,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="svg_plot.tutorial_2d_code_simple"></a> Tutorial: 2D
+<a name="svg_plot.tutorial_2d_code_simple"></a><a class="link" href="tutorial_2d_code_simple.html" title="Tutorial: 2D"> Tutorial: 2D</a>
</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="tutorial_2d_code_simple/2d_simple_code_example.html">
@@ -39,7 +37,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2007 Jake Voytko<p>
+<td align="right"><div class="copyright-footer">Copyright © 2007 , 2008, 2009 Jake Voytko and Paul A. Bristow<p>
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)
</p>
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_2d_code_simple/2d_simple_code_example.html
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_2d_code_simple/2d_simple_code_example.html (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_2d_code_simple/2d_simple_code_example.html 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,23 +1,21 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>
- Simple Code Example</title>
+<title>Simple Code Example</title>
<link rel="stylesheet" href="../../../../../../../../../../trunk/doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
-<link rel="start" href="../../index.html" title="SVG_Plot">
-<link rel="up" href="../tutorial_2d_code_simple.html" title=" Tutorial: 2D">
-<link rel="prev" href="../tutorial_2d_code_simple.html" title=" Tutorial: 2D">
-<link rel="next" href="full_2d_layout.html" title=" Tutorial:
- Fuller Layout Example">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../../index.html" title="SVG_Plot">
+<link rel="up" href="../tutorial_2d_code_simple.html" title="Tutorial: 2D">
+<link rel="prev" href="../tutorial_2d_code_simple.html" title="Tutorial: 2D">
+<link rel="next" href="full_2d_layout.html" title="Tutorial: Fuller Layout Example">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../../../trunk/boost.png"></td>
<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
@@ -26,12 +24,10 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="svg_plot.tutorial_2d_code_simple.2d_simple_code_example"></a><a href="2d_simple_code_example.html" title="
- Simple Code Example">
+<a name="svg_plot.tutorial_2d_code_simple.2d_simple_code_example"></a><a class="link" href="2d_simple_code_example.html" title="Simple Code Example">
Simple Code Example</a>
</h3></div></div></div>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">svg_plot</span><span class="special">/</span><span class="identifier">svg_2d_plot</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">svg_plot</span><span class="special">/</span><span class="identifier">svg_2d_plot</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">svg</span><span class="special">;</span>
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">map</span><span class="special">></span>
@@ -65,23 +61,22 @@
<span class="special">}</span>
</pre>
<a name="svg_plot.tutorial_2d_code_simple.2d_simple_code_example.resulting_simple_2d_example_image"></a><h5>
-<a name="id540272"></a>
- <a href="2d_simple_code_example.html#svg_plot.tutorial_2d_code_simple.2d_simple_code_example.resulting_simple_2d_example_image">Resulting
+<a name="id739750"></a>
+ <a class="link" href="2d_simple_code_example.html#svg_plot.tutorial_2d_code_simple.2d_simple_code_example.resulting_simple_2d_example_image">Resulting
Simple_2D Example Image</a>
</h5>
<p>
<span class="inlinemediaobject"><img src="../../images/2d_simple.png" alt="2d_simple"></span>
</p>
<a name="svg_plot.tutorial_2d_code_simple.2d_simple_code_example.simple_2d_example_breakdown"></a><h5>
-<a name="id540320"></a>
- <a href="2d_simple_code_example.html#svg_plot.tutorial_2d_code_simple.2d_simple_code_example.simple_2d_example_breakdown">Simple_2D
+<a name="id739781"></a>
+ <a class="link" href="2d_simple_code_example.html#svg_plot.tutorial_2d_code_simple.2d_simple_code_example.simple_2d_example_breakdown">Simple_2D
Example Breakdown</a>
</h5>
<p>
Let's examine what this does.
</p>
-<pre class="programlisting">
-<span class="identifier">svg_2d_plot</span> <span class="identifier">my_plot</span><span class="special">;</span>
+<pre class="programlisting"><span class="identifier">svg_2d_plot</span> <span class="identifier">my_plot</span><span class="special">;</span>
</pre>
<p>
This constructor initializes a new 2D plot. This also sets the very many
@@ -90,14 +85,12 @@
<p>
We could accept all of these and just plot one series of data with
</p>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">plot</span><span class="special">(</span><span class="identifier">map1</span><span class="special">,</span> <span class="string">"Series 1"</span><span class="special">);</span> <span class="comment">// Data point marker color is default black.
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">plot</span><span class="special">(</span><span class="identifier">map1</span><span class="special">,</span> <span class="string">"Series 1"</span><span class="special">);</span> <span class="comment">// Data point marker color is default black.
</span></pre>
<p>
but we can also add a few optional details:
</p>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">title</span><span class="special">(</span><span class="string">"Race Times"</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">title</span><span class="special">(</span><span class="string">"Race Times"</span><span class="special">)</span>
<span class="special">.</span><span class="identifier">legend_on</span><span class="special">(</span><span class="keyword">true</span><span class="special">)</span>
<span class="special">.</span><span class="identifier">x_range</span><span class="special">(-</span><span class="number">1</span><span class="special">,</span> <span class="number">11</span><span class="special">)</span>
<span class="special">.</span><span class="identifier">background_border_color</span><span class="special">(</span><span class="identifier">black</span><span class="special">);</span>
@@ -125,8 +118,7 @@
will be visible).
</li>
</ul></div>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">plot</span><span class="special">(</span><span class="identifier">map1</span><span class="special">,</span> <span class="string">"Series 1"</span><span class="special">,</span> <span class="identifier">blue</span><span class="special">);</span>
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">plot</span><span class="special">(</span><span class="identifier">map1</span><span class="special">,</span> <span class="string">"Series 1"</span><span class="special">,</span> <span class="identifier">blue</span><span class="special">);</span>
<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">plot</span><span class="special">(</span><span class="identifier">map2</span><span class="special">,</span> <span class="string">"Series 2"</span><span class="special">,</span> <span class="identifier">orange</span><span class="special">);</span>
</pre>
<p>
@@ -145,8 +137,7 @@
<p>
Finally
</p>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">write</span><span class="special">(</span><span class="string">"simple_2d.svg"</span><span class="special">);</span>
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">write</span><span class="special">(</span><span class="string">"simple_2d.svg"</span><span class="special">);</span>
</pre>
<p>
writes plot <code class="computeroutput"><span class="identifier">my_plot</span></code> to the
@@ -158,7 +149,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2007 Jake Voytko<p>
+<td align="right"><div class="copyright-footer">Copyright © 2007 , 2008, 2009 Jake Voytko and Paul A. Bristow<p>
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)
</p>
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_2d_code_simple/2d_special.html
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_2d_code_simple/2d_special.html (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_2d_code_simple/2d_special.html 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,23 +1,21 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> Tutorial:
- 2D Special Features</title>
+<title>Tutorial: 2D Special Features</title>
<link rel="stylesheet" href="../../../../../../../../../../trunk/doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
-<link rel="start" href="../../index.html" title="SVG_Plot">
-<link rel="up" href="../tutorial_2d_code_simple.html" title=" Tutorial: 2D">
-<link rel="prev" href="full_2d_layout.html" title=" Tutorial:
- Fuller Layout Example">
-<link rel="next" href="../svg_boxplot_tutorial.html" title=" Tutorial: Boxplot">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../../index.html" title="SVG_Plot">
+<link rel="up" href="../tutorial_2d_code_simple.html" title="Tutorial: 2D">
+<link rel="prev" href="full_2d_layout.html" title="Tutorial: Fuller Layout Example">
+<link rel="next" href="../svg_boxplot_tutorial.html" title="Tutorial: Boxplot">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../../../trunk/boost.png"></td>
<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
@@ -26,28 +24,25 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="svg_plot.tutorial_2d_code_simple.2d_special"></a><a href="2d_special.html" title=" Tutorial:
- 2D Special Features"> Tutorial:
+<a name="svg_plot.tutorial_2d_code_simple.2d_special"></a><a class="link" href="2d_special.html" title="Tutorial: 2D Special Features"> Tutorial:
2D Special Features</a>
</h3></div></div></div>
<a name="svg_plot.tutorial_2d_code_simple.2d_special.y_axis_grid_lines"></a><h5>
-<a name="id543132"></a>
- <a href="2d_special.html#svg_plot.tutorial_2d_code_simple.2d_special.y_axis_grid_lines">Y-Axis
+<a name="id741780"></a>
+ <a class="link" href="2d_special.html#svg_plot.tutorial_2d_code_simple.2d_special.y_axis_grid_lines">Y-Axis
Grid Lines</a>
</h5>
<p>
If you would like horizontal grid lines that go across the graph, you can
make the following call to <code class="computeroutput"><span class="identifier">svg_2d_plot</span></code>:
</p>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">y_major_grid_on</span><span class="special">(</span><span class="keyword">true</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">y_major_grid_on</span><span class="special">(</span><span class="keyword">true</span><span class="special">)</span>
<span class="special">.</span><span class="identifier">y_minor_grid_on</span><span class="special">(</span><span class="keyword">true</span><span class="special">);</span>
</pre>
<p>
To style it, you could use the following calls:
</p>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">y_major_grid_color</span><span class="special">(</span><span class="identifier">lightgray</span><span class="special">)</span> <span class="comment">// Darker color for major grid.
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">y_major_grid_color</span><span class="special">(</span><span class="identifier">lightgray</span><span class="special">)</span> <span class="comment">// Darker color for major grid.
</span> <span class="special">.</span><span class="identifier">y_minor_grid_color</span><span class="special">(</span><span class="identifier">whitesmoke</span><span class="special">);</span> <span class="comment">// Lighter color for minor grid.
</span></pre>
<p>
@@ -59,34 +54,30 @@
<p>
Similarly you can have horizontal and/or vertical lines:
</p>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">x_major_grid_on</span><span class="special">(</span><span class="keyword">true</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">x_major_grid_on</span><span class="special">(</span><span class="keyword">true</span><span class="special">)</span>
<span class="special">.</span><span class="identifier">x_minor_grid_on</span><span class="special">(</span><span class="keyword">true</span><span class="special">);</span>
</pre>
<p>
and color it similarly for faint blues like old fashioned graph paper:
</p>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">y_major_grid_color</span><span class="special">(</span><span class="identifier">svg_color</span><span class="special">(</span><span class="number">200</span><span class="special">,</span> <span class="number">220</span><span class="special">,</span> <span class="number">255</span><span class="special">))</span> <span class="comment">// Darker color for major grid.
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">y_major_grid_color</span><span class="special">(</span><span class="identifier">svg_color</span><span class="special">(</span><span class="number">200</span><span class="special">,</span> <span class="number">220</span><span class="special">,</span> <span class="number">255</span><span class="special">))</span> <span class="comment">// Darker color for major grid.
</span> <span class="special">.</span><span class="identifier">y_minor_grid_color</span><span class="special">(</span><span class="identifier">svg_color</span><span class="special">(</span><span class="number">240</span><span class="special">,</span> <span class="number">240</span><span class="special">,</span> <span class="number">255</span><span class="special">);</span> <span class="comment">// lighter color for minor grid.
</span></pre>
<p>
and to make the major grid much wider than the minor grid:
</p>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">y_major_grid_width</span><span class="special">(</span><span class="number">4</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">y_major_grid_width</span><span class="special">(</span><span class="number">4</span><span class="special">)</span>
<span class="special">.</span><span class="identifier">y_minor_grid_width</span><span class="special">(</span><span class="number">1</span><span class="special">)</span>
</pre>
<a name="svg_plot.tutorial_2d_code_simple.2d_special.external_y_axis_style"></a><h5>
-<a name="id543648"></a>
- <a href="2d_special.html#svg_plot.tutorial_2d_code_simple.2d_special.external_y_axis_style">External
+<a name="id742136"></a>
+ <a class="link" href="2d_special.html#svg_plot.tutorial_2d_code_simple.2d_special.external_y_axis_style">External
Y Axis Style</a>
</h5>
<p>
For an alternate way to display a regular axis, you can use an external style:
</p>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">y_external_style_on</span><span class="special">(</span><span class="keyword">true</span><span class="special">);</span>
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">y_external_style_on</span><span class="special">(</span><span class="keyword">true</span><span class="special">);</span>
</pre>
<div class="important"><table border="0" summary="Important">
<tr>
@@ -99,15 +90,14 @@
</p></td></tr>
</table></div>
<a name="svg_plot.tutorial_2d_code_simple.2d_special.fill_the_area_between_the_plot_and_the_axis"></a><h5>
-<a name="id543785"></a>
- <a href="2d_special.html#svg_plot.tutorial_2d_code_simple.2d_special.fill_the_area_between_the_plot_and_the_axis">Fill
+<a name="id742223"></a>
+ <a class="link" href="2d_special.html#svg_plot.tutorial_2d_code_simple.2d_special.fill_the_area_between_the_plot_and_the_axis">Fill
the area between the plot and the axis</a>
</h5>
<p>
When there is a call to the plot() method, define <code class="computeroutput"><span class="identifier">area_fill_color</span></code>
</p>
-<pre class="programlisting">
-<span class="identifier">multimap</span><span class="special"><</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">double</span><span class="special">></span> <span class="identifier">my_data</span><span class="special">;</span>
+<pre class="programlisting"><span class="identifier">multimap</span><span class="special"><</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">double</span><span class="special">></span> <span class="identifier">my_data</span><span class="special">;</span>
<span class="identifier">svg_2d_plot</span> <span class="identifier">my_plot</span><span class="special">;</span>
<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">plot</span><span class="special">(</span><span class="identifier">my_data</span><span class="special">,</span> <span class="string">"Data"</span><span class="special">,</span> <span class="identifier">area_fill_color</span><span class="special">(</span><span class="identifier">red</span><span class="special">));</span>
@@ -119,8 +109,8 @@
<span class="inlinemediaobject"><img src="../../images/2d_area_fill.png" alt="2d_area_fill"></span>
</p>
<a name="svg_plot.tutorial_2d_code_simple.2d_special.curve_interpolation"></a><h5>
-<a name="id543990"></a>
- <a href="2d_special.html#svg_plot.tutorial_2d_code_simple.2d_special.curve_interpolation">Curve
+<a name="id742368"></a>
+ <a class="link" href="2d_special.html#svg_plot.tutorial_2d_code_simple.2d_special.curve_interpolation">Curve
Interpolation</a>
</h5>
<p>
@@ -128,8 +118,7 @@
shown over your data (rather than the default straight lines joining points),
simply use the following command:
</p>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">plot</span><span class="special">(</span><span class="identifier">data</span><span class="special">,</span> <span class="string">"Series 1"</span><span class="special">,</span> <span class="identifier">bezier_on</span><span class="special">(</span><span class="keyword">true</span><span class="special">);</span>
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">plot</span><span class="special">(</span><span class="identifier">data</span><span class="special">,</span> <span class="string">"Series 1"</span><span class="special">,</span> <span class="identifier">bezier_on</span><span class="special">(</span><span class="keyword">true</span><span class="special">);</span>
</pre>
<p>
This produces something like the following images:
@@ -156,7 +145,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2007 Jake Voytko<p>
+<td align="right"><div class="copyright-footer">Copyright © 2007 , 2008, 2009 Jake Voytko and Paul A. Bristow<p>
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)
</p>
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_2d_code_simple/full_2d_layout.html
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_2d_code_simple/full_2d_layout.html (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_2d_code_simple/full_2d_layout.html 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,24 +1,21 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> Tutorial:
- Fuller Layout Example</title>
+<title>Tutorial: Fuller Layout Example</title>
<link rel="stylesheet" href="../../../../../../../../../../trunk/doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
-<link rel="start" href="../../index.html" title="SVG_Plot">
-<link rel="up" href="../tutorial_2d_code_simple.html" title=" Tutorial: 2D">
-<link rel="prev" href="2d_simple_code_example.html" title="
- Simple Code Example">
-<link rel="next" href="2d_special.html" title=" Tutorial:
- 2D Special Features">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../../index.html" title="SVG_Plot">
+<link rel="up" href="../tutorial_2d_code_simple.html" title="Tutorial: 2D">
+<link rel="prev" href="2d_simple_code_example.html" title="Simple Code Example">
+<link rel="next" href="2d_special.html" title="Tutorial: 2D Special Features">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../../../trunk/boost.png"></td>
<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
@@ -27,12 +24,10 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="svg_plot.tutorial_2d_code_simple.full_2d_layout"></a><a href="full_2d_layout.html" title=" Tutorial:
- Fuller Layout Example"> Tutorial:
+<a name="svg_plot.tutorial_2d_code_simple.full_2d_layout"></a><a class="link" href="full_2d_layout.html" title="Tutorial: Fuller Layout Example"> Tutorial:
Fuller Layout Example</a>
</h3></div></div></div>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">svg_plot</span><span class="special">/</span><span class="identifier">svg_2d_plot</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">svg_plot</span><span class="special">/</span><span class="identifier">svg_2d_plot</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">svg</span><span class="special">;</span>
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">map</span><span class="special">></span>
<span class="keyword">using</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">multimap</span><span class="special">;</span>
@@ -132,7 +127,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2007 Jake Voytko<p>
+<td align="right"><div class="copyright-footer">Copyright © 2007 , 2008, 2009 Jake Voytko and Paul A. Bristow<p>
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)
</p>
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_code_1d_simple.html
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_code_1d_simple.html (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_code_1d_simple.html 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,22 +1,21 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> Tutorial: 1D</title>
+<title>Tutorial: 1D</title>
<link rel="stylesheet" href="../../../../../../../../../trunk/doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
-<link rel="start" href="../index.html" title="SVG_Plot">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../index.html" title="SVG_Plot">
<link rel="up" href="../index.html" title="SVG_Plot">
-<link rel="prev" href="svg_tutorial.html" title=" SVG tutorial">
-<link rel="next" href="tutorial_code_1d_simple/tutorial_code_1d_example.html" title="
- Simple 1D Example">
+<link rel="prev" href="svg_tutorial.html" title="SVG tutorial">
+<link rel="next" href="tutorial_code_1d_simple/tutorial_code_1d_example.html" title="Simple 1D Example">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../../trunk/boost.png"></td>
<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
@@ -25,7 +24,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="svg_plot.tutorial_code_1d_simple"></a> Tutorial: 1D
+<a name="svg_plot.tutorial_code_1d_simple"></a><a class="link" href="tutorial_code_1d_simple.html" title="Tutorial: 1D"> Tutorial: 1D</a>
</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="tutorial_code_1d_simple/tutorial_code_1d_example.html">
@@ -50,7 +49,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2007 Jake Voytko<p>
+<td align="right"><div class="copyright-footer">Copyright © 2007 , 2008, 2009 Jake Voytko and Paul A. Bristow<p>
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)
</p>
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_code_1d_simple/1d_special.html
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_code_1d_simple/1d_special.html (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_code_1d_simple/1d_special.html 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,24 +1,21 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> Tutorial:
- 1D Special Features</title>
+<title>Tutorial: 1D Special Features</title>
<link rel="stylesheet" href="../../../../../../../../../../trunk/doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
-<link rel="start" href="../../index.html" title="SVG_Plot">
-<link rel="up" href="../tutorial_code_1d_simple.html" title=" Tutorial: 1D">
-<link rel="prev" href="full_1d_layout.html" title=" Tutorial:
- 1D Full Layout Example">
-<link rel="next" href="1d_autoscale_containers.html" title="
- Tutorial: 1D Autoscale with Multiple Containers">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../../index.html" title="SVG_Plot">
+<link rel="up" href="../tutorial_code_1d_simple.html" title="Tutorial: 1D">
+<link rel="prev" href="full_1d_layout.html" title="Tutorial: 1D Full Layout Example">
+<link rel="next" href="1d_autoscale_containers.html" title="Tutorial: 1D Autoscale with Multiple Containers">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../../../trunk/boost.png"></td>
<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
@@ -27,28 +24,25 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="svg_plot.tutorial_code_1d_simple.1d_special"></a><a href="1d_special.html" title=" Tutorial:
- 1D Special Features"> Tutorial:
+<a name="svg_plot.tutorial_code_1d_simple.1d_special"></a><a class="link" href="1d_special.html" title="Tutorial: 1D Special Features"> Tutorial:
1D Special Features</a>
</h3></div></div></div>
<a name="svg_plot.tutorial_code_1d_simple.1d_special.x_axis_grid_lines"></a><h5>
-<a name="id514650"></a>
- <a href="1d_special.html#svg_plot.tutorial_code_1d_simple.1d_special.x_axis_grid_lines">X-Axis
+<a name="id714955"></a>
+ <a class="link" href="1d_special.html#svg_plot.tutorial_code_1d_simple.1d_special.x_axis_grid_lines">X-Axis
Grid Lines</a>
</h5>
<p>
If you would like vertical grid lines that go on the graph, you can make
the following call to <code class="computeroutput"><span class="identifier">svg_1d_plot</span></code>:
</p>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">x_major_grid_on</span><span class="special">(</span><span class="keyword">true</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">x_major_grid_on</span><span class="special">(</span><span class="keyword">true</span><span class="special">)</span>
<span class="special">.</span><span class="identifier">x_minor_grid_on</span><span class="special">(</span><span class="keyword">true</span><span class="special">);</span>
</pre>
<p>
To color style it, you might add the following calls:
</p>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">x_major_grid_color</span><span class="special">(</span><span class="identifier">lightgray</span><span class="special">)</span> <span class="comment">// Darker color for major grid.
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">x_major_grid_color</span><span class="special">(</span><span class="identifier">lightgray</span><span class="special">)</span> <span class="comment">// Darker color for major grid.
</span> <span class="special">.</span><span class="identifier">x_minor_grid_color</span><span class="special">(</span><span class="identifier">whitesmoke</span><span class="special">);</span> <span class="comment">// Lighter color for minor grid.
</span></pre>
<p>
@@ -58,8 +52,8 @@
<span class="inlinemediaobject"><img src="../../images/1d_x_grid.png" alt="1d_x_grid"></span>
</p>
<a name="svg_plot.tutorial_code_1d_simple.1d_special.x_axis_external_style"></a><h5>
-<a name="id514871"></a>
- <a href="1d_special.html#svg_plot.tutorial_code_1d_simple.1d_special.x_axis_external_style">X-Axis
+<a name="id715106"></a>
+ <a class="link" href="1d_special.html#svg_plot.tutorial_code_1d_simple.1d_special.x_axis_external_style">X-Axis
External Style</a>
</h5>
<p>
@@ -70,8 +64,7 @@
By default the 'ticks' face into the plot area. Alternatively, you can use
an 'external' style, so that the ticks face out from the X- and/or Y-axes.
</p>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">x_external_style_on</span><span class="special">(</span><span class="keyword">true</span><span class="special">);</span>
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">x_external_style_on</span><span class="special">(</span><span class="keyword">true</span><span class="special">);</span>
<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">y_external_style_on</span><span class="special">(</span><span class="keyword">true</span><span class="special">);</span>
</pre>
<p>
@@ -94,7 +87,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2007 Jake Voytko<p>
+<td align="right"><div class="copyright-footer">Copyright © 2007 , 2008, 2009 Jake Voytko and Paul A. Bristow<p>
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)
</p>
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_code_1d_simple/full_1d_layout.html
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_code_1d_simple/full_1d_layout.html (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_code_1d_simple/full_1d_layout.html 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,24 +1,21 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> Tutorial:
- 1D Full Layout Example</title>
+<title>Tutorial: 1D Full Layout Example</title>
<link rel="stylesheet" href="../../../../../../../../../../trunk/doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
-<link rel="start" href="../../index.html" title="SVG_Plot">
-<link rel="up" href="../tutorial_code_1d_simple.html" title=" Tutorial: 1D">
-<link rel="prev" href="demo_1d_containers_tutorial.html" title="
- 1-D Containers Examples">
-<link rel="next" href="1d_special.html" title=" Tutorial:
- 1D Special Features">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../../index.html" title="SVG_Plot">
+<link rel="up" href="../tutorial_code_1d_simple.html" title="Tutorial: 1D">
+<link rel="prev" href="demo_1d_containers_tutorial.html" title="1-D Containers Examples">
+<link rel="next" href="1d_special.html" title="Tutorial: 1D Special Features">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../../../trunk/boost.png"></td>
<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
@@ -27,12 +24,10 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="svg_plot.tutorial_code_1d_simple.full_1d_layout"></a><a href="full_1d_layout.html" title=" Tutorial:
- 1D Full Layout Example"> Tutorial:
+<a name="svg_plot.tutorial_code_1d_simple.full_1d_layout"></a><a class="link" href="full_1d_layout.html" title="Tutorial: 1D Full Layout Example"> Tutorial:
1D Full Layout Example</a>
</h3></div></div></div>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">svg_plot</span><span class="special">/</span><span class="identifier">svg_1d_plot</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">svg_plot</span><span class="special">/</span><span class="identifier">svg_1d_plot</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">svg</span><span class="special">;</span>
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">cmath</span><span class="special">></span> <span class="comment">// for sqrt
</span>
@@ -137,7 +132,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2007 Jake Voytko<p>
+<td align="right"><div class="copyright-footer">Copyright © 2007 , 2008, 2009 Jake Voytko and Paul A. Bristow<p>
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)
</p>
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_code_1d_simple/tutorial_code_1d_example.html
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_code_1d_simple/tutorial_code_1d_example.html (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_code_1d_simple/tutorial_code_1d_example.html 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,23 +1,21 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>
- Simple 1D Example</title>
+<title>Simple 1D Example</title>
<link rel="stylesheet" href="../../../../../../../../../../trunk/doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
-<link rel="start" href="../../index.html" title="SVG_Plot">
-<link rel="up" href="../tutorial_code_1d_simple.html" title=" Tutorial: 1D">
-<link rel="prev" href="../tutorial_code_1d_simple.html" title=" Tutorial: 1D">
-<link rel="next" href="1d_vector_tutorial.html" title="
- 1-D Vector Example">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../../index.html" title="SVG_Plot">
+<link rel="up" href="../tutorial_code_1d_simple.html" title="Tutorial: 1D">
+<link rel="prev" href="../tutorial_code_1d_simple.html" title="Tutorial: 1D">
+<link rel="next" href="1d_vector_tutorial.html" title="1-D Vector Example">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../../../trunk/boost.png"></td>
<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
@@ -26,12 +24,10 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
-<a name="svg_plot.tutorial_code_1d_simple.tutorial_code_1d_example"></a><a href="tutorial_code_1d_example.html" title="
- Simple 1D Example">
+<a name="svg_plot.tutorial_code_1d_simple.tutorial_code_1d_example"></a><a class="link" href="tutorial_code_1d_example.html" title="Simple 1D Example">
Simple 1D Example</a>
</h3></div></div></div>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">svg_plot</span><span class="special">/</span><span class="identifier">svg_1d_plot</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">svg_plot</span><span class="special">/</span><span class="identifier">svg_1d_plot</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">svg</span><span class="special">;</span>
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">vector</span><span class="special">></span>
<span class="keyword">using</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">;</span>
@@ -52,11 +48,11 @@
<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">title</span><span class="special">(</span><span class="string">"Race Times"</span><span class="special">)</span> <span class="comment">// Set title and legend.
</span> <span class="special">.</span><span class="identifier">legend_on</span><span class="special">(</span><span class="keyword">true</span><span class="special">)</span>
<span class="special">.</span><span class="identifier">x_range</span><span class="special">(-</span><span class="number">1</span><span class="special">,</span> <span class="number">11</span><span class="special">);</span>
-
+
<span class="comment">// Add the containers of data to the plot.
</span> <span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">plot</span><span class="special">(</span><span class="identifier">dan_times</span><span class="special">,</span> <span class="string">"Dan"</span><span class="special">,</span> <span class="identifier">blue</span><span class="special">);</span>
<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">plot</span><span class="special">(</span><span class="identifier">elaine_times</span><span class="special">,</span> <span class="string">"Elaine"</span><span class="special">,</span> <span class="identifier">orange</span><span class="special">);</span>
-
+
<span class="comment">// And finally write the plot to a file.
</span> <span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">write</span><span class="special">(</span><span class="string">"simple.svg"</span><span class="special">);</span>
<span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
@@ -66,27 +62,32 @@
<span class="inlinemediaobject"><img src="../../images/1d_simple.png" alt="1d_simple"></span>
</p>
<a name="svg_plot.tutorial_code_1d_simple.tutorial_code_1d_example.a_note_on_syntax"></a><h5>
-<a name="id508248"></a>
- <a href="tutorial_code_1d_example.html#svg_plot.tutorial_code_1d_simple.tutorial_code_1d_example.a_note_on_syntax">A
+<a name="id709315"></a>
+ <a class="link" href="tutorial_code_1d_example.html#svg_plot.tutorial_code_1d_simple.tutorial_code_1d_example.a_note_on_syntax">A
Note On Syntax</a>
</h5>
<p>
- The syntax "<code class="computeroutput"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">title</span><span class="special">(</span><span class="string">"Hello"</span><span class="special">).</span><span class="identifier">legend_on</span><span class="special">(</span><span class="keyword">true</span><span class="special">)...</span></code>"
+ The syntax
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">title</span><span class="special">(</span><span class="string">"Hello"</span><span class="special">).</span><span class="identifier">legend_on</span><span class="special">(</span><span class="keyword">true</span><span class="special">)...</span></code>
+ </p>
+<p>
may appear unfamiliar. However, it works on the same 'chaining' principle
- that the assignment operator, addition operator, and output operator in the
- following code works:
+ that the assignment operator,
</p>
-<pre class="programlisting">
-<span class="identifier">a</span> <span class="special">=</span> <span class="identifier">b</span> <span class="special">=</span> <span class="identifier">c</span> <span class="special">=</span> <span class="identifier">d</span> <span class="special">=</span> <span class="number">3</span><span class="special">;</span>
-
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">a</span> <span class="special">+</span> <span class="identifier">b</span> <span class="special">+</span> <span class="identifier">c</span> <span class="special">+</span> <span class="identifier">d</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="comment">// prints 12
+<pre class="programlisting"><span class="identifier">a</span> <span class="special">=</span> <span class="identifier">b</span> <span class="special">=</span> <span class="identifier">c</span> <span class="special">=</span> <span class="identifier">d</span> <span class="special">=</span> <span class="number">3</span><span class="special">;</span>
+</pre>
+<p>
+ and the addition operator, and output operator in the following code works:
+ </p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">a</span> <span class="special">+</span> <span class="identifier">b</span> <span class="special">+</span> <span class="identifier">c</span> <span class="special">+</span> <span class="identifier">d</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="comment">// prints 12
</span></pre>
<p>
Within all of the plot classes, 'chaining' works the same way. Equivalent
- tradional code for the example is as follows:
+ traditional code for the example is as follows:
</p>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">title</span><span class="special">(</span><span class="string">"Race Times"</span><span class="special">);</span>
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">title</span><span class="special">(</span><span class="string">"Race Times"</span><span class="special">);</span>
<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">legend_on</span><span class="special">(</span><span class="keyword">true</span><span class="special">);</span>
<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">x_range</span><span class="special">(-</span><span class="number">1</span><span class="special">,</span> <span class="number">11</span><span class="special">);</span>
</pre>
@@ -101,22 +102,20 @@
code to read more clearly!
</p>
<a name="svg_plot.tutorial_code_1d_simple.tutorial_code_1d_example.simple_1d_example_breakdown"></a><h5>
-<a name="id508659"></a>
- <a href="tutorial_code_1d_example.html#svg_plot.tutorial_code_1d_simple.tutorial_code_1d_example.simple_1d_example_breakdown">Simple
+<a name="id709613"></a>
+ <a class="link" href="tutorial_code_1d_example.html#svg_plot.tutorial_code_1d_simple.tutorial_code_1d_example.simple_1d_example_breakdown">Simple
1D Example Breakdown</a>
</h5>
<p>
Let's examine what this does in detail.
</p>
-<pre class="programlisting">
-<span class="identifier">svg_1d_plot</span> <span class="identifier">my_plot</span><span class="special">;</span>
+<pre class="programlisting"><span class="identifier">svg_1d_plot</span> <span class="identifier">my_plot</span><span class="special">;</span>
</pre>
<p>
This constructor initializes a new 1D plot, called my_plot, and also sets
all the many default values.
</p>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">title</span><span class="special">(</span><span class="string">"Race Times"</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">title</span><span class="special">(</span><span class="string">"Race Times"</span><span class="special">)</span>
<span class="special">.</span><span class="identifier">legend_on</span><span class="special">(</span><span class="keyword">true</span><span class="special">)</span>
<span class="special">.</span><span class="identifier">x_range</span><span class="special">(-</span><span class="number">1</span><span class="special">,</span> <span class="number">11</span><span class="special">);</span>
</pre>
@@ -138,8 +137,7 @@
between -1 and 11, as you can see in the above image.
</li>
</ul></div>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">plot</span><span class="special">(</span><span class="identifier">my_data</span><span class="special">,</span> <span class="string">"Race times"</span><span class="special">);</span>
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">plot</span><span class="special">(</span><span class="identifier">my_data</span><span class="special">,</span> <span class="string">"Race times"</span><span class="special">);</span>
</pre>
<p>
This draws <code class="computeroutput"><span class="identifier">my_data</span></code> onto
@@ -153,8 +151,7 @@
<p>
</p>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">write</span><span class="special">(</span><span class="string">"simple.svg"</span><span class="special">);</span>
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">write</span><span class="special">(</span><span class="string">"simple.svg"</span><span class="special">);</span>
</pre>
<p>
This writes our plot to the file "simple.svg". SVG files can be
@@ -163,7 +160,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2007 Jake Voytko<p>
+<td align="right"><div class="copyright-footer">Copyright © 2007 , 2008, 2009 Jake Voytko and Paul A. Bristow<p>
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)
</p>
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_stylesheet.html
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_stylesheet.html (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/html/svg_plot/tutorial_stylesheet.html 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,22 +1,21 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> Stylesheet Tutorial</title>
+<title>Stylesheet Tutorial</title>
<link rel="stylesheet" href="../../../../../../../../../trunk/doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
-<link rel="start" href="../index.html" title="SVG_Plot">
+<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
+<link rel="home" href="../index.html" title="SVG_Plot">
<link rel="up" href="../index.html" title="SVG_Plot">
-<link rel="prev" href="svg_boxplot_tutorial/svg_boxplot_quartiles.html" title="
- Definitions of the Quartiles">
-<link rel="next" href="behavior.html" title=" Behavior">
+<link rel="prev" href="svg_boxplot_tutorial/svg_boxplot_quartiles.html" title="Definitions of the Quartiles">
+<link rel="next" href="behavior.html" title="Behavior">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../../trunk/boost.png"></td>
<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
@@ -25,14 +24,13 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="svg_plot.tutorial_stylesheet"></a> Stylesheet Tutorial
+<a name="svg_plot.tutorial_stylesheet"></a><a class="link" href="tutorial_stylesheet.html" title="Stylesheet Tutorial"> Stylesheet Tutorial</a>
</h2></div></div></div>
<p>
To include a stylesheet into a program with any plot, simply use the <code class="computeroutput"><span class="identifier">load_stylesheet</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&</span> <span class="identifier">filename</span><span class="special">)</span></code> method to load an external stylesheet. To
load the file ./style.css, for instance, we would call:
</p>
-<pre class="programlisting">
-<span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">load_stylesheet</span><span class="special">(</span><span class="string">"./style.css"</span><span class="special">);</span>
+<pre class="programlisting"><span class="identifier">my_plot</span><span class="special">.</span><span class="identifier">load_stylesheet</span><span class="special">(</span><span class="string">"./style.css"</span><span class="special">);</span>
</pre>
<p>
There are a few instances when a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span></code>
@@ -47,8 +45,8 @@
</li>
</ul></div>
<a name="svg_plot.tutorial_stylesheet.using_the_stylesheet"></a><h5>
-<a name="id550501"></a>
- <a href="tutorial_stylesheet.html#svg_plot.tutorial_stylesheet.using_the_stylesheet">Using the
+<a name="id748036"></a>
+ <a class="link" href="tutorial_stylesheet.html#svg_plot.tutorial_stylesheet.using_the_stylesheet">Using the
stylesheet</a>
</h5>
<p>
@@ -79,7 +77,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2007 Jake Voytko<p>
+<td align="right"><div class="copyright-footer">Copyright © 2007 , 2008, 2009 Jake Voytko and Paul A. Bristow<p>
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)
</p>
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 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,6 +1,6 @@
[section:interface Public Interfaces]
-[include svg_interface.qbk] [/ just the SVG functions.]
+[include svg_interface.qbk] [/ just the SVG functions.]
[section:svg_1d_plot_interface `svg_1d_plot` Public Interface]
[table 1D_plot Miscellaneous Functions
@@ -9,9 +9,9 @@
[[`svg_1d_plot& image_size(unsigned int, unsigned int)`] [Sets the size of the image produced (pixels)] [500, 200]]
[[`svg_1d_plot& coord_precision(int)`] [Sets the precision output for coordinates (decimal digits).] [3]]
[[`svg_1d_plot& document_title(std::string)`] [Sets title for the SVG XML document (not the plot). <title>My Document title</title>] [""]
- [[`svg_1d_plot& description(std::string)`] [Sets description for the SVG XML document, as comment and XML, for example: <!-- My Document description -->
+ [[`svg_1d_plot& description(std::string)`] [Sets description for the SVG XML document, as comment and XML, for example: <!-- My Document description -->
<desc>My Document description</desc>]]
-
+
[[`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. Switches `title_on` to `true`.] [""]]
@@ -73,7 +73,7 @@
[heading The 1D_plot `plot()` Method]
-The `plot()` method is defined using Boost.Parameter. As such, it supports a
+The `plot()` method is defined using Boost.Parameter. As such, it supports a
few extra named parameters, as well as a deduced parameter.
[table 1D_plot Required parameter
@@ -111,14 +111,14 @@
plot(my_plot, my_data, "Lions", _x_functor = my_functor());
``
][
-`boost_default_convert` is sufficient in all cases where the data stored in
+`boost_default_convert` is sufficient in all cases where the data stored in
the container can be directly cast to a `double`.]]
] [/ table 1D_plot Optional Parameters]
Here are some examples of using of the 1D_plot `plot` method:
[h4 Using 1D_plot fill and stroke colors]
- my_plot.plot(my_data, "Lions")
+ my_plot.plot(my_data, "Lions")
.fill_color(red).
.line_color(black);
@@ -132,7 +132,7 @@
[[`svg_2d_plot& title(const std::string&)`] [Sets the string to be used for the title.] [Null string.]]
[[`svg_2d_plot& title_font_size(unsigned int)`] [Sets the font size for the title.] [16]]
[[`svg_2d_plot& legend_title_font_size(unsigned int)`] [Sets the font size for the legend title.] [14]]
-
+
] [/ table 2D_plot Miscellaneous]
[table 2D_plot On/Off Switches
@@ -154,20 +154,20 @@
[[`svg_2d_plot& y_major_labels_on(int)`] [sets if and how the major ticks will be labelled on the Y axis.
< 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.] [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.] [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).]]
[[`svg_2d_plot& y_value_ioflags(int)`] [Sets the iostream flags for value labels on the Y 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& x_major_label_rotation`(int)] [Sets the direction of writing of value labels from the X axis ticks. `enum rotate_style` provides control is 45 degree steps. Default is horizontal.
+ [[`svg_2d_plot& x_major_label_rotation`(int)] [Sets the direction of writing of value labels from the X axis ticks. `enum rotate_style` provides control is 45 degree steps. Default is horizontal.
``enum rotate_style
{ // Rotation in degrees from horizontal. horizontal = 0, // normal left to right.
uphill = -45, // slope up.
@@ -179,8 +179,8 @@
upsidedown = 180 // == -180
};``
]]
- [[`svg_2d_plot& y_major_label_rotation(int)`] [Determines the direction of writing of value labels from the Y axis ticks. `enum rotate_style` provides control is 45 degree steps.] [Horizontal]]
-
+ [[`svg_2d_plot& y_major_label_rotation(int)`] [Determines the direction of writing of value labels from the Y axis ticks. `enum rotate_style` provides control is 45 degree steps.] [Horizontal]]
+
[[`svg_2d_plot& `x_major_value_labels_on(int)`] [If label values for X major ticks, and direction: -1 = bottom, 0 = *no* value labels, +1 = top. Default -1, bottom of plot window.] [bottom]]
[[`svg_2d_plot& `y_major_value_labels_on(int)`] [If label values for Y major ticks, and direction: -1 = left, 0 = *no* value labels, +1 = right. Default -1, left of plot window.] [left]]
[[`svg_2d_plot& `x_ticks_on_plot_window_on(int)`] [Position of Y axis of value labels & ticks: -1 = left, 0 = on Y-axis, +1 = right. Default -1, left of plot window.] [bottom]]
@@ -191,7 +191,7 @@
[[`svg_2d_plot& `y_axis_width(double)`] [Sets Y axis line width.] [2]]
[[`svg_2d_plot& `x_axis_color(double)`] [Sets X axis line color.][black.]]
[[`svg_2d_plot& `y_axis_color(double)`] [Sets Y axis line color.] [black.]]
-
+
] [/ table 2D_plot Commands]
[table 2D_plot Colors
@@ -262,22 +262,22 @@
For example, after a call of
my_plot.y_num_minor_ticks(9); // Chose 9 minor ticks between y major ticks.
-
+
my_plot.y_num_minor_ticks() == 9
-
-The function show_2d_settings displayed *all* the settings from accessors below.
-
+
+The function show_2d_settings displayed *all* the settings from accessors below.
+
[table 2D_plot Accessor functions
[[`axis_line_style& x_axis()`] [returns reference to X axis_line_style.] ]
[[`axis_line_style& y_axis()`] [returns reference to Y axis_line_style.] ]
[[`ticks_labels_style& x_ticks()`] [returns reference to X ticks_labels_style.] ]
[[`ticks_labels_style& y_ticks()`] [returns reference to Y ticks_labels_style.] ]
- [[`std::string x_label()`] [Returns string labelling the X-axis.] ]
+ [[`std::string x_label()`] [Returns string labelling the X-axis.] ]
[[`std::string y_label()`] [Returns string labelling the Y-axis.] ]
[[`std::string x_label_units()`] [Returns string labelling units of the X-axis.] ]
[[`std::string y_label_units()`] [Returns string labelling units of the Y-axis.] ]
] [/table 2D_plot Accessor functions]
-
+
[heading The `plot()` Method]
The `plot()` method supports two parameters & some chained functions.
@@ -290,7 +290,7 @@
[table 2D_plotChained Functions
[[ID] [Type] [Description] [Default]]
-[[fill_color] [`svg_color`] [This is the color that shows inside of the circle that is
+[[fill_color] [`svg_color`] [This is the color that shows inside of the circle that is
being drawn.] [white]]
] [/ table 2D_plot Deduced parameter]
@@ -320,7 +320,7 @@
plot(my_plot, my_data, "People", _x_functor = my_functor());
``
]
-[`boost_default_2d_convert` (the default) is sufficient in all cases where the data stored in
+[`boost_default_2d_convert` (the default) is sufficient in all cases where the data stored in
the container can be directly cast to a double.] ]
] [/ table 2D_plot Optional Parameters]
@@ -328,8 +328,8 @@
Here are some examples of correct uses:
[h3 Using fill and stroke colors]
- my_plot.(my_data, "Lions")
- .fill_color(red)
+ my_plot.(my_data, "Lions")
+ .fill_color(red)
.stroke_color(black);
[endsect] [/section:svg_2d_plot_interface]
@@ -456,7 +456,7 @@
box_style(const svg_color& scolor = black,
const svg_color& fcolor = antiquewhite,
double width = 1, // of border
- double margin = 2., //
+ double margin = 2., //
bool border_on = true, // Draw a border of width.
bool fill_on = false) // Apply fill color.
:
@@ -492,7 +492,7 @@
Text style constructor.
- text_style(int size = 20,
+ text_style(int size = 20,
const std::string& font = "", // Default is sans with Firefox & IE, but serif with Opera.
const std::string& style = "", // italic, bold.
// Functions not yet implemented by most browsers.
@@ -508,7 +508,7 @@
decoration_(decoration)
{ // text_style default constructor, defines defaults for all private members.
}
-
+
[table Text Style Constructor
[[parameter #] [name] [Default] [Description]]
[[1] [font_size] [20] [text font size (svg units).]]
@@ -522,12 +522,12 @@
Examples:
text_style my_style;
-
+
produces a normal default font of size 20 svg units (usually pixels).
text_style my_style(14, "Lucida Sans Unicode", "italic");
-
-produces a Lucida Sans Unicode font of size of 14 svg units (usually pixels).
+
+produces a Lucida Sans Unicode font of size of 14 svg units (usually pixels).
[table Text Style Accessor functions
[[name] [parameter type] [Default value] [Description] [Examples]]
@@ -562,7 +562,7 @@
symbols_style_.font_size(size);
symbols_style_.font_family("Lucida Sans Unicode");
}
-
+
[table Plot Point Style Constructor
[[Parameter #] [Name] [Default] [Description]]
[[1] [fill] [blank] [SVG fill color.]]
@@ -574,11 +574,11 @@
Examples:
- point_style_(black, blank, 10, round), // Default point style, black 10 point unfilled circle.
- point_style_(red, yellow, 5, square), // Point style, red 5 square filled yellow.
-
+ point_style(black, blank, 10, round), // Default point style, black 10 point unfilled circle.
+ point_style(red, yellow, 5, square), // Point style, red 5 square filled yellow.
+
It is usually convenient to override point styles onto calls of plot function by chaining thus:
-
+
my_plot.plot(data2, "-2 + x^2").fill_color(orange).size(5).shape(square);
Shapes available are:
@@ -607,7 +607,7 @@
symbol // Unicode symbol including letters, digits, greek & 'squiggles'.
// For example: Ω = greek omega
// Other shapes may be added.
- };
+ };
[table Plot Point Style Accessor Functions
[[name] [parameter type] [Default value] [Description] [Examples]]
@@ -622,7 +622,7 @@
[h6 plot_line_style defines how data points are joined.]
class plot_line_style
- { // Style of line joining data series values.
+ { // Style of line joining data series values.
public:
svg_color color_; // Line stroke color. (No fill color for lines).
svg_color area_fill_; // Fill color from line to axis. == true means color.blank = true.
@@ -636,7 +636,7 @@
{ // Defaults for all private data.
}
-
+
[table Plot Line Style Constructor
[[parameter #] [name] [Default] [Description]]
[[1] [color] [black] [Line color (SVG stroke color).]]
@@ -647,14 +647,13 @@
] [/ table Plot Line Style]
Examples:
-
+
my_line_style line_style_(black, true, 2, true, false);
// Black straight line joining points (without area fill).
-
+
In practice it is often convenient to chain function calls onto plot function calls thus:
-
- my_plot.plot(data3, "-1 + 2x").bezier_on(true).line_color(blue);
+ my_plot.plot(data3, "-1 + 2x").bezier_on(true).line_color(blue);
[table Plot Line Style Accessor functions
[[name] [parameter type] [Default value] [Description] [Examples]]
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/stylesheet_tutorial.qbk
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/stylesheet_tutorial.qbk (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/stylesheet_tutorial.qbk 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,5 +1,7 @@
[section:tutorial_stylesheet Stylesheet Tutorial]
+The is no longer implemented so removed from the docs, pro tem.
+
To include a stylesheet into a program with any plot, simply use the `load_stylesheet(const std::string& filename)` method to load an external stylesheet. To load the file ./style.css, for instance, we would call:
my_plot.load_stylesheet("./style.css");
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/svg_interface.qbk
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/svg_interface.qbk (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/svg_interface.qbk 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,5 +1,5 @@
[section:svg_interface `svg` Public Interface]
-[table class `svg` Standard C++ Methods
+[table class `svg` Standard C++ Methods
[[Signature] [Description] [Notes & Examples]]
[[`svg()`] [Constructor] [Default image size (pixels) is (400, 400).]]
@@ -35,13 +35,13 @@
[[`polygon_element& polygon(std::vector<poly_path_point>& v, bool f)`] [Generates a polygon from the vector input using Cartesian coordinates.][ Fill is determined by `f`.] ]
- [[`polyline_element& polyline(double x, double y)`][Places a polyline at coordinate (x, y)][]]
+ [[`polyline_element& polyline(double x, double y)`][Starts a polyline at coordinate (x, y) (Add more path points using .P(x, y)][]]
[[`polyline_element& polyline(double x1, double y1, double x2, double y2)`] [Adds a polyline to the root of the SVG document from (x1, y1) to (x2, y2)][]]
[[`polyline_element& polyline(std::vector<poly_path_point>& v, bool f=true)`] [Adds a polyline to the root of the SVG document with][`f` denotes the option to provide a fill for the polyline.]]
- [[`rect_element& rect(double x1, double y1,
+ [[`rect_element& rect(double x1, double y1,
double width, double height)`] [Adds a rectangle at point (x1, y1) that has `width` wide and `height` high.][]]
[[`polygon_element& rhombus(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, bool f = true`][Generates a rhombus at the four coordinates provided] [Fill is determined by `f`.]]
@@ -74,12 +74,12 @@
[[`const std::string& copyright_date()`] [Returns the copyright date for the SVG XML document] [Returns the date string, not the associated XML.]]
- [[`void copyright_date(const std::string)`] [Set copyright date for the SVG XML document, as comment and XML.][<!-- SVG Plot Copyright Paul A. Bristow 2007 -->
+ [[`void copyright_date(const std::string)`] [Set copyright date for the SVG XML document, as comment and XML.][<!-- SVG Plot Copyright Paul A. Bristow 2007 -->
<meta name="date" content="2007" />]]
[[`const std::string& copyright_holder`] [Returns the copyright holder for the SVG XML document] [Returns the input value for copyright holder. Does not return any XML]]
- [[`void copyright_holder(const std::string)`] [Set copyright holder for the SVG XML document, as comment and XML.][<!-- SVG Plot Copyright Paul A. Bristow 2007 -->
+ [[`void copyright_holder(const std::string)`] [Set copyright holder for the SVG XML document, as comment and XML.][<!-- SVG Plot Copyright Paul A. Bristow 2007 -->
<meta name="copyright" content="Paul A. Bristow" />]]
[[`const std::string& description()`] [Returns the description of the document.] [Returns the description string, not the associated XML]]
@@ -126,7 +126,7 @@
[[`void write(const std::string&)`] [Writes the document to the file represented by the argument. (If not file type sufix is provided, the default file suffix `".svg"` is appended.][Opens the file stream itself and tries to call `write(std::ostream&)`. Throws `std::runtime_exception` if it can not open the file.]]
- [[`void write(std::ostream&)`] [Writes the document to the stream represented by the argument.][]]
+ [[`void write(std::ostream&)`] [Writes the document to the stream represented by the argument.][]]
] [/table `svg` document settings and writing]
[endsect] [/section:svg_interface]
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/svg_plot.qbk
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/svg_plot.qbk (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/svg_plot.qbk 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,15 +1,55 @@
-[article SVG_Plot
+[article SVG_Plot Manual
[quickbook 1.4]
- [authors [Voytko, Jake]]
- [copyright 2007 Jake Voytko]
- [purpose Plot STL containers onto graphs in SVG format]
+ [id SVG plot documentation]
+ [authors [Voytko, Jake], [Bristow, Paul A.]]
+ [copyright 2007, 2008, 2009 Jake Voytko and Paul A. Bristow]
[license
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])
]
+ [source-mode c++]
+ [purpose Plot STL containers onto graphs in SVG format.]
]
+[/ Images ]
+[/ $images is ref to folder where images are held.
+[def __note__ [$images/note.png]]
+[def __alert__ [$images/caution.png]]
+[def __detail__ [$images/note.png]]
+[def __tip__ [$images/tip.png]]
+
+[/ Links ]
+[/ By Eric's convention prefix and suffix _ means a defined value. ]
+[def _boost_ [@http://www.boost.org Boost]]
+[/def _iterator_ [@../../libs/iterator/doc/index.html Boost.Iterator]]
+[/def _basic_regex_ [^[classref boost::xpressive::basic_regex basic_regex<>]]]
+[/ _basic_regex_ == file:///I:/boost_trunk/libs/xpressive/doc/html/boost/xpressive/basic_regex.html]
+[/def _regex_match_ [^[funcref boost::xpressive::regex_match regex_match()]]]
+[/def _syntax_option_type_ [^[enumref boost::xpressive::regex_constants::syntax_option_type syntax_option_type]]]
+[/def _regex_compile_ [^[memberref boost::xpressive::basic_regex::compile basic_regex<>::compile()]]]
+
+[/ Generating docs for compound boost::svg::svg]
+[/ Generating XML output for class boost::svg::svg]
+
+[def _svg [classref boost::svg::svg] ] [/ just a (default) name == boost::svg::svg]
+
+[def _svg_ [^[classref boost::svg::svg svg<>]]]
+[def _svg_1d_plot_ [^[classref boost::svg::svg_1d_plot svg_1d_plot<>]]]
+[def _svg_1d_plot_series_ [^[classref boost::svg::svg_1d_plot_series<>]]]
+
+[xinclude autodoc.xml] [/ Using Doxygen documentation.]
+
+[section:test_links testing links]
+
+Test link to _boost_
+[classref boost::svg::svg]
+Test Link to _svg_
+Test Link to _svg_1d_plot_
+Test Link to _svg_1d_plot_series_
+
+[endsect] [/test_links]
+
[include how_to_use.qbk]
[include to_do.qbk]
[include colors.qbk]
@@ -17,7 +57,8 @@
[include 1d_tutorial.qbk]
[include 2d_tutorial.qbk]
[include boxplot_tutorial.qbk]
-[include stylesheet_tutorial.qbk]
+[auto_1d_containers.qbk
+[/include stylesheet_tutorial.qbk] [/ No longer implemented.]
[include behavior_tutorial.qbk]
[include plot_defaults.qbk]
[include interface.qbk]
@@ -25,7 +66,7 @@
[include acknowledgements.qbk]
[/ svg_plot.qbk
- Copyright 2008 Jake Voytko and Paul A. Bristow.
+ Copyright 2008, 2009 Jake Voytko and 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/svg_tutorial.qbk
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/svg_tutorial.qbk (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/svg_tutorial.qbk 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,4 +1,5 @@
[section:svg_tutorial SVG tutorial]
+TODO
[endsect]
[/ svg_tutorial.qbk
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/1d_x_external.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/1d_x_external.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/1d_x_external.cpp 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -12,22 +12,22 @@
int main()
{
- vector<double> dan_times;
- vector<double> elaine_times;
+ vector<double> dan_times;
+ vector<double> elaine_times;
- dan_times.push_back(3.1);
- dan_times.push_back(4.2);
- elaine_times.push_back(2.1);
- elaine_times.push_back(7.8);
+ dan_times.push_back(3.1);
+ dan_times.push_back(4.2);
+ elaine_times.push_back(2.1);
+ elaine_times.push_back(7.8);
- svg_1d_plot my_plot;
+ svg_1d_plot my_plot;
// Adding generic settings.
- my_plot.background_border_color(black)
- .legend_on(true)
- .plot_window_on(true)
- .title("Race Times")
- .x_range(-1, 11);
+ my_plot.background_border_color(black)
+ .legend_on(true)
+ .plot_window_on(true)
+ .title("Race Times")
+ .x_range(-1, 11);
// Adding grid information.
my_plot.x_major_grid_on(true)
@@ -42,10 +42,10 @@
my_plot.y_ticks_left(true); // external.
// Write to plot.
- my_plot.plot(dan_times, "Dan", blue);
- my_plot.plot(elaine_times, "Elaine", orange);
+ my_plot.plot(dan_times, "Dan", blue);
+ my_plot.plot(elaine_times, "Elaine", orange);
// Write to file.
my_plot.write("./1d_x_external.svg");
- return 0;
+ return 0;
}
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-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -42,7 +42,7 @@
//[demo_1d_values_2
/*`Some fictional data is pushed into an STL container, here vector<double>:*/
- vector<double> my_data;
+ vector<double> my_data;
my_data.push_back(-1.6);
my_data.push_back(2.0);
my_data.push_back(4.2563);
@@ -51,8 +51,8 @@
my_data.push_back(6.556);
try
- { // try'n'catch clocks are needed to ensure error messages from any exceptions are shown.
- svg_1d_plot my_1d_plot; // Construct a plot with all the default constructor values.
+ { // try'n'catch blocks are needed to ensure error messages from any exceptions are shown.
+ svg_1d_plot my_1d_plot; // Construct a plot with all the default constructor values.
my_1d_plot.title("Default 1D Values Demo") // Add a string title of the plot.
.x_range(-5, 10) // Add a range for the X-axis.
@@ -129,7 +129,7 @@
std::cout <<
"\n""Message from thrown exception was:\n " << e.what() << std::endl;
}
- return 0;
+ return 0;
} // int main()
/*
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_plot.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_plot.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_plot.cpp 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -13,6 +13,7 @@
# pragma warning (disable : 4180) // qualifier applied to function type has no meaning; ignored
# pragma warning (disable : 4503) // decorated name length exceeded, name was truncated
# pragma warning (disable : 4512) // assignment operator could not be generated
+# pragma warning (disable : 4100) // unreferenced formal parameter
#endif
#include <boost/svg_plot/svg_2d_plot.hpp>
@@ -93,7 +94,7 @@
int x_major_label = -1, int y_major_label = -1, // None
int x_rotation = horizontal, int y_rotation = upward) //
{
- using namespace boost::svg;
+ using namespace boost::svg;
svg_2d_plot my_plot;
// Size/scale settings.
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_simple.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_simple.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_simple.cpp 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -1,4 +1,4 @@
-// demoe_2d_plot.cpp
+// demo_2d_plot.cpp
// Copyright Jacob Voytko 2007
// Copyright Paul A. Bristow 2007, 2008
@@ -90,14 +90,14 @@
std::string s = my_plot.title();
my_plot.plot(data1, "Sqrt(x)").fill_color(red);
- my_plot.plot(data2, "-2 + x^2").fill_color(orange).size(5);
- my_plot.plot(data3, "-1 + 2x").fill_color(yellow).bezier_on(true).line_color(blue).shape(square);
+ my_plot.plot(data2, "-2 + x^2").fill_color(orange).size(5);
+ my_plot.plot(data3, "-1 + 2x").fill_color(yellow).bezier_on(true).line_color(blue).shape(square);
cout << " my_plot.title() " << my_plot.title() << endl;
my_plot.write("./demo_2d_simple.svg");
cout << " my_plot.title() " << my_plot.title() << endl;
- show_plot_settings(my_plot);
+ show_2d_plot_settings(my_plot);
}
catch(const std::exception& e)
{
@@ -122,7 +122,7 @@
Autorun "j:\Cpp\SVG\debug\demo_2d_simple.exe"
my_plot.title() demo_2d_simple title
my_plot.title() demo_2d_simple title
- my_plot.title()
+ my_plot.title()
axes_on true
background_border_width 2
background_border_color RGB(255,255,0)
@@ -130,10 +130,10 @@
image_border_margin() 10
image_border_width() 2
coord_precision 3
-copyright_date
-copyright_holder
-description
-document_title
+copyright_date
+copyright_holder
+description
+document_title
image_x_size 500
image_y_size 400
legend_on false
@@ -142,9 +142,9 @@
legend_background_color blank
legend_border_color RGB(255,255,0)
legend_color blank
-legend_title
+legend_title
legend_title_font_size 14
-legend_font_weight
+legend_font_weight
legend_width 0
legend_lines true
license_on false
@@ -166,13 +166,13 @@
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_weight
+title_font_stretch
+title_font_style
+title_font_weight
x_value_precision 3
x_value_ioflags 200 IOS format flags (0x200) dec.
y_value_precision 3
@@ -189,7 +189,7 @@
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_value_labels_side left
x_major_label_rotation 0
@@ -228,7 +228,7 @@
y_label_font_family Verdana
y_label_font_size 14
y_label_on true
-y_label_units
+y_label_units
y_label_units_on false
y_label_width 0
y_major_grid_on false
@@ -248,7 +248,7 @@
y_minor_tick_length 2
y_minor_tick_width 1
y_range() -10, 10
-y_num_minor_ticks
+y_num_minor_ticks
y_ticks_left_on true
y_ticks_right_on false
y_ticks_on_window_or_axis left
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/test/1d_tests.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/test/1d_tests.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/test/1d_tests.cpp 2009-01-27 07:04:48 EST (Tue, 27 Jan 2009)
@@ -18,7 +18,8 @@
# pragma warning(disable : 4702) // unreachable code
# pragma warning(disable : 4701) // potentially uninitialized local variable 'old_iph' used
# pragma warning(disable : 4224) // nonstandard extension used : formal parameter 'arg' was previously defined as a type
-# pragma warning(disable : 4172) // returning address of local variable or temporary >>>>>>>> TODO get rid of this!
+# pragma warning(disable : 4996) // deprecated. To disable deprecation, use _CRT_SECURE_NO_WARNINGS.
+# pragma warning(disable : 4800) // 'const int' : forcing value to bool 'true' or 'false' (performance warning)
#endif
#define BOOST_TEST_MAIN
@@ -162,9 +163,9 @@
BOOST_CHECK_EQUAL(tl2.first, 10.);
BOOST_CHECK_EQUAL(tl2.second, 20.);
- BOOST_CHECK_EQUAL(my_plot.title(), "Plot of data"); // Title of plot.
- my_plot.title("Plot of data");
- BOOST_CHECK_EQUAL(my_plot.title(), "test");
+ BOOST_CHECK_EQUAL(my_plot.title(), ""); // Default NO title of plot.
+ my_plot.title("test title");
+ BOOST_CHECK_EQUAL(my_plot.title(), "test title");
BOOST_CHECK_EQUAL(my_plot.legend_title(), ""); // Default no legend title.
my_plot.legend_title("");
@@ -289,10 +290,16 @@
// ticks left and right only for 2-D
-
my_plot.y_axis_on(false); // But leave false - as always should be for 1D?
- BOOST_CHECK_EQUAL(my_plot.title_color(), blank); // Check default color.
+ BOOST_CHECK_EQUAL(svg_color(red), svg_color(red)); // OK
+ // But problem when try to check that svg_color is blank!
+ //BOOST_CHECK_EQUAL(svg_color(blank), false); // check svg_color(blank) == false failed [blank != false]
+ BOOST_CHECK_EQUAL(svg_color(blank), svg_color(255, 255, 255)); // but this is OK.
+
+ //BOOST_CHECK_EQUAL(my_plot.title_color(), svg_color(blank)); // Check default color is blank.
+ // check my_plot.title_color() == svg_color(blank) failed [blank != blank]
+ BOOST_CHECK_EQUAL(my_plot.title_color(), svg_color(255, 255, 255)); // Check default color is blank.
my_plot.title_color(svg_color(red)); //
BOOST_CHECK_EQUAL(my_plot.title_color(), svg_color(red)); // & check.
@@ -304,7 +311,7 @@
my_plot.legend_background_color( svg_color(red)); //
BOOST_CHECK_EQUAL(my_plot.legend_background_color(), svg_color(red)); // & check.
- BOOST_CHECK_EQUAL(my_plot.legend_border_color(), svg_color(0, 0, 0)); // Check default color.
+ BOOST_CHECK_EQUAL(my_plot.legend_border_color(), svg_color(255, 255, 0)); // Check default color.
my_plot.legend_border_color( svg_color(red)); //
BOOST_CHECK_EQUAL(my_plot.legend_border_color(), svg_color(red)); // & check.
@@ -324,11 +331,11 @@
my_plot.y_axis_color( svg_color(red)); //
BOOST_CHECK_EQUAL(my_plot.y_axis_color(), svg_color(red)); // & check.
- BOOST_CHECK_EQUAL(my_plot.x_label_color(), blank); // Check default color.
+ BOOST_CHECK_EQUAL(my_plot.x_label_color(), svg_color(255, 255, 255)); // Check default color.
my_plot.x_label_color( svg_color(red)); //
BOOST_CHECK_EQUAL(my_plot.x_label_color(), svg_color(red)); // & check.
- BOOST_CHECK_EQUAL(my_plot.y_label_color(), blank); // Check default color.
+ BOOST_CHECK_EQUAL(my_plot.y_label_color(), svg_color(255, 255, 255)); // Check default color.
my_plot.y_label_color(svg_color(red)); //
BOOST_CHECK_EQUAL(my_plot.y_label_color(), svg_color(red)); // & check.
@@ -360,13 +367,12 @@
my_plot.x_axis_width(2); // change
BOOST_CHECK_EQUAL(my_plot.x_axis_width(), 2); // & check.
- BOOST_CHECK_EQUAL(my_plot.x_label(), "X Axis"); // Check default label.
+ BOOST_CHECK_EQUAL(my_plot.x_label(), ""); // Check NO default label.
my_plot.x_label("X Axis"); //
- BOOST_CHECK_EQUAL(my_plot.x_label(), "X"); // & check.
- BOOST_CHECK_EQUAL(my_plot.x_label(), "X"); // & check.
+ BOOST_CHECK_EQUAL(my_plot.x_label(), "X Axis"); // & check.
- BOOST_CHECK_EQUAL(my_plot.x_label_units(), " (units)"); // Check default label.
- my_plot.x_label_units(" (units)"); //
+ BOOST_CHECK_EQUAL(my_plot.x_label_units(), ""); // Check NO default label.
+ my_plot.x_label_units(" (meter)"); //
BOOST_CHECK_EQUAL(my_plot.x_label_units()," (meter)"); // & check.
BOOST_CHECK_EQUAL(my_plot.x_major_interval(), 2.); // Check default.
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