|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r80303 - in sandbox/SOC/2007/visualization/boost/svg_plot: . detail
From: pbristow_at_[hidden]
Date: 2012-08-29 11:16:07
Author: pbristow
Date: 2012-08-29 11:16:06 EDT (Wed, 29 Aug 2012)
New Revision: 80303
URL: http://svn.boost.org/trac/boost/changeset/80303
Log:
Changes to use typename and std:: for gcc
Text files modified:
sandbox/SOC/2007/visualization/boost/svg_plot/detail/auto_axes.hpp | 4
sandbox/SOC/2007/visualization/boost/svg_plot/detail/functors.hpp | 20 +
sandbox/SOC/2007/visualization/boost/svg_plot/show_2d_settings.hpp | 387 ++++++++++++++++++++-------------------
sandbox/SOC/2007/visualization/boost/svg_plot/svg_1d_plot.hpp | 10
sandbox/SOC/2007/visualization/boost/svg_plot/svg_2d_plot.hpp | 56 ++---
5 files changed, 240 insertions(+), 237 deletions(-)
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 2012-08-29 11:16:06 EDT (Wed, 29 Aug 2012)
@@ -27,10 +27,10 @@
# pragma warning (disable: 4100) // 'check_limits' and autoscale_plusminus: unreferenced formal parameters
#endif
-#include <boost\svg_plot\detail\FP_compare.hpp> // is_small & is_close
+#include <boost/svg_plot/detail/FP_compare.hpp> // is_small & is_close
#include <boost/quan/meas.hpp> // for value_of.
-#include <boost\math\special_functions\fpclassify.hpp>
+#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;
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 2012-08-29 11:16:06 EDT (Wed, 29 Aug 2012)
@@ -121,13 +121,13 @@
//! Convert a pair of X and Y (whose types can be converted to double values) to a pair of doubles.
//! \tparam T type whose value can be converted to double.
//! \tparam U type whose value can be converted to double.
- template <class T, class U>
+ template <typename T, typename U>
std::pair<double, double> operator()(const std::pair<T, U>& a) const
{ //! Assumes that a conversion from double yields just the value component of the uncertain value.
return std::pair<double, double>((double)(a.first), (double)(a.second));
}
- template <class T>
+ template <typename T>
std::pair<double, double> operator()(T a)
{ //! Convert a pair of X and Y values to a pair of doubles.
//! \return pair of doubles.
@@ -155,10 +155,12 @@
std::pair<unc<correlated>, unc<correlated> > operator()(const std::pair<T, U>& a) const
{ //!< Convert a pair of X and Y uncertain type values to a pair of doubles.
//! \return pair of uncs.
- return std::pair<unc<correlated>, unc<correlated> >((unc<correlated>)(a.first), (unc<correlated>)(a.second));
+ return std::pair<unc<correlated>, unc<correlated> >(
+ (unc<correlated>)(a.first), (unc<correlated>)(a.second)
+ );
}
- template <class T> //!< \tparam T Any type convertible to double.
+ template <typename T> //!< \tparam T Any type convertible to double.
std::pair<unc<correlated>, unc<correlated> > operator()(T a)
{ //!< Convert a pair of X and Y uncertain type values to a pair of unc.
return std::pair<unc <correlated>, unc<correlated> >(i++, (unc<correlated>)a); //! \return pair of unc.
@@ -171,7 +173,8 @@
\brief This functor allows any 2D data convertible to type std::pair<Meas, unc> to be plotted.
*/
public:
- typedef std::pair<Meas, unc<correlated> > result_type; //!< result type is pair of uncertain values.
+ typedef std::pair<Meas, unc<correlated> > result_type;
+ //!< result type is pair of uncertain values.
Meas i; //!< Start Meas (uncun + daetime etc) value.
@@ -181,17 +184,18 @@
}
//!< \tparam T type convertible to double.
- template <class T, class U>
+ template <typename T, typename U>
std::pair<Meas, unc<correlated> > operator()(const std::pair<T, U>& a) const
{ //!< Convert a pair of X and Y uncertain type values to a pair of doubles.
//! \return pair of Meas & uncs.
return std::pair<Meas, unc<correlated> >((Meas)(a.first), (unc<correlated>)(a.second));
}
- template <class T> //!< \tparam T Any type convertible to double.
+ template <typename T> //!< \tparam T Any type convertible to double.
std::pair<Meas, unc<correlated> > operator()(T a)
{ //!< Convert a pair of X and Y uncertain type values to a pair of Meas & unc.
- return std::pair<Meas, unc<correlated> >(i++, (unc<correlated>)a); //! \return pair of Meas & unc.
+ return std::pair<Meas, unc<correlated> >(i++, (unc<correlated>)a);
+ //! \return pair of Meas & unc.
}
}; // class pair_unc_2d_convert
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 2012-08-29 11:16:06 EDT (Wed, 29 Aug 2012)
@@ -24,6 +24,10 @@
#include <iostream>
+#include <boost/quan/xiostream.hpp>
+
+//#include <boost/quan/xiostream.ipp>
+
namespace boost
{
namespace svg
@@ -32,11 +36,13 @@
// Declaration (defined below).
void show_2d_plot_settings(svg_2d_plot& plot);
+
+ /*
const char* fmtFlagWords[16] =
{ //! \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.
@@ -62,8 +68,6 @@
_Fmtzero = 0
};
*/
-}; // const char* fmtFlagWords
-
/*
Now use the version in xiostream.ipp
@@ -118,209 +122,208 @@
void show_2d_plot_settings(svg_2d_plot& plot)
{ /*! Diagnostic display of all of a 2D plot's settings.
- Outputs a long list of about 100 plot parameter settings to @c std::cout:
+ Outputs a long list of over 100 plot parameter settings to @c std::cout:
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;
- using std::dec;
- using std::boolalpha;
- using std::fixed;
-
- using boost::svg::detail::operator<<;
+ //using std::cout;
+ //using std::std::endl;
+ //using std::hex;
+ //using std::dec;
+ //using std::boolalpha;
+ //using std::fixed;
+ using boost::svg::detail::operator<<;
//std::ostream& operator<< (std::ostream& os, const std::pair<double, double>& p); //! Output pair of doubles to ostream.
- int iostate = cout.flags(); // Save to restore on exit.
- cout << dec << std::boolalpha << endl;
- cout << endl;
-
- 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;
- cout << "background_color " << plot.background_color() << endl;
- cout << "image_border_margin() " << plot.image_border_margin() << endl;
- cout << "image_border_width() " << plot.image_border_width() << endl;
- cout << "coord_precision " << plot.coord_precision() << endl;
- cout << "copyright_date " << plot.copyright_date() << endl;
- cout << "copyright_holder " << plot.copyright_holder() << endl;
- cout << "description " << plot.description() << endl;
- cout << "document_title " << '"' << plot.document_title() << '"' << endl;
- //cout << plot.draw_bezier_lines() << endl;
- cout << "x_size " << plot.x_size() << endl;
- cout << "image y_size " << plot.y_size() << endl;
- //cout << "image x & y sizes " << plot.size() << endl;
- cout << "image_filename " << plot.image_.image_filename() << endl;
- cout << "legend_on " << plot.legend_on() << endl;
+ std::ios_base::fmtflags iostate = std::cout.flags(); // Save to restore on exit.
+ std::cout << std::dec << std::boolalpha << std::endl;
+ std::cout << std::endl;
+
+ std::cout << "axes_on " << plot.axes_on() << std::endl;
+ std::cout << "background_border_width " << plot.background_border_width() << std::endl;
+ std::cout << "background_border_color " << plot.background_border_color() << std::endl;
+ std::cout << "background_color " << plot.background_color() << std::endl;
+ std::cout << "image_border_margin() " << plot.image_border_margin() << std::endl;
+ std::cout << "image_border_width() " << plot.image_border_width() << std::endl;
+ std::cout << "coord_precision " << plot.coord_precision() << std::endl;
+ std::cout << "copyright_date " << plot.copyright_date() << std::endl;
+ std::cout << "copyright_holder " << plot.copyright_holder() << std::endl;
+ std::cout << "description " << plot.description() << std::endl;
+ std::cout << "document_title " << '"' << plot.document_title() << '"' << std::endl;
+ //std::cout << plot.draw_bezier_lines() << std::endl;
+ std::cout << "x_size " << plot.x_size() << std::endl;
+ std::cout << "image y_size " << plot.y_size() << std::endl;
+ //std::cout << "image x & y sizes " << plot.size() << std::endl;
+ std::cout << "image_filename " << plot.image_.image_filename() << std::endl;
+ std::cout << "legend_on " << plot.legend_on() << std::endl;
std::pair<double, double> lt = plot.legend_top_left();
std::pair<double, double> rb = plot.legend_bottom_right();
- cout << "legend_place " << plot.legend_place() << endl;
- cout << "legend_top_left " << lt << ", legend_bottom_right " << rb << endl;
- cout << "legend_background_color " << plot.legend_background_color() << endl;
- cout << "legend_border_color " << plot.legend_border_color() << endl;
- cout << "legend_color " << plot.legend_color() << endl;
- cout << "legend_title " << '"' << plot.legend_title() << '"' << endl;
- cout << "legend_title_font_size " << plot.legend_title_font_size() << endl;
- cout << "legend_font_weight " << plot.legend_font_weight() << endl;
+ std::cout << "legend_place " << plot.legend_place() << std::endl;
+ std::cout << "legend_top_left " << lt << ", legend_bottom_right " << rb << std::endl;
+ std::cout << "legend_background_color " << plot.legend_background_color() << std::endl;
+ std::cout << "legend_border_color " << plot.legend_border_color() << std::endl;
+ std::cout << "legend_color " << plot.legend_color() << std::endl;
+ std::cout << "legend_title " << '"' << plot.legend_title() << '"' << std::endl;
+ std::cout << "legend_title_font_size " << plot.legend_title_font_size() << std::endl;
+ std::cout << "legend_font_weight " << plot.legend_font_weight() << std::endl;
// Not useful at present, so not longer implemented.
- // cout << "legend_font_width " << plot.legend_font_width() << endl;
- cout << "legend_width " << plot.legend_width() << endl;
- cout << "legend_lines " << plot.legend_lines() << endl;
- cout << "limit points stroke color " << plot.limit_color() << endl;
- cout << "limit points fill color " << plot.limit_fill_color() << endl;
- cout << "license_on " << plot.license_on() << endl;
- cout << "license_reproduction " << plot.license_reproduction() << endl;
- cout << "license_distribution " << plot.license_distribution() << endl;
- cout << "license_attribution " << plot.license_attribution() << endl;
- cout << "license_commercialuse " << plot.license_commercialuse() << endl;
- cout << "plot_background_color " << plot.plot_background_color() << endl;
- cout << "plot_border_color " << plot.plot_border_color() << endl;
- cout << "plot_border_width " << plot.plot_border_width() << endl;
- cout << "plot_window_on " << plot.plot_window_on() << endl;
- cout << "plot_window_x " << plot.plot_window_x() << endl;
- cout << "plot_window_x_left " << plot.plot_window_x_left() << endl;
- cout << "plot_window_x_right " << plot.plot_window_x_right() << endl;
- cout << "plot_window_y " << plot.plot_window_y() << endl;
- cout << "plot_window_y_top " << plot.plot_window_y_top() << endl;
- cout << "plot_window_y_bottom " << plot.plot_window_y_bottom() << endl;
- cout << "title_on " << plot.title_on() << endl;
- cout << "title \"" << plot.title() << "\""<< endl;
- cout << "title_color " << plot.title_color() << endl;
- cout << "title_font_alignment " << plot.title_font_alignment() << endl;
- cout << "title_font_decoration " << plot.title_font_decoration() << endl;
- cout << "title_font_family " << plot.title_font_family() << endl;
- cout << "title_font_rotation " << plot.title_font_rotation() << endl;
- cout << "title_font_size " << plot.title_font_size() << endl;
- cout << "title_font_stretch " << plot.title_font_stretch() << endl;
- cout << "title_font_style " << plot.title_font_style() << endl;
- cout << "title_font_weight " << plot.title_font_weight() << endl;
- //cout << "title_font_width " << plot.title_font_width() << endl;
+ // std::cout << "legend_font_width " << plot.legend_font_width() << std::endl;
+ std::cout << "legend_width " << plot.legend_width() << std::endl;
+ std::cout << "legend_lines " << plot.legend_lines() << std::endl;
+ std::cout << "limit points stroke color " << plot.limit_color() << std::endl;
+ std::cout << "limit points fill color " << plot.limit_fill_color() << std::endl;
+ std::cout << "license_on " << plot.license_on() << std::endl;
+ std::cout << "license_reproduction " << plot.license_reproduction() << std::endl;
+ std::cout << "license_distribution " << plot.license_distribution() << std::endl;
+ std::cout << "license_attribution " << plot.license_attribution() << std::endl;
+ std::cout << "license_commercialuse " << plot.license_commercialuse() << std::endl;
+ std::cout << "plot_background_color " << plot.plot_background_color() << std::endl;
+ std::cout << "plot_border_color " << plot.plot_border_color() << std::endl;
+ std::cout << "plot_border_width " << plot.plot_border_width() << std::endl;
+ std::cout << "plot_window_on " << plot.plot_window_on() << std::endl;
+ std::cout << "plot_window_x " << plot.plot_window_x() << std::endl;
+ std::cout << "plot_window_x_left " << plot.plot_window_x_left() << std::endl;
+ std::cout << "plot_window_x_right " << plot.plot_window_x_right() << std::endl;
+ std::cout << "plot_window_y " << plot.plot_window_y() << std::endl;
+ std::cout << "plot_window_y_top " << plot.plot_window_y_top() << std::endl;
+ std::cout << "plot_window_y_bottom " << plot.plot_window_y_bottom() << std::endl;
+ std::cout << "title_on " << plot.title_on() << std::endl;
+ std::cout << "title \"" << plot.title() << "\""<< std::endl;
+ std::cout << "title_color " << plot.title_color() << std::endl;
+ std::cout << "title_font_alignment " << plot.title_font_alignment() << std::endl;
+ std::cout << "title_font_decoration " << plot.title_font_decoration() << std::endl;
+ std::cout << "title_font_family " << plot.title_font_family() << std::endl;
+ std::cout << "title_font_rotation " << plot.title_font_rotation() << std::endl;
+ std::cout << "title_font_size " << plot.title_font_size() << std::endl;
+ std::cout << "title_font_stretch " << plot.title_font_stretch() << std::endl;
+ std::cout << "title_font_style " << plot.title_font_style() << std::endl;
+ std::cout << "title_font_weight " << plot.title_font_weight() << std::endl;
+ //std::cout << "title_font_width " << plot.title_font_width() << std::endl;
// Not useful at present, so not longer implemented.
- cout << "x_values_on " << plot.x_values_on() << endl;
- cout << "x_values_font_size " << plot.x_values_font_size() << endl;
- cout << "x_values_font_family " << plot.x_values_font_family() << endl;
- cout << "x_values_precision " << plot.x_values_precision() << endl;
- cout << "x_values_ioflags " << hex << plot.x_values_ioflags() << dec << ' ';
- outFmtFlags(plot.x_value_ioflags(), cout, ".\n");
- cout << "y_values_precision " << plot.y_values_precision() << endl;
- cout << "y_values_font_size() " << plot.y_value_precision() << endl; // duplicate????
- cout << "y_values_ioflags " << hex << plot.y_values_ioflags() << dec << ' ';
- outFmtFlags(plot.y_values_ioflags(), cout, ".\n");
- cout << "y_values_color " << plot.y_values_color() << endl;
- cout << "y_values_font_family() " << plot.y_values_font_family() << endl;
- cout << "y_values_font_size() " << plot.y_values_font_size() << endl;
-
- cout << "x_max " << plot.x_max() << endl;
- cout << "x_min " << plot.x_min() << endl;
- cout << "x_autoscale " << plot.x_autoscale() << endl;
- cout << "y_autoscale " << plot.y_autoscale() << endl;
- cout << "xy_autoscale " << plot.xy_autoscale() << endl;
- cout << "x_autoscale_check_limits " << plot.autoscale_check_limits() << endl;
- cout << "x_axis_on " << plot.x_axis_on() << endl;
- cout << "x_axis_color() " << plot.x_axis_color() << endl;
- cout << "x_axis_label_color " << plot.x_axis_label_color() << endl;
- cout << "x_values_color " << plot.x_values_color() << endl;
- cout << "x_axis_width " << plot.x_axis_width() << endl;
- cout << "x_label_on " << plot.x_label_on() << endl;
- cout << "x_label " << '"' << plot.x_label() << '"' << endl;
- cout << "x_label_color " << plot.x_label_color() << endl;
- cout << "x_label_font_family " << plot.x_label_font_family() << endl;
- cout << "x_label_font_size " << plot.x_label_font_size() << endl;
- cout << "x_label_units " << plot.x_label_units() << endl;
- cout << "x_label_units_on " << plot.x_label_units_on() << endl;
- //cout << "x_label_width " << plot.x_label_width() << endl;
+ std::cout << "x_values_on " << plot.x_values_on() << std::endl;
+ std::cout << "x_values_font_size " << plot.x_values_font_size() << std::endl;
+ std::cout << "x_values_font_family " << plot.x_values_font_family() << std::endl;
+ std::cout << "x_values_precision " << plot.x_values_precision() << std::endl;
+ std::cout << "x_values_ioflags " << std::hex << plot.x_values_ioflags() << std::dec << ' ';
+ outFmtFlags(plot.x_value_ioflags(), std::cout, ".\n");
+ std::cout << "y_values_precision " << plot.y_values_precision() << std::endl;
+ std::cout << "y_values_font_size() " << plot.y_value_precision() << std::endl; // duplicate????
+ std::cout << "y_values_ioflags " << std::hex << plot.y_values_ioflags() << std::dec << ' ';
+ outFmtFlags(plot.y_values_ioflags(), std::cout, ".\n");
+ std::cout << "y_values_color " << plot.y_values_color() << std::endl;
+ std::cout << "y_values_font_family() " << plot.y_values_font_family() << std::endl;
+ std::cout << "y_values_font_size() " << plot.y_values_font_size() << std::endl;
+
+ std::cout << "x_max " << plot.x_max() << std::endl;
+ std::cout << "x_min " << plot.x_min() << std::endl;
+ std::cout << "x_autoscale " << plot.x_autoscale() << std::endl;
+ std::cout << "y_autoscale " << plot.y_autoscale() << std::endl;
+ std::cout << "xy_autoscale " << plot.xy_autoscale() << std::endl;
+ std::cout << "x_autoscale_check_limits " << plot.autoscale_check_limits() << std::endl;
+ std::cout << "x_axis_on " << plot.x_axis_on() << std::endl;
+ std::cout << "x_axis_color() " << plot.x_axis_color() << std::endl;
+ std::cout << "x_axis_label_color " << plot.x_axis_label_color() << std::endl;
+ std::cout << "x_values_color " << plot.x_values_color() << std::endl;
+ std::cout << "x_axis_width " << plot.x_axis_width() << std::endl;
+ std::cout << "x_label_on " << plot.x_label_on() << std::endl;
+ std::cout << "x_label " << '"' << plot.x_label() << '"' << std::endl;
+ std::cout << "x_label_color " << plot.x_label_color() << std::endl;
+ std::cout << "x_label_font_family " << plot.x_label_font_family() << std::endl;
+ std::cout << "x_label_font_size " << plot.x_label_font_size() << std::endl;
+ std::cout << "x_label_units " << plot.x_label_units() << std::endl;
+ std::cout << "x_label_units_on " << plot.x_label_units_on() << std::endl;
+ //std::cout << "x_label_width " << plot.x_label_width() << std::endl;
// Not useful at present, so not longer implemented.
- cout << "x_major_labels_side " << l_or_r(plot.x_major_labels_side()) << endl;
- cout << "x_major_label_rotation " << plot.x_major_label_rotation() << endl;
- cout << "x_major_grid_color " << plot.x_major_grid_color() << endl;
- cout << "x_major_grid_on " << plot.x_major_grid_on() << endl;
- cout << "x_major_grid_width " << plot.x_major_grid_width() << endl;
- cout << "x_major_interval " << plot.x_major_interval() << endl;
- cout << "x_major_tick " << plot.x_major_tick() << endl;
- cout << "x_major_tick_color " << plot.x_major_tick_color() << endl;
- cout << "x_major_tick_length " << plot.x_major_tick_length() << endl;
- cout << "x_major_tick_width " << plot.x_major_tick_width() << endl;
- cout << "x_minor_interval " << plot.x_minor_interval() << endl;
- cout << "x_minor_tick_color " << plot.x_minor_tick_color() << endl;
- cout << "x_minor_tick_length " << plot.x_minor_tick_length() << endl;
- cout << "x_minor_tick_width " << plot.x_minor_tick_width() << endl;
- cout << "x_minor_grid_on " << plot.x_minor_grid_on() << endl;
- cout << "x_minor_grid_color " << plot.x_minor_grid_color()<< endl;
- cout << "x_minor_grid_width " << plot.x_minor_grid_width() << endl;
- cout << "x_range() " << plot.x_range() << endl;
- cout << "x_num_minor_ticks " << plot.x_num_minor_ticks() << endl;
- cout << "x_ticks_down_on " << plot.x_ticks_down_on() << endl;
- cout << "x_ticks_up_on " << plot.x_ticks_up_on() << endl;
- cout << "x_ticks_on_window_or_axis " << t_or_b(plot.x_ticks_on_window_or_axis()) << endl;
- cout << "y_axis_position " << plot.y_axis_position() << endl;
- cout << "x_axis_position " << plot.x_axis_position() << endl;
- cout << "x_plusminus_on " << plot.x_plusminus_on() << endl;
- cout << "x_plusminus_color " << plot.x_plusminus_color() << endl;
- cout << "x_df_on " << plot.x_df_on() << endl;
- cout << "x_df_color " << plot.x_df_color() << endl;
- cout << "x_prefix " << plot.x_prefix() << endl;
- cout << "x_separator " << plot.x_separator() << endl;
- cout << "x_suffix " << plot.x_suffix() << endl;
- cout << "xy_values_on " << plot.xy_values_on() << endl;
- cout << "y_label_on " << '"' << plot.y_label_on() << '"' << endl;
- cout << "y_label_axis " << plot.y_label_axis() << endl;
- cout << "y_axis_color " << plot.y_axis_color() << endl;
- cout << "y_axis_label_color " << plot.y_axis_label_color() << endl;
- cout << "y_axis_on " << plot.y_axis_on() << endl;
- cout << "axes_on " << plot.axes_on() << endl; // Both x and y axes on
- cout << "y_axis_value_color " << plot.y_axis_value_color() << endl;
- cout << "y_axis_width " << plot.y_axis_width() << endl;
- cout << "y_label " << plot.y_label() << endl;
- cout << "y_label_color " << plot.y_label_color() << endl;//
- cout << "y_label_font_family " << plot.y_label_font_family() << endl;
- cout << "y_label_font_size " << plot.y_label_font_size() << endl;
- cout << "y_label_on " << plot.y_label_on() << endl;
- cout << "y_label_units " << plot.y_label_units() << endl;
- cout << "y_label_units_on " << plot.y_label_units_on() << endl;
- cout << "y_label_width " << plot.y_label_width() << endl;
- cout << "y_major_grid_on " << plot.y_major_grid_on() << endl;
- cout << "y_major_grid_color " << plot.y_major_grid_color() << endl;
- cout << "y_major_grid_width " << plot.y_major_grid_width() << endl;
- cout << "y_major_interval " << plot.y_major_interval() << endl;
- cout << "y_major_labels_side " << t_or_b(plot.y_major_labels_side()) << endl;
- cout << "y_major_label_rotation " << plot.y_major_label_rotation() << endl;
- cout << "y_major_tick_color " << plot.y_major_tick_color() << endl;
- cout << "y_major_tick_length " << plot.y_major_tick_length() << endl;
- cout << "y_major_tick_width " << plot.y_major_tick_width() << endl;
- cout << "y_minor_grid_on " << plot.y_minor_grid_on() << endl;
- cout << "y_minor_grid_color " << plot.y_minor_grid_color() << endl;
- cout << "y_minor_grid_width " << plot.y_minor_grid_width() << endl;
- cout << "y_minor_interval " << plot.y_minor_interval() << endl;
- //cout << "y_minor_labels_on " << plot.y_minor_labels_on() << endl; // Not implemented yet.
- cout << "y_minor_tick_color " << plot.y_minor_tick_color() << endl;
- cout << "y_minor_tick_length " << plot.y_minor_tick_length() << endl;
- cout << "y_minor_tick_width " << plot.y_minor_tick_width() << endl;
- cout << "y_range() " << plot.y_range() << endl;
- cout << "y_num_minor_ticks " << endl;
- cout << "y_ticks_left_on " << plot.y_ticks_left_on() << endl;
- cout << "y_ticks_right_on " << plot.y_ticks_right_on() << endl;
- cout << "y_ticks_on_window_or_axis " << l_or_r(plot.y_ticks_on_window_or_axis()) << endl;
- cout << "y_max " << plot.y_max() << endl;
- cout << "y_min " << plot.y_min() << endl;
- cout << "y_values_on " << plot.y_values_on() << endl;
- cout << "y_plusminus_on " << plot.y_plusminus_on() << endl;
- cout << "y_plusminus_color " << plot.y_plusminus_color() << endl;
- cout << "x_addlimits_on " << plot.x_addlimits_on() << endl;
- cout << "x_addlimits_color " << plot.x_addlimits_color() << endl;
-
- cout << "y_df_on " << plot.y_df_on() << endl;
- cout << "y_df_color " << plot.y_df_color() << endl;
- cout << "y_prefix \"" << plot.y_prefix() << '"' << endl;
- cout << "y_separator \"" << plot.y_separator() << '"' << endl;
- cout << "y_suffix \"" << plot.y_suffix() << '"' << endl;
- cout << "confidence alpha " << plot.confidence() << endl;
+ std::cout << "x_major_labels_side " << l_or_r(plot.x_major_labels_side()) << std::endl;
+ std::cout << "x_major_label_rotation " << plot.x_major_label_rotation() << std::endl;
+ std::cout << "x_major_grid_color " << plot.x_major_grid_color() << std::endl;
+ std::cout << "x_major_grid_on " << plot.x_major_grid_on() << std::endl;
+ std::cout << "x_major_grid_width " << plot.x_major_grid_width() << std::endl;
+ std::cout << "x_major_interval " << plot.x_major_interval() << std::endl;
+ std::cout << "x_major_tick " << plot.x_major_tick() << std::endl;
+ std::cout << "x_major_tick_color " << plot.x_major_tick_color() << std::endl;
+ std::cout << "x_major_tick_length " << plot.x_major_tick_length() << std::endl;
+ std::cout << "x_major_tick_width " << plot.x_major_tick_width() << std::endl;
+ std::cout << "x_minor_interval " << plot.x_minor_interval() << std::endl;
+ std::cout << "x_minor_tick_color " << plot.x_minor_tick_color() << std::endl;
+ std::cout << "x_minor_tick_length " << plot.x_minor_tick_length() << std::endl;
+ std::cout << "x_minor_tick_width " << plot.x_minor_tick_width() << std::endl;
+ std::cout << "x_minor_grid_on " << plot.x_minor_grid_on() << std::endl;
+ std::cout << "x_minor_grid_color " << plot.x_minor_grid_color()<< std::endl;
+ std::cout << "x_minor_grid_width " << plot.x_minor_grid_width() << std::endl;
+ std::cout << "x_range() " << plot.x_range() << std::endl;
+ std::cout << "x_num_minor_ticks " << plot.x_num_minor_ticks() << std::endl;
+ std::cout << "x_ticks_down_on " << plot.x_ticks_down_on() << std::endl;
+ std::cout << "x_ticks_up_on " << plot.x_ticks_up_on() << std::endl;
+ std::cout << "x_ticks_on_window_or_axis " << t_or_b(plot.x_ticks_on_window_or_axis()) << std::endl;
+ std::cout << "y_axis_position " << plot.y_axis_position() << std::endl;
+ std::cout << "x_axis_position " << plot.x_axis_position() << std::endl;
+ std::cout << "x_plusminus_on " << plot.x_plusminus_on() << std::endl;
+ std::cout << "x_plusminus_color " << plot.x_plusminus_color() << std::endl;
+ std::cout << "x_df_on " << plot.x_df_on() << std::endl;
+ std::cout << "x_df_color " << plot.x_df_color() << std::endl;
+ std::cout << "x_prefix " << plot.x_prefix() << std::endl;
+ std::cout << "x_separator " << plot.x_separator() << std::endl;
+ std::cout << "x_suffix " << plot.x_suffix() << std::endl;
+ std::cout << "xy_values_on " << plot.xy_values_on() << std::endl;
+ std::cout << "y_label_on " << '"' << plot.y_label_on() << '"' << std::endl;
+ std::cout << "y_label_axis " << plot.y_label_axis() << std::endl;
+ std::cout << "y_axis_color " << plot.y_axis_color() << std::endl;
+ std::cout << "y_axis_label_color " << plot.y_axis_label_color() << std::endl;
+ std::cout << "y_axis_on " << plot.y_axis_on() << std::endl;
+ std::cout << "axes_on " << plot.axes_on() << std::endl; // Both x and y axes on
+ std::cout << "y_axis_value_color " << plot.y_axis_value_color() << std::endl;
+ std::cout << "y_axis_width " << plot.y_axis_width() << std::endl;
+ std::cout << "y_label " << plot.y_label() << std::endl;
+ std::cout << "y_label_color " << plot.y_label_color() << std::endl;//
+ std::cout << "y_label_font_family " << plot.y_label_font_family() << std::endl;
+ std::cout << "y_label_font_size " << plot.y_label_font_size() << std::endl;
+ std::cout << "y_label_on " << plot.y_label_on() << std::endl;
+ std::cout << "y_label_units " << plot.y_label_units() << std::endl;
+ std::cout << "y_label_units_on " << plot.y_label_units_on() << std::endl;
+ std::cout << "y_label_width " << plot.y_label_width() << std::endl;
+ std::cout << "y_major_grid_on " << plot.y_major_grid_on() << std::endl;
+ std::cout << "y_major_grid_color " << plot.y_major_grid_color() << std::endl;
+ std::cout << "y_major_grid_width " << plot.y_major_grid_width() << std::endl;
+ std::cout << "y_major_interval " << plot.y_major_interval() << std::endl;
+ std::cout << "y_major_labels_side " << t_or_b(plot.y_major_labels_side()) << std::endl;
+ std::cout << "y_major_label_rotation " << plot.y_major_label_rotation() << std::endl;
+ std::cout << "y_major_tick_color " << plot.y_major_tick_color() << std::endl;
+ std::cout << "y_major_tick_length " << plot.y_major_tick_length() << std::endl;
+ std::cout << "y_major_tick_width " << plot.y_major_tick_width() << std::endl;
+ std::cout << "y_minor_grid_on " << plot.y_minor_grid_on() << std::endl;
+ std::cout << "y_minor_grid_color " << plot.y_minor_grid_color() << std::endl;
+ std::cout << "y_minor_grid_width " << plot.y_minor_grid_width() << std::endl;
+ std::cout << "y_minor_interval " << plot.y_minor_interval() << std::endl;
+ //std::cout << "y_minor_labels_on " << plot.y_minor_labels_on() << std::endl; // Not implemented yet.
+ std::cout << "y_minor_tick_color " << plot.y_minor_tick_color() << std::endl;
+ std::cout << "y_minor_tick_length " << plot.y_minor_tick_length() << std::endl;
+ std::cout << "y_minor_tick_width " << plot.y_minor_tick_width() << std::endl;
+ std::cout << "y_range() " << plot.y_range() << std::endl;
+ std::cout << "y_num_minor_ticks " << std::endl;
+ std::cout << "y_ticks_left_on " << plot.y_ticks_left_on() << std::endl;
+ std::cout << "y_ticks_right_on " << plot.y_ticks_right_on() << std::endl;
+ std::cout << "y_ticks_on_window_or_axis " << l_or_r(plot.y_ticks_on_window_or_axis()) << std::endl;
+ std::cout << "y_max " << plot.y_max() << std::endl;
+ std::cout << "y_min " << plot.y_min() << std::endl;
+ std::cout << "y_values_on " << plot.y_values_on() << std::endl;
+ std::cout << "y_plusminus_on " << plot.y_plusminus_on() << std::endl;
+ std::cout << "y_plusminus_color " << plot.y_plusminus_color() << std::endl;
+ std::cout << "x_addlimits_on " << plot.x_addlimits_on() << std::endl;
+ std::cout << "x_addlimits_color " << plot.x_addlimits_color() << std::endl;
+
+ std::cout << "y_df_on " << plot.y_df_on() << std::endl;
+ std::cout << "y_df_color " << plot.y_df_color() << std::endl;
+ std::cout << "y_prefix \"" << plot.y_prefix() << '"' << std::endl;
+ std::cout << "y_separator \"" << plot.y_separator() << '"' << std::endl;
+ std::cout << "y_suffix \"" << plot.y_suffix() << '"' << std::endl;
+ std::cout << "confidence alpha " << plot.confidence() << std::endl;
- cout << "data lines width " << plot.data_lines_width() << endl;
+ std::cout << "data lines width " << plot.data_lines_width() << std::endl;
- cout.flags(iostate); // Restore saved iostate.
+ std::cout.flags(iostate); // Restore saved iostate.
} // void show_plot_settings(svg_2d_plot& plot)
} // svg
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 2012-08-29 11:16:06 EDT (Wed, 29 Aug 2012)
@@ -281,14 +281,14 @@
svg_1d_plot& write(std::ostream& s_out);
// Declarations of several versions of function plot to add data series (with defaults).
- template <class T>
+ template <typename T>
svg_1d_plot_series& plot(const T& container, const std::string& title = "");
- template <class T>
+ template <typename T>
svg_1d_plot_series& plot(const T& begin, const T& end, const std::string& title = "");
- template <class T, class U>
- svg_1d_plot_series& plot(const T& begin, const T& end, const std::string& title = "", U functor = double_1d_convert);
- template <class T, class U>
+ template <typename T, typename U>
svg_1d_plot_series& plot(const T& container, const std::string& title = "", U functor = double_1d_convert);
+ template <typename T, typename U>
+ svg_1d_plot_series& plot(const T& begin, const T& end, const std::string& title = "", U functor = double_1d_convert);
}; // class svg_1d_plot
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 2012-08-29 11:16:06 EDT (Wed, 29 Aug 2012)
@@ -29,8 +29,8 @@
// using boost::make_transform_iterator;
#include <boost/quan/unc.hpp>
-#include <boost/quan/unc_init.hpp>
// using boost.svg::unc;
+#include <boost/quan/meas.hpp>
#include <boost/svg_plot/svg.hpp>
#include <boost/svg_plot/svg_style.hpp>
@@ -42,10 +42,6 @@
#include <boost/svg_plot/detail/auto_axes.hpp>
using boost::svg::detail::limit_NaN;
-#include <boost/quan/meas.hpp>
-
-#include <boost/svg_plot/svg.hpp>
-
#include <map> // for map & multimap
#include <string>
#include <sstream>
@@ -54,8 +50,8 @@
#include <iterator>
#include <exception>
#include <iostream> // for debug.
-using std::cout;
-using std::endl;
+//using std::cout;
+//using std::endl;
namespace boost
{
@@ -93,7 +89,7 @@
histogram_style histogram_style_; //!< Style of histogram.
//! Constructor for a data series to plot.
- template <class T> //! \tparam T an STL container: for example: multimap.
+ template <typename T> //! \tparam T an STL container: for example: multimap.
svg_2d_plot_series(
T begin, //!< starting iterator into container of data series begin() to start at the beginning.
T end, //!< ending iterator into container of data series, end() to finish with the last item.
@@ -138,7 +134,7 @@
// svg_2d_plot_series constructor.
- template <class T> // \tparam T an STL container: for example: multimap.
+ template <typename T> // \tparam T an STL container: for example: multimap.
svg_2d_plot_series::svg_2d_plot_series(
T begin, //!< \param begin of data series.
T end, //!< \param end of data series.
@@ -722,13 +718,13 @@
x_axis_label_style_ = x_label_info_.textstyle();
if (x_label_info_.textstyle() != x_axis_label_style_ )
{
- cout << "x_label_info_.textstyle() != x_axis_label_style_" << endl;
+ std::cout << "x_label_info_.textstyle() != x_axis_label_style_" << std::endl;
}
y_axis_label_style_ = y_label_info_.textstyle();
if (y_label_info_.textstyle() != y_axis_label_style_ )
{
- cout << "y_label_info_.textstyle() != y_axis_label_style_!" << endl;
+ std::cout << "y_label_info_.textstyle() != y_axis_label_style_!" << std::endl;
}
// Assume that X-axis labels are always at bottom.
@@ -736,8 +732,8 @@
{ // Leave space at bottom for X-axis label.
if (x_label_info_.textstyle().font_size() != x_axis_label_style_.font_size())
{ // Temporary check.
- cout << "x_label_info_.textstyle().font_size() "<< x_label_info_.textstyle().font_size() << endl;
- cout << "x_axis_label_style_.font_size() " << x_axis_label_style_.font_size() << endl;
+ std::cout << "x_label_info_.textstyle().font_size() "<< x_label_info_.textstyle().font_size() << std::endl;
+ std::cout << "x_axis_label_style_.font_size() " << x_axis_label_style_.font_size() << std::endl;
}
plot_bottom_ -= x_axis_label_style_.font_size() * text_margin_;
@@ -748,8 +744,8 @@
{ // Leave space at left for Y-axis label.
if (y_label_info_.textstyle().font_size() != y_axis_label_style_.font_size())
{ // Temporary check.
- cout << "y_label_info_.textstyle().font_size() "<< y_label_info_.textstyle().font_size() << endl;
- cout << "y_axis_label_style_.font_size() " << y_axis_label_style_.font_size() << endl;
+ std::cout << "y_label_info_.textstyle().font_size() "<< y_label_info_.textstyle().font_size() << std::endl;
+ std::cout << "y_axis_label_style_.font_size() " << y_axis_label_style_.font_size() << std::endl;
}
plot_left_ += y_axis_label_style_.font_size() * text_margin_;
}
@@ -1232,7 +1228,7 @@
}
else
{
- cout << " Rotation of Y label rotation" << y_ticks_.label_rotation_ << "not yet implemented" << endl;
+ std::cout << " Rotation of Y label rotation" << y_ticks_.label_rotation_ << "not yet implemented" << std::endl;
}
}
else if (y_ticks_.major_value_labels_side_ > 0)
@@ -2226,11 +2222,11 @@
const std::string y_separator();
svg_2d_plot& y_autoscale(double first, double second);
svg_2d_plot& y_autoscale(std::pair<double, double> p);
- template <class T> // T an STL container: array, vector ...
+ template <typename T> // T an STL container: array, vector ...
svg_2d_plot& y_autoscale(const T& begin, const T& end); // Data series using iterators to
- template <class T> // T an STL container: array, vector ...
+ template <typename T> // T an STL container: array, vector ...
svg_2d_plot& y_autoscale(const T& container); // Whole data series.
- template <class T> // T a 2D STL container: array, vector ...
+ template <typename T> // T a 2D STL container: array, vector ...
svg_2d_plot& xy_autoscale(const T& container); // Whole data series,
bool xy_autoscale();
double y_major_tick_length();
@@ -2298,13 +2294,13 @@
std::ios_base::fmtflags y_values_ioflags();
// Versions of plot functions to add data series from a container, all or part.
- template <class T>
+ template <typename T>
svg_2d_plot_series& plot(const T& container, const std::string& title = "");
- template <class T, class U>
+ template <typename T, typename U>
svg_2d_plot_series& plot(const T& container, const std::string& title = "", U functor = pair_double_2d_convert);
- template <class T>
+ template <typename T>
svg_2d_plot_series& plot(const T& begin, const T& end, const std::string& title = "");
- template <class T, class U>
+ template <typename T, typename U>
svg_2d_plot_series& plot(const T& begin, const T& end, const std::string& title = "", U functor = pair_double_2d_convert);
}; // class svg_2d_plot : public detail::axis_plot_frame<svg_2d_plot>
@@ -2765,7 +2761,7 @@
return *this; //! \return reference to svg_2d_plot to make chainable.
} // autoscale(pair<double, double> p)
- template <class T> //! \tparam T an STL container: array, vector ...
+ template <typename T> //! \tparam T an STL container: array, vector ...
svg_2d_plot& svg_2d_plot::y_autoscale(const T& begin, const T& end)
{ //! Data series using iterator's range to use to calculate autoscaled values.
scale_axis(begin, end,
@@ -2776,7 +2772,7 @@
return *this; //! \return reference to svg_2d_plot to make chainable.
}
- template <class T> // T an STL container: array, vector ...
+ template <typename T> // T an STL container: array, vector ...
svg_2d_plot& svg_2d_plot::y_autoscale(const T& container)
{ //! Whole data series to use to calculate autoscaled values.
scale_axis(container.begin(), container.end(), // All the container.
@@ -2787,7 +2783,7 @@
return *this;
}
- template <class T> // T a 2D STL container: array, vector ...
+ template <typename T> // T a 2D STL container: array, vector ...
svg_2d_plot& svg_2d_plot::xy_autoscale(const T& container)
{ //! Whole data series to use to calculate autoscaled values for \b both X and Y axes.
scale_axis(container, // All the container.
@@ -3216,7 +3212,7 @@
return *this; //! \return reference to svg_2d_plot to make chainable.
} // write(file)
- template <class T> //! \tparam T Type of data in series (must be convertible to Meas).
+ template <typename T> //! \tparam T Type of data in series (must be convertible to Meas).
svg_2d_plot_series& svg_2d_plot::plot(const T& container, const std::string& title)
{ /*! Add a container of a data series to the plot.
This version assumes that \b ALL the data values in the container are to be plotted.
@@ -3234,7 +3230,7 @@
return serieses_[serieses_.size()-1]; //! \return Reference to data series just added to make chainable.
}
- template <class T, class U>
+ template <typename T, typename U>
svg_2d_plot_series& svg_2d_plot::plot(const T& container, const std::string& title /* = "" */, U functor /* = pair_double_2d_convert*/)
{ /*! This version permits a custom functor (rather than default conversion to double).\n
Note that this version assumes that \b ALL the data values in the container is used.
@@ -3248,7 +3244,7 @@
return serieses_[series_.size()-1]; //! \return Reference to data series just added to make chainable.
}
- template <class T>
+ template <typename T>
svg_2d_plot_series& svg_2d_plot::plot(const T& begin, const T& end, const std::string& title)
{ /*! Add a data series to the plot (by default, converting automatically to unc doubles).\n
This version permits part of the container to be used, a partial range, using iterators begin to end.\n
@@ -3269,7 +3265,7 @@
return serieses_[series_.size() - 1]; //! \return Reference to data series just added to make chainable.
} // plot(const T& begin, const T& end, const std::string& title = "")
- template <class T, class U>
+ template <typename T, typename U>
svg_2d_plot_series& svg_2d_plot::plot(const T& begin, const T& end, const std::string& title, U functor)
{ /* Add (part of) a container of a data series to the plot.
This version permits part of the container to be used, a partial range, using iterators begin to end.\n
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