|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r80136 - in sandbox/SOC/2007/visualization/libs/svg_plot: doc example test
From: pbristow_at_[hidden]
Date: 2012-08-22 05:08:22
Author: pbristow
Date: 2012-08-22 05:08:19 EDT (Wed, 22 Aug 2012)
New Revision: 80136
URL: http://svn.boost.org/trac/boost/changeset/80136
Log:
Docs and examples update.
Text files modified:
sandbox/SOC/2007/visualization/libs/svg_plot/doc/doxywarnings.log | 7
sandbox/SOC/2007/visualization/libs/svg_plot/doc/svg_plot.qbk | 13
sandbox/SOC/2007/visualization/libs/svg_plot/example/2d_bezier.cpp | 4
sandbox/SOC/2007/visualization/libs/svg_plot/example/auto_1d_containers.cpp | 18 ++
sandbox/SOC/2007/visualization/libs/svg_plot/example/auto_2d_plot.cpp | 2
sandbox/SOC/2007/visualization/libs/svg_plot/example/auto_boxplot.cpp | 15 +
sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_autoscaling.cpp | 1
sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_limits.cpp | 2
sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_tick_values.cpp | 4
sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_uncertainty.cpp | 68 +++++---
sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_values.cpp | 4
sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_vector.cpp | 2
sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_autoscaling.cpp | 2
sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_fonts.cpp | 26 +-
sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_limits.cpp | 2
sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_simple.cpp | 8
sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_tick_values.cpp | 2
sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_uncertainty.cpp | 282 ++++++++++++++++++++++++++++++++++++---
sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_values.cpp | 2
sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_boxplot.cpp | 3
sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_boxplot_full.cpp | 2
sandbox/SOC/2007/visualization/libs/svg_plot/example/svg_colors.cpp | 1
sandbox/SOC/2007/visualization/libs/svg_plot/test/1d_tests.cpp | 58 ++++++-
sandbox/SOC/2007/visualization/libs/svg_plot/test/test_svg.cpp | 4
24 files changed, 416 insertions(+), 116 deletions(-)
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/doc/doxywarnings.log
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/doc/doxywarnings.log (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/doc/doxywarnings.log 2012-08-22 05:08:19 EDT (Wed, 22 Aug 2012)
@@ -1,7 +0,0 @@
-I:/boost-sandbox/SOC/2007/visualization/boost/svg_plot/svg_1d_plot_dud.hpp:283: warning: member `detail::axis_plot_frame<svg_1d_plot>' of class `svg_1d_plot' cannot be found
-I:/boost-sandbox/SOC/2007/visualization/boost/svg_plot/svg_1d_plot_dud.hpp:831: warning: Member plot(const T &container, const std::string &title="") (function) of class boost::svg::svg_1d_plot is not documented.
-I:/boost-sandbox/SOC/2007/visualization/boost/svg_plot/svg_1d_plot_dud.hpp:833: warning: Member plot(const T &begin, const T &end, const std::string &title="") (function) of class boost::svg::svg_1d_plot is not documented.
-I:/boost-sandbox/SOC/2007/visualization/boost/svg_plot/svg_1d_plot_dud.hpp:835: warning: Member plot(const T &begin, const T &end, const std::string &title="", U functor=double_1d_convert) (function) of class boost::svg::svg_1d_plot is not documented.
-I:/boost-sandbox/SOC/2007/visualization/boost/svg_plot/svg_1d_plot_dud.hpp:837: warning: Member plot(const T &container, const std::string &title="", U functor=double_1d_convert) (function) of class boost::svg::svg_1d_plot is not documented.
-I:/boost-sandbox/SOC/2007/visualization/boost/svg_plot/svg_1d_plot_dud.hpp:826: warning: Member write(const std::string &file) (function) of class boost::svg::svg_1d_plot is not documented.
-I:/boost-sandbox/SOC/2007/visualization/boost/svg_plot/svg_1d_plot_dud.hpp:827: warning: Member write(std::ostream &s_out) (function) of class boost::svg::svg_1d_plot is not documented.
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 2012-08-22 05:08:19 EDT (Wed, 22 Aug 2012)
@@ -79,20 +79,21 @@
* [@http:/www.google.com/chrome Google Chrome browser]
-* [@www.opera.com Opera] has [@http://www.opera.com/docs/specs/svg/ svg support]
-but the quality of rendering is sometimes not as good as other browsers.
+* [@www.opera.com Opera] has [@http://www.opera.com/docs/specs/svg/ svg support].
-* Microsoft Internet Explorer, provided a suitable
+* Microsoft Internet Explorer IE9 and later,
+but the quality of rendering is poor compared to all other browsers and cannot be recommended.
+But earlier versions of Microsoft Internet Explorer can render SVG files provided a suitable
[@http://www.adobe.com/svg/ Adobe SVG Viewer plug-in for SVG files] is installed.
-Shamefully, even IE8 Beta does not yet offer SVG rendering.
(Adobe have stopped offering this for download (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].
Information about limitations of IE with Vista and the Adobe add-in 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 editor Inkscape and
-a viewer Inkview with excellent rendering, full scaling and other editing features.
+* [@http://www.inkscape.org/ Inkscape], a fine Open Source SVG editor Inkscape, and
+a viewer Inkview, with excellent rendering, full scaling and other editing features.
+Inkscape is the 'gold standard' for viewing SVG files.
Inkview also allows window resizing, showing the scalability of SVG files without any loss of quality,
unlike bit image files that eventually reveal pixels as you expand the view.
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/2d_bezier.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/2d_bezier.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/2d_bezier.cpp 2012-08-22 05:08:19 EDT (Wed, 22 Aug 2012)
@@ -86,14 +86,14 @@
my_plot.legend_title_font_size(15);
my_plot.plot(data1, "Sin(x)").line_on(true)
- .shape(round).size(5).fill_color(yellow);
+ .shape(circlet).size(5).fill_color(yellow);
my_plot.plot(data2, "Cos(x)")
.line_color(blue)
.bezier_on(true)
.shape(square).size(5).fill_color(red);
- // Note the slightly smoother curve for the bezier_on comapred to the line_on options.
+ // Note the slightly smoother curve for the bezier_on compared to the line_on options.
my_plot.write("./2d_bezier.svg");
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/auto_1d_containers.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/auto_1d_containers.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/auto_1d_containers.cpp 2012-08-22 05:08:19 EDT (Wed, 22 Aug 2012)
@@ -140,6 +140,7 @@
my_1d_plot.write("auto_1d_containers.svg"); // Write the plot to file.
/*`If we want, we can check the autoscale range used.*/
+ using boost::svg::detail::operator<<; // To avoid ambiguity.
cout << "x_range() " << my_1d_plot.x_range() << endl; // x_range() 0, 15
/*`And even all the (hundreds of) plot settings (useful for diagnosis why your plot doesn't meet your expectations).*/
//show_1d_plot_settings(my_1d_plot);
@@ -164,6 +165,23 @@
Data range: 0.2, 14.9
x_range() 0, 15
Build Time 0:03
+
+
+with unc class
+
+ Description: Autorun "J:\Cpp\SVG\Debug\auto_1d_containers.exe"
+ 6 values in container: 0.2 1.1 4.2 3.3 5.4 6.5
+ 2 containers.
+ 6 values in container: 0.2 1.1 4.2 3.3 5.4 6.5
+ 6 values in container: 0.46 2.53 9.66 7.59 12.42 14.95
+ Data range: <0.2, 14.95>
+ x_range() 0, 15
+
+
+
+
+
+
//] [/auto_1d_containers_output]
*/
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/auto_2d_plot.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/auto_2d_plot.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/auto_2d_plot.cpp 2012-08-22 05:08:19 EDT (Wed, 22 Aug 2012)
@@ -143,3 +143,5 @@
X min 1, X max 8
Y min 0, Y max 10
//] [/auto_2d_plot_output]
+
+*/
\ No newline at end of file
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/auto_boxplot.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/auto_boxplot.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/auto_boxplot.cpp 2012-08-22 05:08:19 EDT (Wed, 22 Aug 2012)
@@ -31,6 +31,9 @@
(and some others only needed for this example).
*/
+#include <boost/quan/meas.hpp>
+#include <boost/quan/unc.hpp>
+
#include <boost/svg_plot/svg_boxplot.hpp>
using boost::svg::svg_boxplot;
@@ -42,6 +45,12 @@
#include <boost/algorithm/minmax_element.hpp>
using boost::minmax_element;
+#include <boost/svg_plot/detail/auto_axes.hpp>
+ using boost::svg::show; // A single STL container.
+ using boost::svg::show_all; // Multiple STL containers.
+ using boost::svg::range; // Find min and max of a STL container.
+ using boost::svg::range_all;// Find min and max of multipler STL containers.
+
#include <iostream> // for debugging.
using std::cout;
using std::endl;
@@ -58,12 +67,6 @@
#include <utility>
using std::pair;
-#include <boost/svg_plot/detail/auto_axes.hpp>
- using boost::svg::show; // A single STL container.
- using boost::svg::show_all; // Multiple STL containers.
- using boost::svg::range; // Find min and max of a STL container.
- using boost::svg::range_all;// Find min and max of multipler STL containers.
-
//] [/auto_boxplot_1]
void scale_axis(double min_value, double max_value, // input
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_autoscaling.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_autoscaling.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_autoscaling.cpp 2012-08-22 05:08:19 EDT (Wed, 22 Aug 2012)
@@ -157,6 +157,7 @@
my_1d_plot.write("demo_1d_autoscaling_2.svg"); // Write the plot to file.
/*`If we want, we can check the autoscale range used, noting that zero *is* included because we demanded it.*/
+ using boost::svg::detail::operator<<;
cout << "x_range() " << my_1d_plot.x_range() << endl; // x_range() 0, 8
//show_1d_plot_settings(my_1d_plot); // If required.
}
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_limits.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_limits.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_limits.cpp 2012-08-22 05:08:19 EDT (Wed, 22 Aug 2012)
@@ -63,7 +63,7 @@
/*`Add the one data series, `my_data` and a description, and how the data points are to marked,
here a circle with a diameter of 5 pixels.
*/
- my_1d_plot.plot(my_data, "1D limits").shape(round).size(5);
+ my_1d_plot.plot(my_data, "1D limits").shape(circlet).size(5);
/*`To put a value label against each data point, switch on the option:
*/
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_tick_values.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_tick_values.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_tick_values.cpp 2012-08-22 05:08:19 EDT (Wed, 22 Aug 2012)
@@ -73,7 +73,7 @@
/*`Add the one data series, `my_data` and a description,
and how the data points are to be marked, a circle with a diameter of 7 pixels.
*/
- my_1d_plot.plot(my_data, "1D Values").shape(round).size(7);
+ my_1d_plot.plot(my_data, "1D Values").shape(circlet).size(7);
/*`If the default size and color are not to your taste, set more options, like:
*/
@@ -123,7 +123,7 @@
(All the myriad settings can be displayed with `show_1d_plot_settings(my_1d_plot)`.)
*/
//show_1d_plot_settings(my_1d_plot);
-
+ using boost::svg::detail::operator<<;
cout << "my_1d_plot.size() " << my_1d_plot.size() << endl;
cout << "my_1d_plot.x_size() " << my_1d_plot.x_size() << endl;
cout << "my_1d_plot.y_size() " << my_1d_plot.y_size() << endl;
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_uncertainty.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_uncertainty.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_uncertainty.cpp 2012-08-22 05:08:19 EDT (Wed, 22 Aug 2012)
@@ -1,12 +1,13 @@
/*! \file demo_1d_uncertainty.cpp
\brief Simple plot of uncertainty of 1D data.
\details An example to demonstrate simple 1D plot using two vectors,
- including showing values with uncertainty information as 'plus minus' and degrees of freedom estimates.
+ including showing values with uncertainty information as
+ 'plus minus' and degrees of freedom estimates.
\author Paul A. Bristow
\date Mar 2009
*/
-// Copyright Paul A Bristow 2009
+// Copyright Paul A Bristow 2009, 2012
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0.
@@ -23,18 +24,17 @@
/*`First we need a few includes to use Boost.Plot:
*/
-#include <boost/svg_plot/uncertain.hpp>
- // using boost::svg::unc; // Holds value and uncertainty formation.
+#include <boost/quan/unc.hpp>
+//#include <boost/quan/unc_init.hpp>
+ // using boost::quan::unc; // Holds value and uncertainty formation.
#include <boost/svg_plot/detail/functors.hpp>
// using boost::svg::detail::unc_1d_convert;
#include <boost/svg_plot/svg_1d_plot.hpp>
using namespace boost::svg;
-
#include <boost/svg_plot/show_1d_settings.hpp>
void boost::svg::show_1d_plot_settings(svg_1d_plot&);
-
#include <iostream>
using std::cout;
using std::endl;
@@ -54,26 +54,34 @@
and values are inserted using push_back. Since this is a 1-D plot
the order of data values is not important.
*/
- vector<unc> A_times;
- A_times.push_back(unc(3.1, 0.02F, 8));
- A_times.push_back(unc(4.2, 0.01F, 14));
+ setUncDefaults(std::cout);
+ typedef unc<false> uncun; // Uncertain Uncorrelated (the normal case).
+ float NaN = std::numeric_limits<float>::quiet_NaN();
+ vector<uncun> A_times;
+ A_times.push_back(unc<false>(3.1, 0.02F, 8));
+ A_times.push_back(uncun(4.2, 0.01F, 14, 0U));
- vector<unc> B_times;
- B_times.push_back(unc(2.1, 0.001F, 30, 0xFF)); // Value, uncertainty, degrees of freedom and type known.
+ short unsigned int t = UNC_KNOWN | UNC_EXPLICIT| DEG_FREE_EXACT | DEG_FREE_KNOWN;
+
+ vector<unc<false> > B_times;
+ B_times.push_back(uncun(2.1, 0.001F, 30, t)); // Value, uncertainty, degrees of freedom and type known.
// (But use of type is not yet implemented.)
- B_times.push_back(unc(5.1, 0.025F, 20)); // Value, uncertainty, and degrees of freedom known - the usual case.
- B_times.push_back(unc(7.8, 0.0025F)); // Value and uncertainty known, but not degrees of freedom.
- B_times.push_back(unc(3.4, 0.03F)); // Value and uncertainty known, but not degrees of freedom.
- B_times.push_back(unc(6.9)); // Only value known - no information available about uncertainty.
-
- vector<unc> C_times;
- C_times.push_back(unc(2.6, 0.1F, 5));
- C_times.push_back(unc(5.4, 0.2F, 11));
+ B_times.push_back(unc<>(5.1, 0.025F, 20, 0U)); // Value, uncertainty, and degrees of freedom known - the usual case.
+ B_times.push_back(uncun(7.8, 0.0025F, 1, 0U)); // Value and uncertainty known, but not degrees of freedom.
+ B_times.push_back(uncun(3.4, 0.03F, 1, 0U)); // Value and uncertainty known, but not degrees of freedom.
+ //B_times.push_back(uncun(6.9, 0.0F, 0, 0U)); // Only value known - no information available about uncertainty but treated as exact.
+ B_times.push_back(uncun(5.9, NaN, 1, 0U)); // Only value known - uncertainty explicit NaN meaning no information available about uncertainty.
+ // So in both cases show all possibly significant digits (usually 15).
+ // This is ugly on a graph, so best to be explicit about uncertainty.
+
+ vector<unc<false> > C_times;
+ C_times.push_back(uncun(2.6, 0.1F, 5, 0U));
+ C_times.push_back(uncun(5.4, 0.2F, 11, 0U));
/*`Echo the values input: */
- copy(A_times.begin(), A_times.end(), ostream_iterator<unc>(std::cout, " "));
+ copy(A_times.begin(), A_times.end(), ostream_iterator<uncun>(std::cout, " "));
cout << endl;
- copy(B_times.begin(), B_times.end(), ostream_iterator<unc>(std::cout, " "));
+ copy(B_times.begin(), B_times.end(), ostream_iterator<uncun>(std::cout, " "));
cout << endl;
/*`The constructor initializes a new 1D plot, called `my_plot`,
and also sets all the very many defaults for axes, width, colors, etc.
@@ -86,8 +94,9 @@
* `x_range(-1, 11)` sets the axis limits from -1 to +11 (instead of the default -10 to +10).
* `background_border_color(blue)` sets just one of the very many other options.
*/
- my_plot.autoscale_check_limits(false); // default is true.
- my_plot.autoscale_plusminus(3); // default is 3.
+ my_plot.autoscale_check_limits(false); // Default is true.
+ my_plot.autoscale_plusminus(2); // default is 3.
+ my_plot.confidence(0.01); // Change alpha from default 0.05 == 95% to 0.01 == 99%.
my_plot
.plot_window_on(true)
@@ -100,10 +109,13 @@
.x_range(0, 10)
.x_label("times (sec)")
.x_values_on(true)
- .x_values_precision(2)
+// .x_values_precision(0) // Automatic number of digits of precision.
+ .x_values_precision(2) // User chosen precision.
.x_values_rotation(slopeup)
- .x_plusminus_color(blue)
.x_plusminus_on(true)
+ .x_plusminus_color(blue)
+ .x_addlimits_on(true)
+ .x_addlimits_color(purple)
.x_df_on(true)
.x_df_color(green)
.x_autoscale(B_times) // Note that this might not be right scaling for A_times and/or C_times.
@@ -120,8 +132,7 @@
All the data points are also labelled with their value,
and uncertainty and degrees of freedom if known.
*/
-
- my_plot.plot(A_times, "A").shape(round).size(10).stroke_color(red).fill_color(green);
+ my_plot.plot(A_times, "A").shape(circlet).size(10).stroke_color(red).fill_color(green);
my_plot.plot(B_times, "B").shape(vertical_line).stroke_color(blue);
my_plot.plot(C_times, "C").shape(unc_ellipse).fill_color(lightyellow).stroke_color(magenta);
/*`
@@ -134,9 +145,9 @@
my_plot.write(svg_file);
cout <<"Plot written to file " << svg_file << endl;
+ show_1d_plot_settings(my_plot);
//] [/demo_1d_uncertainty_2]
- // show_1d_plot_settings(my_plot);
return 0;
} // int main()
@@ -167,4 +178,5 @@
map<pair<unc, unc> > rheumatoid;
control.push_back(unc(3.456, 0.44F, 6));
+
*/
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 2012-08-22 05:08:19 EDT (Wed, 22 Aug 2012)
@@ -75,7 +75,7 @@
/*`Add the one data series, `my_data` and a description, and how the data points are to marked,
here a circle with a diameter of 5 pixels.
*/
- my_1d_plot.plot(my_data, "1D Values").shape(round).size(5);
+ my_1d_plot.plot(my_data, "1D Values").shape(circlet).size(5);
/*`To put a value label against each data point, switch on the option:
*/
@@ -134,7 +134,7 @@
(All the myriad settings can be displayed with `show_1d_plot_settings(my_1d_plot)`.)
*/
//show_1d_plot_settings(my_1d_plot);
-
+ using boost::svg::detail::operator<<;
cout << "my_1d_plot.image_size() " << my_1d_plot.size() << endl;
cout << "my_1d_plot.image x_size() " << my_1d_plot.x_size() << endl;
cout << "my_1d_plot.image y_size() " << my_1d_plot.y_size() << endl;
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_vector.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_vector.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_1d_vector.cpp 2012-08-22 05:08:19 EDT (Wed, 22 Aug 2012)
@@ -86,7 +86,7 @@
if we want them to show on the legend.
*/
- my_plot.plot(dan_times, "Dan").shape(round).size(10).stroke_color(red).fill_color(green);
+ my_plot.plot(dan_times, "Dan").shape(circlet).size(10).stroke_color(red).fill_color(green);
my_plot.plot(elaine_times, "Elaine").shape(vertical_line).stroke_color(blue);
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_autoscaling.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_autoscaling.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_autoscaling.cpp 2012-08-22 05:08:19 EDT (Wed, 22 Aug 2012)
@@ -76,7 +76,7 @@
The add the (one but could be more) data series, `my_data` and a description, and how the data points are to be marked,
here a circle with a diameter of 5 pixels, without a line joining the points (also the default).
*/
- my_2d_plot.plot(my_data, "2d Values").shape(round).size(6).line_on(false);
+ my_2d_plot.plot(my_data, "2d Values").shape(circlet).size(6).line_on(false);
/*`To use all these settings, finally write the plot to file.
*/
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_fonts.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_fonts.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_fonts.cpp 2012-08-22 05:08:19 EDT (Wed, 22 Aug 2012)
@@ -152,7 +152,7 @@
;
// Add a container of data to the plot, choosing a color.
- my_plot.plot(data1, "Function (√)").stroke_color(red).shape(round).size(3).bezier_on(true).line_color(pink);
+ my_plot.plot(data1, "Function (√)").stroke_color(red).shape(circlet).size(3).bezier_on(true).line_color(pink);
my_plot.write("./demo_2d_fonts_1.svg"); // Write 1st plot to file.
// Show some styling, for example for X ticks.
@@ -172,7 +172,7 @@
//.x_label_font_size(10)
//.y_label_font_size(10)
;
- my_plot.plot(data1, "Function (√)").stroke_color(red).shape(round).size(10).line_on(false).line_color(green);
+ my_plot.plot(data1, "Function (√)").stroke_color(red).shape(circlet).size(10).line_on(false).line_color(green);
my_plot.write("./demo_2d_fonts_1.svg"); // Write another plot to file.
}
{
@@ -183,7 +183,7 @@
.y_label("y (small X axis label font size 10)")
.x_label_font_size(10)
.y_label_font_size(10);
- my_plot.plot(data1, "Function (√)").stroke_color(red).shape(round).size(10).line_on(false).line_color(green);
+ my_plot.plot(data1, "Function (√)").stroke_color(red).shape(circlet).size(10).line_on(false).line_color(green);
my_plot.write("./demo_2d_fonts_2.svg"); // Write another plot to file.
}
{
@@ -194,7 +194,7 @@
.y_label("Y axis label 30")
.x_label_font_size(30)
.y_label_font_size(30);
- my_plot.plot(data1, "Function (√)").stroke_color(red).shape(round).size(10).line_on(false).line_color(green);
+ my_plot.plot(data1, "Function (√)").stroke_color(red).shape(circlet).size(10).line_on(false).line_color(green);
my_plot.write("./demo_2d_fonts_3.svg"); // Write another plot to file.
}
{
@@ -209,7 +209,7 @@
.y_ticks_values_font_size(20)
;
- my_plot.plot(data1, "Function (√)").stroke_color(red).shape(round).size(10).line_on(false).line_color(green);
+ my_plot.plot(data1, "Function (√)").stroke_color(red).shape(circlet).size(10).line_on(false).line_color(green);
my_plot.write("./demo_2d_fonts_4.svg"); // Write another plot to file.
}
// Now alter the rotation of the axis labels.
@@ -224,7 +224,7 @@
//.x_label_font_size(10)
//.y_label_font_size(10)
;
- my_plot.plot(data1, "Function (√)").stroke_color(red).shape(round).size(10).line_on(false).line_color(green);
+ my_plot.plot(data1, "Function (√)").stroke_color(red).shape(circlet).size(10).line_on(false).line_color(green);
my_plot.write("./demo_2d_fonts_5.svg"); // Write another plot to file.
}
{
@@ -239,7 +239,7 @@
.y_major_label_rotation(uphill)
;
- my_plot.plot(data1, "Function (√)").stroke_color(red).shape(round).size(10).line_on(false).line_color(green);
+ my_plot.plot(data1, "Function (√)").stroke_color(red).shape(circlet).size(10).line_on(false).line_color(green);
my_plot.write("./demo_2d_fonts_6.svg"); // Write another plot to file.
}
@@ -254,7 +254,7 @@
.x_major_label_rotation(uphill)
.y_major_label_rotation(uphill)
;
- my_plot.plot(data1, "Function (√)").stroke_color(red).shape(round).size(10).line_on(false).line_color(green);
+ my_plot.plot(data1, "Function (√)").stroke_color(red).shape(circlet).size(10).line_on(false).line_color(green);
my_plot.write("./demo_2d_fonts_7.svg"); // Write another plot to file.
}
@@ -271,7 +271,7 @@
.x_major_label_rotation(uphill)
.y_major_label_rotation(uphill)
;
- my_plot.plot(data1, "Function (√)").stroke_color(red).shape(round).size(10).line_on(false).line_color(green);
+ my_plot.plot(data1, "Function (√)").stroke_color(red).shape(circlet).size(10).line_on(false).line_color(green);
my_plot.write("./demo_2d_fonts_8.svg"); // Write another plot to file.
}
{
@@ -283,7 +283,7 @@
.x_major_label_rotation(downward)
.y_major_label_rotation(upward)
;
- my_plot.plot(data1, "Function (√)").stroke_color(red).shape(round).size(10).line_on(false).line_color(green);
+ my_plot.plot(data1, "Function (√)").stroke_color(red).shape(circlet).size(10).line_on(false).line_color(green);
my_plot.write("./demo_2d_fonts_9.svg"); // Write another plot to file.
}
{
@@ -298,7 +298,7 @@
.y_major_label_rotation(steepup)
;
- my_plot.plot(data1, "Function (√)").stroke_color(red).shape(round).size(10).line_on(false).line_color(green);
+ my_plot.plot(data1, "Function (√)").stroke_color(red).shape(circlet).size(10).line_on(false).line_color(green);
my_plot.write("./demo_2d_fonts_10.svg"); // Write another plot to file.
}
{
@@ -312,7 +312,7 @@
.x_major_label_rotation(downhill)
.y_major_label_rotation(uphill)
;
- my_plot.plot(data1, "Function (√)").stroke_color(red).shape(round).size(10).line_on(false).line_color(green);
+ my_plot.plot(data1, "Function (√)").stroke_color(red).shape(circlet).size(10).line_on(false).line_color(green);
my_plot.write("./demo_2d_fonts_11.svg"); // Write another plot to file.
}
{
@@ -328,7 +328,7 @@
.x_major_label_rotation(slopedownhill)
.y_major_label_rotation(slopeup)
;
- my_plot.plot(data1, "Function (√)").stroke_color(red).shape(round).size(10).line_on(false).line_color(green);
+ my_plot.plot(data1, "Function (√)").stroke_color(red).shape(circlet).size(10).line_on(false).line_color(green);
my_plot.write("./demo_2d_fonts_12.svg"); // Write another plot to file.
}
}
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_limits.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_limits.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_limits.cpp 2012-08-22 05:08:19 EDT (Wed, 22 Aug 2012)
@@ -97,7 +97,7 @@
Add the one data series, `my_data` and a description, and how the data points are to be marked,
here a circle with a diameter of 5 pixels.
*/
- svg_2d_plot_series& my_series = my_2d_plot.plot(my_data, "2D limits").shape(round).size(5);
+ svg_2d_plot_series& my_series = my_2d_plot.plot(my_data, "2D limits").shape(circlet).size(5);
/*`
We can also keep note of the plot series and use this to interrogate how many normal and how many 'at limit' values.
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 2012-08-22 05:08:19 EDT (Wed, 22 Aug 2012)
@@ -10,8 +10,10 @@
\author Jacob Voytko and Paul A. Bristow
*/
+// demo_2d_simple.cpp
+
// Copyright Jacob Voytko 2007
-// Copyright Paul A. Bristow 2007, 2008
+// Copyright Paul A. Bristow 2007, 2008, 2012
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0.
@@ -24,6 +26,8 @@
#include <boost/svg_plot/show_2d_settings.hpp>
// Only needed for showing which settings in use.
+#include <boost/quan/unc_init.hpp>
+
#include <iostream>
using std::cout;
using std::endl;
@@ -63,6 +67,7 @@
int main()
{
+
try
{
// Some containers for (sorted) sample data.
@@ -79,6 +84,7 @@
// cout << i << ' '<< data1[i] << ' ' << data2[i] << ' '<< data3[i] << endl;
}
+ setUncDefaults(std::cout);
svg_2d_plot my_plot;
// Uses most defaults, but scale settings are usually sensible.
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_tick_values.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_tick_values.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_tick_values.cpp 2012-08-22 05:08:19 EDT (Wed, 22 Aug 2012)
@@ -124,7 +124,7 @@
my_plot.x_label("x abcd1234(√)").y_label("sqrt(x) "); // Note chaining.
// Add a container of data to the plot, choosing a color.
- my_plot.plot(data1, "Function (√)").stroke_color(red).shape(round).size(3).bezier_on(true).line_color(pink);
+ my_plot.plot(data1, "Function (√)").stroke_color(red).shape(circlet).size(3).bezier_on(true).line_color(pink);
my_plot.write("./demo_2d_tick_values.svg"); // Write the plot to another file.
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_uncertainty.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_uncertainty.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_uncertainty.cpp 2012-08-22 05:08:19 EDT (Wed, 22 Aug 2012)
@@ -33,13 +33,18 @@
*/#include <boost/svg_plot/svg_2d_plot.hpp>
using namespace boost::svg;
-#include <boost/svg_plot/show_2d_settings.hpp>
-// using boost::svg::show_2d_plot_settings - Only needed for showing which settings in use.
-#include <boost/svg_plot/uncertain.hpp>
-using boost::svg::unc;
+#include <boost/svg_plot/show_2d_settings.hpp> // Only needed for showing which settings in use.
+//using boost::svg::show_2d_plot_settings;
+//void boost::svg::show_2d_plot_settings(svg_2d_plot&);
+
#include <boost/svg_plot/detail/pair.hpp>
// using boost::svg::detail::pair; operator<<
+#include <boost/quan/unc.hpp>
+//#include <boost/quan/unc_init.hpp>
+
+#include <boost/quan/meas.hpp>
+
//#include <algorithm>
//#include <functional>
@@ -56,7 +61,7 @@
#include <cmath>
using std::sqrt;
- using std::pair;
+
#include <iostream>
using std::cout;
using std::endl;
@@ -80,6 +85,18 @@
int main()
{
+ using std::pair;
+ using std::make_pair;
+
+ using boost::svg::detail::operator<<;
+
+ // Check pair for double.
+ pair<double, double> double_pair; // pair of double X and Y.
+ double_pair = make_pair(double(-2.234), double(-8.76));
+ cout << "make_pair(double(-2.234), double(-8.76)) = " << double_pair << endl;
+
+ setUncDefaults(std::cout);
+
try
{
//[demo_2d_uncertainty_2
@@ -87,32 +104,40 @@
/*`STL map is used as the container for our two data series,
and pairs of values and their uncertainty information
(approximately standard deviation and degrees of freedom)
-are inserted using push_back. Since this is a 2-D plot
+are inserted using push_back. Since this is a 2-D plot
the order of data values is important.
*/
+ using boost::svg::detail::operator<<;
- unc u1(1.23, 0.56F, 7); // For an X value.
+ // Check pair for double.
+ pair<double, double> double_pair; // double X and Y
+ double_pair = make_pair(double(-2.234), double(-8.76));
+ cout << " make_pair(double(-2.234), double(-8.76)) = " << double_pair << endl;
+
+ typedef unc<false> uncun; // Uncertain Uncorrelated (the normal case).
+
+ uncun u1(1.23, 0.56F, 7); // For an X value.
cout << "u1 = " << u1 << endl; // u1 = 1.23+-0.056 (7)
- unc u2(3.45, 0.67F, 9); // For a Y value.
- pair<unc, unc> mp1 = make_pair(u1, u2); // XY pair of values.
+ uncun u2(3.45, 0.67F, 9); // For a Y value.
+ pair<uncun, uncun > mp1 = make_pair(u1, u2); // XY pair of values.
cout << mp1 << endl; // 1.23+-0.056 (7), 2.345+-0.067 (9)
- map<unc, unc> data1; // Container for XY points.
+ map<uncun , uncun > data1; // Container for XY points.
data1.insert(mp1); // u1, u2 = 1.23+-0.056 (7), 2.345+-0.067 (9)
- data1.insert(make_pair(unc(4.1, 0.4F, 7), unc(3.1, 0.3F, 18))); //
- data1.insert(make_pair(unc(-2.234, 0.03F, 7), unc(-8.76, 0.9F, 9)));
-
+ data1.insert(make_pair(uncun(4.1, 0.4F, 7), uncun(3.1, 0.3F, 18))); //
+ data1.insert(make_pair(uncun(-2.234, 0.03F, 7), uncun(-8.76, 0.9F, 9)));
+
/*
-`Make very sure you don't forget either unc(...) like this
+`Make very sure you don't forget either uncun(...) like this
`data1.insert(make_pair((-2.234, 0.12F, 7),(-8.76, 0.56F, 9)));`
because, by the bizarre operation of the comma operator, the result will be an integer!
So you will astonished to find that the values will be the *pair of degrees of freedom, (7, 9)*
-and the other parts of unc will be undefined!
+and the other parts of uncun will be undefined!
Echo the values input:
*/
cout << data1.size() << " XY data pairs:" << endl;
- copy(data1.begin(), data1.end(), ostream_iterator<pair<unc, unc> >(cout, "\n"));
+ copy(data1.begin(), data1.end(), ostream_iterator<pair<uncun, uncun > >(cout, "\n"));
cout << endl;
svg_2d_plot my_plot;
@@ -122,7 +147,7 @@
An instrument or operator input might be known to provide only normal data.
For this example, we know this is true, so override the default autoscale_check_limits(true).
*/
- //my_plot.autoscale_check_limits(false);
+ my_plot.autoscale_check_limits(false);
/*`The default is autoscale_plusminus(3.) so that confidence ellipses
at 1, 2 and 3 (uncertainty nominally standard deviations)
are all within the plot window,
@@ -131,49 +156,63 @@
by reducing autoscale_plusminus, for example, to 1.5, down to zero.
*/
my_plot.autoscale_plusminus(1.5); // default is 3.
+ my_plot.confidence(0.01); // Change from default 0.05 to 0.01 for 99% confidence.
/*`Use data set `data` to autoscale (you can use a different data set to scale from the one you chose to plot).
*/
my_plot.xy_autoscale(data1);
+
my_plot
.x_label("times (sec)")
- .xy_values_on(true)
- // Note use of Unicode space in all string - ANSI space has no effect.
- //.x_decor("", ", ") // Keep all on one line using spearator starting with a comma.
- .x_decor("","") // Split onto two lines because X separator does not start with comma.
- .y_decor("   ", "time = ", " sec")
- // Note a few padding spaces used to get Y values to lie more nearly under X values.
- // This is only necessary when label are not horizontal.
+ .x_range(-3, +10)
+ .xy_values_on(true) // Show X and Y values next to each point.
+
+ //! \note Essential use of Unicode space in all strings - ANSI space has no effect!
+ //.x_decor("", ", ") // Keep all on one line using separator NOT starting with a newline.
+ .x_decor("","\n") // Split onto two lines because X separator does start with newline.
+ .y_decor("   ", " time =", " sec")
+ // Note: a few padding spaces are used to get Y values to lie more nearly under X values.
+ // This is only necessary when label are not horizontal.
.x_values_rotation(slopeup)
.x_values_font_size(16)
.x_plusminus_on(true)
.x_plusminus_color(cyan)
+
+ .x_addlimits_on(true)
+ .x_addlimits_color(purple)
+
.x_df_on(true)
.x_df_color(magenta)
.x_values_font_family("Times New Roman")
.y_label("distance (km)")
+ .y_range(-10., +10.)
.y_values_rotation(uphill)
.y_values_font_family("Arial") // Different from X just to show effect.
.y_plusminus_on(true)
.y_plusminus_color(red)
+
+ .y_addlimits_on(true)
+ .y_addlimits_color(darkgreen)
+
.y_df_on(true)
.y_df_color(green)
+
/*`The default uncertainty ellipse colors (that apply to both X and Y axes)
can be changed thus:
*/
.one_sd_color(lightblue)
.two_sd_color(svg_color(200, 230, 255))
- .three_sd_color(svg_color(230, 255, 255))
- ;
+ .three_sd_color(svg_color(230, 240, 255))
+ ; // my_plot
my_plot.plot(data1, "data1").shape(unc_ellipse);
my_plot.write("./demo_2d_uncertainty");
- //show_2d_plot_settings(my_plot);
+ show_2d_plot_settings(my_plot);
- //] [/demo_2d_uncertainty_2]
+ // ] [/demo_2d_uncertainty_2]
}
catch (const std::exception& e)
@@ -188,6 +227,193 @@
Output :
+ ------ Build started: Project: demo_2d_uncertainty, Configuration: Debug Win32 ------
+ unc.cpp
+ unc_print.cpp
+ unc_read.cpp
+ demo_2d_uncertainty.cpp
+ Generating Code...
+ demo_2d_uncertainty.vcxproj -> J:\Cpp\SVG\Debug\demo_2d_uncertainty.exe
+ make_pair(double(-2.234), double(-8.76)) = -2.234, -8.76
+ make_pair(double(-2.234), double(-8.76)) = -2.234, -8.76
+ u1 = 1.2
+ 1.2, 3.5
+ 3 XY data pairs:
+ -2.23, -8.8
+ 1.2, 3.5
+ 4.10, 3.100
+
+ No limits checks: x_min = -2.234, x_max = 4.1, y_min = -8.76, y_max = 3.45
+
+
+ axes_on true
+ background_border_width 2
+ background_border_color RGB(255,255,0)
+ background_color RGB(255,255,255)
+ image_border_margin() 3
+ image_border_width() 2
+ coord_precision 3
+ copyright_date
+ copyright_holder
+ description
+ document_title ""
+ x_size 500
+ image y_size 400
+ image_filename
+ legend_on false
+ legend_place 2
+ legend_top_left -1, -1, legend_bottom_right -1, -1
+ legend_background_color blank
+ legend_border_color RGB(255,255,0)
+ legend_color blank
+ legend_title ""
+ legend_title_font_size 14
+ legend_font_weight
+ legend_width 0
+ legend_lines true
+ limit points stroke color RGB(119,136,153)
+ limit points fill color RGB(250,235,215)
+ license_on false
+ license_reproduction permits
+ license_distribution permits
+ license_attribution requires
+ license_commercialuse permits
+ plot_background_color RGB(255,255,255)
+ plot_border_color RGB(119,136,153)
+ plot_border_width 2
+ plot_window_on true
+ plot_window_x 92.6, 474
+ plot_window_x_left 92.6
+ plot_window_x_right 474
+ plot_window_y 8, 341
+ plot_window_y_top 8
+ plot_window_y_bottom 341
+ title_on false
+ title ""
+ title_color blank
+ title_font_alignment 2
+ title_font_decoration
+ title_font_family Verdana
+ title_font_rotation 0
+ title_font_size 18
+ title_font_stretch
+ title_font_style
+ title_font_weight
+ x_values_on false
+ x_values_font_size 16
+ x_values_font_family Times New Roman
+ x_values_precision 3
+ x_values_ioflags 200 IOS format flags (0x200) dec.
+ y_values_precision 3
+ y_values_font_size() 3
+ y_values_ioflags 200 IOS format flags (0x200) dec.
+ y_values_color blank
+ y_values_font_family() Arial
+ y_values_font_size() 12
+ x_max 5
+ x_min -3
+ x_autoscale true
+ y_autoscale true
+ xy_autoscale true
+ x_autoscale_check_limits false
+ x_axis_on true
+ x_axis_color() RGB(0,0,0)
+ x_axis_label_color blank
+ x_values_color blank
+ x_axis_width 1
+ x_label_on true
+ x_label "times (sec)"
+ x_label_color blank
+ x_label_font_family Verdana
+ x_label_font_size 14
+ x_label_units
+ x_label_units_on false
+ x_major_labels_side left
+ x_major_label_rotation 0
+ x_major_grid_color RGB(200,220,255)
+ x_major_grid_on false
+ x_major_grid_width 1
+ x_major_interval 1
+ x_major_tick 1
+ x_major_tick_color RGB(0,0,0)
+ x_major_tick_length 5
+ x_major_tick_width 2
+ x_minor_interval 0
+ x_minor_tick_color RGB(0,0,0)
+ x_minor_tick_length 2
+ x_minor_tick_width 1
+ x_minor_grid_on false
+ x_minor_grid_color RGB(200,220,255)
+ x_minor_grid_width 0.5
+ x_range() -3, 5
+ x_num_minor_ticks 4
+ x_ticks_down_on true
+ x_ticks_up_on false
+ x_ticks_on_window_or_axis bottom
+ y_axis_position y_axis_position intersects X axis (X range includes zero)
+ x_axis_position x_axis_position intersects Y axis (Y range includes zero)
+ x_plusminus_on true
+ x_plusminus_color RGB(0,255,255)
+ x_df_on true
+ x_df_color RGB(255,0,255)
+ x_prefix
+ x_separator
+ x_suffix
+ xy_values_on true
+ y_label_on "true"
+ y_label_axis distance (km)
+ y_axis_color RGB(0,0,0)
+ y_axis_label_color blank
+ y_axis_on true
+ axes_on true
+ y_axis_value_color RGB(0,0,0)
+ y_axis_width 1
+ y_label distance (km)
+ y_label_color blank
+ y_label_font_family Verdana
+ y_label_font_size 14
+ y_label_on true
+ y_label_units
+ y_label_units_on false
+ y_label_width 0
+ y_major_grid_on false
+ y_major_grid_color RGB(200,220,255)
+ y_major_grid_width 1
+ y_major_interval 2.5
+ y_major_labels_side bottom
+ y_major_label_rotation 0
+ y_major_tick_color RGB(0,0,0)
+ y_major_tick_length 5
+ y_major_tick_width 2
+ y_minor_grid_on false
+ y_minor_grid_color RGB(200,220,255)
+ y_minor_grid_width 0.5
+ y_minor_interval 0
+ y_minor_tick_color RGB(0,0,0)
+ y_minor_tick_length 2
+ y_minor_tick_width 1
+ y_range() -10, 5
+ y_num_minor_ticks
+ y_ticks_left_on true
+ y_ticks_right_on false
+ y_ticks_on_window_or_axis left
+ y_max 5
+ y_min -10
+ y_values_on false
+ y_plusminus_on true
+ y_plusminus_color RGB(255,0,0)
+ y_df_on true
+ y_df_color RGB(0,128,0)
+ y_prefix "   "
+ y_separator "time = "
+ y_suffix " sec"
+ data lines width 2
+========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
+
+
+
+
+
*/
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_values.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_values.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_2d_values.cpp 2012-08-22 05:08:19 EDT (Wed, 22 Aug 2012)
@@ -73,7 +73,7 @@
/*`Add the one data series, `my_data` and a description, and how the data points are to be marked,
here a circle with a diameter of 5 pixels.
*/
- my_2d_plot.plot(my_data, "2d Values").shape(round).size(5).line_on(false);
+ my_2d_plot.plot(my_data, "2d Values").shape(circlet).size(5).line_on(false);
/*`To put a value label against each data point, switch on the option:
*/
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_boxplot.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_boxplot.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_boxplot.cpp 2012-08-22 05:08:19 EDT (Wed, 22 Aug 2012)
@@ -3,11 +3,10 @@
\details Contains Quickbook Markup to be included in documentation.
\author Jacob Voytko and Paul A. Bristow
- \date 11 Feb 2009
*/
// Copyright Jacob Voytko 2007
-// Copyright Paul A. Bristow 2008
+// Copyright Paul A. Bristow 2008, 2012
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0.
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_boxplot_full.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_boxplot_full.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/demo_boxplot_full.cpp 2012-08-22 05:08:19 EDT (Wed, 22 Aug 2012)
@@ -161,7 +161,7 @@
.outlier_size(10)
.extreme_outlier_color(red)
.extreme_outlier_fill(green)
- .extreme_outlier_shape(round)
+ .extreme_outlier_shape(circlet)
.extreme_outlier_size(10)
//.extreme_outlier_values_on(true) not implemented.
;
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/example/svg_colors.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/example/svg_colors.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/example/svg_colors.cpp 2012-08-22 05:08:19 EDT (Wed, 22 Aug 2012)
@@ -44,7 +44,6 @@
using std::endl;
using std::boolalpha;
-
int main()
{
svg my_svg;
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 2012-08-22 05:08:19 EDT (Wed, 22 Aug 2012)
@@ -33,7 +33,7 @@
#include <boost/svg_plot/svg_1d_plot.hpp>
using namespace boost::svg;
#include <boost/svg_plot/svg_fwd.hpp> // forward declarations.
-// Included to check its validity.
+// Included only to check its validity.
#include <iostream>
using std::cout;
@@ -41,14 +41,15 @@
#include <string>
using std::string;
- enum side
- {
- left_side = -1,
- on_axis = 0,
- right_side = +1,
- bottom_side = -1,
- top_side = +1,
- };
+
+//enum side
+//{
+// left_side = -1,
+// on_axis = 0,
+// right_side = +1,
+// bottom_side = -1,
+// top_side = +1,
+//};
BOOST_AUTO_TEST_CASE( test1 )
{
@@ -70,6 +71,10 @@
// int align, int rotate);
+ BOOST_TEST_MESSAGE("SVG 1D Test");
+
+
+ /*
text_element text;
BOOST_CHECK_EQUAL(text.x(), 0);
text.x(10);
@@ -486,6 +491,7 @@
//BOOST_CHECK(my_plot.legend_background_color() == svg_color(0, 0, 3));
//BOOST_CHECK(my_plot.background_color() == svg_color(0, 0, 2));
//BOOST_CHECK(my_plot.background_border_color() == svg_color(0, 0, 1));
+ */
} // BOOST_AUTO_TEST_CASE( test1 )
@@ -503,4 +509,38 @@
Running 1 test case...
*** No errors detected
Build Time 0:10
+
+
+ClCompile:
+ 1d_tests.cpp
+I:\boost-trunk\boost/ptr_container/detail/is_convertible.hpp(61): error C2872: 'enable_if' : ambiguous symbol
+ could be 'I:\boost-trunk\boost/utility/enable_if.hpp(36) : boost::enable_if'
+ or 'I:\boost-trunk\boost/test/tree/decorator.hpp(184) : boost::unit_test::decorator::enable_if'
+ I:\boost-trunk\boost/ptr_container/detail/is_convertible.hpp(65) : see reference to class template instantiation 'boost::ptr_container_detail::move_ptrs::enable_if_convertible<Src,Tgt,T>' being compiled
+I:\boost-trunk\boost/ptr_container/detail/is_convertible.hpp(61): error C2872: 'enable_if' : ambiguous symbol
+ could be 'I:\boost-trunk\boost/utility/enable_if.hpp(36) : boost::enable_if'
+ or 'I:\boost-trunk\boost/test/tree/decorator.hpp(184) : boost::unit_test::decorator::enable_if'
+I:\boost-trunk\boost/unordered/detail/emplace_args.hpp(402): error C2872: 'enable_if' : ambiguous symbol
+ could be 'I:\boost-trunk\boost/utility/enable_if.hpp(36) : boost::enable_if'
+ or 'I:\boost-trunk\boost/test/tree/decorator.hpp(184) : boost::unit_test::decorator::enable_if'
+I:\boost-trunk\boost/unordered/detail/emplace_args.hpp(402): error C2872: 'enable_if' : ambiguous symbol
+ could be 'I:\boost-trunk\boost/utility/enable_if.hpp(36) : boost::enable_if'
+ or 'I:\boost-trunk\boost/test/tree/decorator.hpp(184) : boost::unit_test::decorator::enable_if'
+I:\boost-trunk\boost/typeof/msvc/typeof_impl.hpp(193): error C2872: 'disable_if' : ambiguous symbol
+ could be 'I:\boost-trunk\boost/utility/enable_if.hpp(59) : boost::disable_if'
+ or 'I:\boost-trunk\boost/test/tree/decorator.hpp(197) : boost::unit_test::decorator::disable_if'
+I:\boost-trunk\boost/typeof/msvc/typeof_impl.hpp(193): error C2872: 'disable_if' : ambiguous symbol
+ could be 'I:\boost-trunk\boost/utility/enable_if.hpp(59) : boost::disable_if'
+ or 'I:\boost-trunk\boost/test/tree/decorator.hpp(197) : boost::unit_test::decorator::disable_if'
+I:\boost-trunk\boost/typeof/msvc/typeof_impl.hpp(197): error C2872: 'enable_if' : ambiguous symbol
+ could be 'I:\boost-trunk\boost/utility/enable_if.hpp(36) : boost::enable_if'
+ or 'I:\boost-trunk\boost/test/tree/decorator.hpp(184) : boost::unit_test::decorator::enable_if'
+I:\boost-trunk\boost/typeof/msvc/typeof_impl.hpp(197): error C2872: 'enable_if' : ambiguous symbol
+ could be 'I:\boost-trunk\boost/utility/enable_if.hpp(36) : boost::enable_if'
+ or 'I:\boost-trunk\boost/test/tree/decorator.hpp(184) : boost::unit_test::decorator::enable_if'
+
+Build FAILED.
+
+
+
*/
\ No newline at end of file
Modified: sandbox/SOC/2007/visualization/libs/svg_plot/test/test_svg.cpp
==============================================================================
--- sandbox/SOC/2007/visualization/libs/svg_plot/test/test_svg.cpp (original)
+++ sandbox/SOC/2007/visualization/libs/svg_plot/test/test_svg.cpp 2012-08-22 05:08:19 EDT (Wed, 22 Aug 2012)
@@ -108,8 +108,8 @@
// svg_style.hpp
// Test the point and line style structures.
- plot_point_style my_point(svg_color(black), svg_color(black), 10, round);
- BOOST_CHECK_EQUAL(my_point.shape(), round);
+ plot_point_style my_point(svg_color(black), svg_color(black), 10, circlet);
+ BOOST_CHECK_EQUAL(my_point.shape(), circlet);
BOOST_CHECK_EQUAL(my_point.stroke_color(), svg_color(black));
BOOST_CHECK_EQUAL(my_point.fill_color(), svg_color(black));
BOOST_CHECK_EQUAL(my_point.size(), 10);
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