Boost logo

Boost :

From: Jake Voytko (jakevoytko_at_[hidden])
Date: 2007-07-31 11:01:46


On 7/31/07, Lewis Hyatt <lhyatt_at_[hidden]> wrote:
> Jake Voytko wrote:
> > All,
> >
> > I have uploaded the newest version of SVG_Plot to the Boost Vault, and
> > am looking for feedback.
>
> Hey, I will try to look at the code when I have time, I looked at the
> docs though, and the output looks very nice! I spend a *lot* of time
> creating plots in IDL, and this looks to be quite a bit easier to use. A
> couple things about the docs, it wasn't clear to me what exactly I would
> be able to pass to the plot() function for a 2D plot. You say "any
> object that can return an iterator with begin() and end()", but I assume
> it needs to have a value type of std::pair<X,Y>, is that right? I think
> in the vast majority of use cases, people would just have two
> std::vectors and they would want to just pass them instead of having to
> make a zip_iterator or whatever. Is that what you meant when you said
> you were having problems gettind 2D plots with 1D containers? It seems
> like it would be easy enough to just make a zip iterator wrapper
> yourself to handle that, if you don't want to change the other code.

This is what I meant when I said that I was having problems. It
currently accepts maps, and I didn't change the language in the
documentation clear enough. My view on the 1D containers (vector, etc)
is that a user will have a single container, and want to plot it in
two dimensions, with the index of the data being the X coordinate, and
the value stored being the Y value, and the behavior will be changed
to reflect that. I will look into your suggestions and see how that
affects my program. I'm a little fuzzy on C++ concepts, and I didn't
see a way to say that the containers hold pair<,>s.

>
> Also, I don't like how all the parameters start with a leading
> underscore. I think it always feels like you are doing something "wrong"
> when you use an interface starting with a _...

I agree. I generated the plot options using the macros in
Boost.Parameter, which causes the underscores to appear in front of
the variable names. This will be changed.

>
> Anyway I will try out the library sometime later this week, it looks
> nice so far!
>
> Also, is SVG going to be the only output format? Postscript would be a
> nice option.

For now, SVG is the only output format. This project is currently for
Google Summer of Code, and afterwards, one of my planned tasks is to
allow users to define custom image formats. Ostensibly, it's an easy
task, but it becomes more and more complicated as you realize that SVG
is rare in that it is a tree-based format. So, your concern will be
addressed, just not in the near future.

>
> -Lewis
>

Thank you for your time,
Jake


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk