
David Abrahams wrote:
on Wed Jun 13 2007, "Phil Endecott" <spam_from_boost_dev-AT-chezphil.org> wrote:
If you feel the need to make the style more compact, it should be possible to return a reference to the plot and chain methods like this:
my_plot.set_image_size(500,200) .set_x_scale(-7,9) .draw_axis() .plot(data1, blue) .write("./image.svg");
Phil makes good points in this post.
I second that. My 0.02€: I'd favor the "common" way to do it, i.e. set-functions, rather than having your users learn a new "cute-ish" scheme with stream ops to just set some values. Additionally: how does one use boost::bind with stream operator functions? bind(operator<<(..), my_plot, bind(set_x_scale(), _1, _2)) ? Cheers, /Marcus