On 17 July 2012 02:20, Aaron Meurer <[email protected]> wrote:
> I can attest from experience that the API of plot as it is now is
> already confusing.  I had a hard time in particular in figuring out
> the difference between plotting several equations and plotting a x vs.
> y expression.

This argument mostly convinces me. However, before I drop it, are you
aware that after you complained about this a few months ago I added
the exact same API that you proposed?

> Either that, or we don't add any functionality to plot().  And the
> situation will be that plot() can only plot 2d and 3d, because those
> are what happen to be implemented right now.  Everything else will
> just be in separate functions, meaning that we will have *both* plot()
> and several functions.

Actually, there is better distinction than "because those are what
happen to be implemented right now". It plots "n-dimensional
expressions over m-dimensional parameter space". If what you want to
plot does not fall into the category "function to be sampled" it is
not in `plot()`. This is not necessary the way to do it, however I
wanted to state how it is at the moment.

> I was already discussing with Bharath some changes that need to be
> made in the class structure.  For example, right now, plotting a list
> of expressions is handled by plot().  But really this should be
> factored out in some base class, so that any plotting function can
> just use it naturally.  This will later be extended to things like
> plotting different expressions with different colors.

I don't see how this makes sense in the current structure. What you
want to do can be added to the `Plot` class (and it makes sense to be
there).

At the moment there is a class representing the whole plot (`Plot`).
It contains each element to be plotted (subclass of `BaseSeries`). The
backends use methods like `get_segments` in order to get coordinates
and plot them. If we add something that represents "a few elements to
be plotted, for instances a number of lines" and call it
`MultipleSeries` what happens when we want to add two instances of
`MultipleSeries` to `Plot`. If the reason for the creation of
`MultipleSeries` was in the first place to be able to change colors
automatically, then we should merge the two instances of
MultipleSeries into one instance. However this is really ugly as it
just adds another layer between Plot and whatever single element is to
be plotted that only repeats what Plot already does.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to