Discussion:
Example plots from the new code
k***@public.gmane.org
2011-11-11 14:46:56 UTC
Permalink
The proposal that I made in https://github.com/sympy/sympy/pull/673 may or
may not became part of sympy but I like it and it's already quite useful
for me.

Here are some examples. I would like to know what do you think. The 3d
stuff runs only on the latest version of matplotlib _after_ fixing a bug
(mentioned in the commit history, but those will be squashed soon).

The script to produce them is also attached (as the api is probably more
important than the visuals (the _series[index] stuff is just a workaround
until getters are written)).

Regards
Stefan
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to sympy+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
k***@public.gmane.org
2011-11-11 15:04:19 UTC
Permalink
There was one missing plot - I'm attaching it here.
Post by k***@public.gmane.org
The proposal that I made in https://github.com/sympy/sympy/pull/673 may
or may not became part of sympy but I like it and it's already quite useful
for me.
Here are some examples. I would like to know what do you think. The 3d
stuff runs only on the latest version of matplotlib _after_ fixing a bug
(mentioned in the commit history, but those will be squashed soon).
The script to produce them is also attached (as the api is probably more
important than the visuals (the _series[index] stuff is just a workaround
until getters are written)).
Regards
Stefan
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to sympy+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Aaron Meurer
2011-11-11 20:39:55 UTC
Permalink
Hi.

This looks great. For others, to run the examples, download the
examples script and put in the sympy directory. Then, checkout
Krastanov's branch (from the pull request). Then, run IPython, and
type %run examples.py. And then type p0.show(), p1.show(), etc. (up
to p4).

And if you just want to test the plotting of your own functions in
isympy, you have to run "from sympy.plotting.newplot import *", or
else it will use the old plotting. The syntax is

In [8]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi, pi), '3d')

In [9]: p.show()

(if you don't add '3d' in this case, it will default to a contour
plot, which btw is maybe not the best default)

Aaron Meurer
Post by k***@public.gmane.org
The proposal that I made in https://github.com/sympy/sympy/pull/673 may or
may not became part of sympy but I like it and it's already quite useful for
me.
Here are some examples. I would like to know what do you think. The 3d stuff
runs only on the latest version of matplotlib _after_ fixing a bug
(mentioned in the commit history, but those will be squashed soon).
I didn't have any problems with it, though you do seem to have found a
bug in matplotlib. I would submit a pull request to them fixing it.

Aaron Meurer
Post by k***@public.gmane.org
The script to produce them is also attached (as the api is probably more
important than the visuals (the _series[index] stuff is just a workaround
until getters are written)).
Regards
Stefan
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to sympy+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Aaron Meurer
2011-11-11 20:41:07 UTC
Permalink
Oh, I forgot to mention that I got the following warnings:

In [6]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi, pi))

In [7]: p.show()
/sw/lib/python2.7/site-packages/matplotlib/axes.py:4368: UserWarning:
No labeled objects found. Use label='...' kwarg on individual plots.
warnings.warn("No labeled objects found. "

In [8]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi, pi), '3d')

In [9]: p.show()
/Users/aaronmeurer/Documents/python/sympy/sympy/sympy/plotting/newplot.py:901:
UserWarning: xscale is not supported in 3D matplotlib backend.
warnings.warn('xscale is not supported in 3D matplotlib backend.')
/Users/aaronmeurer/Documents/python/sympy/sympy/sympy/plotting/newplot.py:879:
UserWarning: axis_center is not supported in 3D matplotlib backend.
warnings.warn('axis_center is not supported in 3D matplotlib backend.')
/Users/aaronmeurer/Documents/python/sympy/sympy/sympy/plotting/newplot.py:895:
UserWarning: xscale is not supported in 3D matplotlib backend.
warnings.warn('xscale is not supported in 3D matplotlib backend.')

Aaron Meurer
Hi.
This looks great.  For others, to run the examples, download the
examples script and put in the sympy directory.  Then, checkout
Krastanov's branch (from the pull request). Then, run IPython, and
type %run examples.py.  And then type p0.show(), p1.show(), etc. (up
to p4).
And if you just want to test the plotting of your own functions in
isympy, you have to run "from sympy.plotting.newplot import *", or
else it will use the old plotting.  The syntax is
In [8]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi, pi), '3d')
In [9]: p.show()
(if you don't add '3d' in this case, it will default to a contour
plot, which btw is maybe not the best default)
Aaron Meurer
Post by k***@public.gmane.org
The proposal that I made in https://github.com/sympy/sympy/pull/673 may or
may not became part of sympy but I like it and it's already quite useful for
me.
Here are some examples. I would like to know what do you think. The 3d stuff
runs only on the latest version of matplotlib _after_ fixing a bug
(mentioned in the commit history, but those will be squashed soon).
I didn't have any problems with it, though you do seem to have found a
bug in matplotlib.  I would submit a pull request to them fixing it.
Aaron Meurer
Post by k***@public.gmane.org
The script to produce them is also attached (as the api is probably more
important than the visuals (the _series[index] stuff is just a workaround
until getters are written)).
Regards
Stefan
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to sympy+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
k***@public.gmane.org
2011-11-11 21:13:40 UTC
Permalink
Hi

I'm a bit ashamed that Aaron gave better introduction than me for my own
code :)
Anyway, I think the documentation of Plot and the module is quite detailed
so you can look also at help(Plot) and help(newplot).

About the warnings - my idea was to structure the base backend class in
such a way that any missing functionality in the backend subclass will just
raise a warning but not an error (unless it is some essential
functionality). So those will be addressed later.

It can plot Integrals (due to an old addition done to lambdify thanks to
Certik) but not Sums or anything fancy like product of Kets and Bras. To do
those a more in depth refactoring of lambda will be needed as Certik's
method for adding Integral to lambdify does not scale well. I think this is
an important problem.

Discontinuous functions may pose problems for the moment (none seen for the
moment, but this is mostly by chance).

About the bug in matplotlib - Aaron, you said that you will make a pull
request for them. Should I do something or you have already taken care of
this.

I'll start writing tests for the module in the near future. Then the core
devs should tell me if this code is going in and how.

About the '3d' string - you are right it's a bad default. It's just that
contour was written first, but I'll change this now.

Finally - I was squashing and rebasing this pull request quite a bit. Now
as it's getting more attention I'll stop doing it, so you are free to make
changes if you are interested.
Post by Aaron Meurer
In [6]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi, pi))
In [7]: p.show()
No labeled objects found. Use label='...' kwarg on individual plots.
warnings.warn("No labeled objects found. "
In [8]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi, pi), '3d')
In [9]: p.show()
UserWarning: xscale is not supported in 3D matplotlib backend.
warnings.warn('xscale is not supported in 3D matplotlib backend.')
UserWarning: axis_center is not supported in 3D matplotlib backend.
warnings.warn('axis_center is not supported in 3D matplotlib backend.')
UserWarning: xscale is not supported in 3D matplotlib backend.
warnings.warn('xscale is not supported in 3D matplotlib backend.')
Aaron Meurer
Post by Aaron Meurer
Hi.
This looks great. For others, to run the examples, download the
examples script and put in the sympy directory. Then, checkout
Krastanov's branch (from the pull request). Then, run IPython, and
type %run examples.py. And then type p0.show(), p1.show(), etc. (up
to p4).
And if you just want to test the plotting of your own functions in
isympy, you have to run "from sympy.plotting.newplot import *", or
else it will use the old plotting. The syntax is
In [8]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi, pi),
'3d')
Post by Aaron Meurer
In [9]: p.show()
(if you don't add '3d' in this case, it will default to a contour
plot, which btw is maybe not the best default)
Aaron Meurer
The proposal that I made in https://github.com/sympy/sympy/pull/673may or
may not became part of sympy but I like it and it's already quite
useful for
Post by Aaron Meurer
me.
Here are some examples. I would like to know what do you think. The 3d
stuff
Post by Aaron Meurer
runs only on the latest version of matplotlib _after_ fixing a bug
(mentioned in the commit history, but those will be squashed soon).
I didn't have any problems with it, though you do seem to have found a
bug in matplotlib. I would submit a pull request to them fixing it.
Aaron Meurer
The script to produce them is also attached (as the api is probably more
important than the visuals (the _series[index] stuff is just a
workaround
Post by Aaron Meurer
until getters are written)).
Regards
Stefan
--
You received this message because you are subscribed to the Google
Groups
Post by Aaron Meurer
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to sympy+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
k***@public.gmane.org
2011-11-11 21:15:56 UTC
Permalink
Some more examples are present in test.py (the second file in the pull
request) that can be used in the same way as examples.py.
Post by k***@public.gmane.org
Hi
I'm a bit ashamed that Aaron gave better introduction than me for my own
code :)
Anyway, I think the documentation of Plot and the module is quite detailed
so you can look also at help(Plot) and help(newplot).
About the warnings - my idea was to structure the base backend class in
such a way that any missing functionality in the backend subclass will just
raise a warning but not an error (unless it is some essential
functionality). So those will be addressed later.
It can plot Integrals (due to an old addition done to lambdify thanks to
Certik) but not Sums or anything fancy like product of Kets and Bras. To do
those a more in depth refactoring of lambda will be needed as Certik's
method for adding Integral to lambdify does not scale well. I think this is
an important problem.
Discontinuous functions may pose problems for the moment (none seen for
the moment, but this is mostly by chance).
About the bug in matplotlib - Aaron, you said that you will make a pull
request for them. Should I do something or you have already taken care of
this.
I'll start writing tests for the module in the near future. Then the core
devs should tell me if this code is going in and how.
About the '3d' string - you are right it's a bad default. It's just that
contour was written first, but I'll change this now.
Finally - I was squashing and rebasing this pull request quite a bit. Now
as it's getting more attention I'll stop doing it, so you are free to make
changes if you are interested.
Post by Aaron Meurer
In [6]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi, pi))
In [7]: p.show()
No labeled objects found. Use label='...' kwarg on individual plots.
warnings.warn("No labeled objects found. "
In [8]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi, pi), '3d')
In [9]: p.show()
UserWarning: xscale is not supported in 3D matplotlib backend.
warnings.warn('xscale is not supported in 3D matplotlib backend.')
UserWarning: axis_center is not supported in 3D matplotlib backend.
warnings.warn('axis_center is not supported in 3D matplotlib backend.')
UserWarning: xscale is not supported in 3D matplotlib backend.
warnings.warn('xscale is not supported in 3D matplotlib backend.')
Aaron Meurer
Post by Aaron Meurer
Hi.
This looks great. For others, to run the examples, download the
examples script and put in the sympy directory. Then, checkout
Krastanov's branch (from the pull request). Then, run IPython, and
type %run examples.py. And then type p0.show(), p1.show(), etc. (up
to p4).
And if you just want to test the plotting of your own functions in
isympy, you have to run "from sympy.plotting.newplot import *", or
else it will use the old plotting. The syntax is
In [8]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi, pi),
'3d')
Post by Aaron Meurer
In [9]: p.show()
(if you don't add '3d' in this case, it will default to a contour
plot, which btw is maybe not the best default)
Aaron Meurer
The proposal that I made in https://github.com/sympy/sympy/pull/673may or
may not became part of sympy but I like it and it's already quite
useful for
Post by Aaron Meurer
me.
Here are some examples. I would like to know what do you think. The 3d
stuff
Post by Aaron Meurer
runs only on the latest version of matplotlib _after_ fixing a bug
(mentioned in the commit history, but those will be squashed soon).
I didn't have any problems with it, though you do seem to have found a
bug in matplotlib. I would submit a pull request to them fixing it.
Aaron Meurer
The script to produce them is also attached (as the api is probably
more
Post by Aaron Meurer
important than the visuals (the _series[index] stuff is just a
workaround
Post by Aaron Meurer
until getters are written)).
Regards
Stefan
--
You received this message because you are subscribed to the Google
Groups
Post by Aaron Meurer
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to sympy+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Matthew Rocklin
2011-11-11 21:22:05 UTC
Permalink
I'm really excited to see this come together. Having a matplotlib backend
will be very helpful for me.
Keep up the good work!
Post by k***@public.gmane.org
Some more examples are present in test.py (the second file in the pull
request) that can be used in the same way as examples.py.
Post by k***@public.gmane.org
Hi
I'm a bit ashamed that Aaron gave better introduction than me for my own
code :)
Anyway, I think the documentation of Plot and the module is quite
detailed so you can look also at help(Plot) and help(newplot).
About the warnings - my idea was to structure the base backend class in
such a way that any missing functionality in the backend subclass will just
raise a warning but not an error (unless it is some essential
functionality). So those will be addressed later.
It can plot Integrals (due to an old addition done to lambdify thanks to
Certik) but not Sums or anything fancy like product of Kets and Bras. To do
those a more in depth refactoring of lambda will be needed as Certik's
method for adding Integral to lambdify does not scale well. I think this is
an important problem.
Discontinuous functions may pose problems for the moment (none seen for
the moment, but this is mostly by chance).
About the bug in matplotlib - Aaron, you said that you will make a pull
request for them. Should I do something or you have already taken care of
this.
I'll start writing tests for the module in the near future. Then the core
devs should tell me if this code is going in and how.
About the '3d' string - you are right it's a bad default. It's just that
contour was written first, but I'll change this now.
Finally - I was squashing and rebasing this pull request quite a bit. Now
as it's getting more attention I'll stop doing it, so you are free to make
changes if you are interested.
Post by Aaron Meurer
In [6]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi, pi))
In [7]: p.show()
No labeled objects found. Use label='...' kwarg on individual plots.
warnings.warn("No labeled objects found. "
In [8]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi, pi), '3d')
In [9]: p.show()
UserWarning: xscale is not supported in 3D matplotlib backend.
warnings.warn('xscale is not supported in 3D matplotlib backend.')
UserWarning: axis_center is not supported in 3D matplotlib backend.
warnings.warn('axis_center is not supported in 3D matplotlib backend.')
UserWarning: xscale is not supported in 3D matplotlib backend.
warnings.warn('xscale is not supported in 3D matplotlib backend.')
Aaron Meurer
Post by Aaron Meurer
Hi.
This looks great. For others, to run the examples, download the
examples script and put in the sympy directory. Then, checkout
Krastanov's branch (from the pull request). Then, run IPython, and
type %run examples.py. And then type p0.show(), p1.show(), etc. (up
to p4).
And if you just want to test the plotting of your own functions in
isympy, you have to run "from sympy.plotting.newplot import *", or
else it will use the old plotting. The syntax is
In [8]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi,
pi), '3d')
Post by Aaron Meurer
In [9]: p.show()
(if you don't add '3d' in this case, it will default to a contour
plot, which btw is maybe not the best default)
Aaron Meurer
The proposal that I made in https://github.com/sympy/sympy/pull/673may or
may not became part of sympy but I like it and it's already quite
useful for
Post by Aaron Meurer
me.
Here are some examples. I would like to know what do you think. The
3d stuff
Post by Aaron Meurer
runs only on the latest version of matplotlib _after_ fixing a bug
(mentioned in the commit history, but those will be squashed soon).
I didn't have any problems with it, though you do seem to have found a
bug in matplotlib. I would submit a pull request to them fixing it.
Aaron Meurer
The script to produce them is also attached (as the api is probably
more
Post by Aaron Meurer
important than the visuals (the _series[index] stuff is just a
workaround
Post by Aaron Meurer
until getters are written)).
Regards
Stefan
--
You received this message because you are subscribed to the Google
Groups
Post by Aaron Meurer
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google
Groups "sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to sympy+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Aaron Meurer
2011-11-11 22:31:59 UTC
Permalink
Post by k***@public.gmane.org
Hi
I'm a bit ashamed that Aaron gave better introduction than me for my own
code :)
Anyway, I think the documentation of Plot and the module is quite detailed
so you can look also at help(Plot) and help(newplot).
About the warnings - my idea was to structure the base backend class in such
a way that any missing functionality in the backend subclass will just raise
a warning but not an error (unless it is some essential functionality). So
those will be addressed later.
It can plot Integrals (due to an old addition done to lambdify thanks to
Certik) but not Sums or anything fancy like product of Kets and Bras. To do
those a more in depth refactoring of lambda will be needed as Certik's
method for adding Integral to lambdify does not scale well. I think this is
an important problem.
I agree. Is there an issue for this?
Post by k***@public.gmane.org
Discontinuous functions may pose problems for the moment (none seen for the
moment, but this is mostly by chance).
As far as I can tell, this is a nontrivial problem to solve, as many
very good plotting systems choke on discontinuous functions. Perhaps
there can be some kind of symbolic heuristic applied to find
discontinuities.
Post by k***@public.gmane.org
About the bug in matplotlib - Aaron, you said that you will make a pull
request for them. Should I do something or you have already taken care of
this.
Sorry for the misunderstanding, but this is not what I said. I was
suggesting to you that you do it. I haven't even been able to
reproduce the bug you are seeing, so I can't even tell with certainty
what the correct fix is.
Post by k***@public.gmane.org
I'll start writing tests for the module in the near future. Then the core
devs should tell me if this code is going in and how.
I definitely think it should go in. I guess the question is how to
properly replace/merge it with the old module, which isn't compatible
(it uses different syntax, keywords, etc.)

Actually, to what degree is the new Plot() function incompatible with
the old one? Would it be possible to merge the two without breaking
compatibility with the old module?
Post by k***@public.gmane.org
About the '3d' string - you are right it's a bad default. It's just that
contour was written first, but I'll change this now.
Cool. By the way, will it be possible in the future to call something
like p.change_plot_type('contour') (only with a better name than that
:) and it will change it from 3d to a contour?
Post by k***@public.gmane.org
Finally - I was squashing and rebasing this pull request quite a bit. Now as
it's getting more attention I'll stop doing it, so you are free to make
changes if you are interested.
Great. This makes it easier to follow your progress.

Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
In [6]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi, pi))
In [7]: p.show()
No labeled objects found. Use label='...' kwarg on individual plots.
 warnings.warn("No labeled objects found. "
In [8]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi, pi), '3d')
In [9]: p.show()
UserWarning: xscale is not supported in 3D matplotlib backend.
 warnings.warn('xscale is not supported in 3D matplotlib backend.')
UserWarning: axis_center is not supported in 3D matplotlib backend.
 warnings.warn('axis_center is not supported in 3D matplotlib backend.')
UserWarning: xscale is not supported in 3D matplotlib backend.
 warnings.warn('xscale is not supported in 3D matplotlib backend.')
Aaron Meurer
Hi.
This looks great.  For others, to run the examples, download the
examples script and put in the sympy directory.  Then, checkout
Krastanov's branch (from the pull request). Then, run IPython, and
type %run examples.py.  And then type p0.show(), p1.show(), etc. (up
to p4).
And if you just want to test the plotting of your own functions in
isympy, you have to run "from sympy.plotting.newplot import *", or
else it will use the old plotting.  The syntax is
In [8]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi, pi), '3d')
In [9]: p.show()
(if you don't add '3d' in this case, it will default to a contour
plot, which btw is maybe not the best default)
Aaron Meurer
Post by k***@public.gmane.org
The proposal that I made in https://github.com/sympy/sympy/pull/673 may or
may not became part of sympy but I like it and it's already quite useful for
me.
Here are some examples. I would like to know what do you think. The 3d stuff
runs only on the latest version of matplotlib _after_ fixing a bug
(mentioned in the commit history, but those will be squashed soon).
I didn't have any problems with it, though you do seem to have found a
bug in matplotlib.  I would submit a pull request to them fixing it.
Aaron Meurer
Post by k***@public.gmane.org
The script to produce them is also attached (as the api is probably more
important than the visuals (the _series[index] stuff is just a workaround
until getters are written)).
Regards
Stefan
--
You received this message because you are subscribed to the Google
Groups
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to sympy+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
k***@public.gmane.org
2011-11-11 23:25:42 UTC
Permalink
Post by k***@public.gmane.org
Post by k***@public.gmane.org
Hi
I'm a bit ashamed that Aaron gave better introduction than me for my own
code :)
Anyway, I think the documentation of Plot and the module is quite
detailed
Post by k***@public.gmane.org
so you can look also at help(Plot) and help(newplot).
About the warnings - my idea was to structure the base backend class in
such
Post by k***@public.gmane.org
a way that any missing functionality in the backend subclass will just
raise
Post by k***@public.gmane.org
a warning but not an error (unless it is some essential functionality).
So
Post by k***@public.gmane.org
those will be addressed later.
It can plot Integrals (due to an old addition done to lambdify thanks to
Certik) but not Sums or anything fancy like product of Kets and Bras. To
do
Post by k***@public.gmane.org
those a more in depth refactoring of lambda will be needed as Certik's
method for adding Integral to lambdify does not scale well. I think this
is
Post by k***@public.gmane.org
an important problem.
I agree. Is there an issue for this?
No issue for the moment. I take responsibility for creating one when I
gather enough understanding of the code and the problem.
Post by k***@public.gmane.org
Post by k***@public.gmane.org
Discontinuous functions may pose problems for the moment (none seen for
the
Post by k***@public.gmane.org
moment, but this is mostly by chance).
As far as I can tell, this is a nontrivial problem to solve, as many
very good plotting systems choke on discontinuous functions. Perhaps
there can be some kind of symbolic heuristic applied to find
discontinuities.
I think Maple has some option in its plotting module about detecting
asymptotes (numerically?) but I can not check it at the moment. Anyhow,
this is not the most important feature at the moment.
Post by k***@public.gmane.org
Post by k***@public.gmane.org
About the bug in matplotlib - Aaron, you said that you will make a pull
request for them. Should I do something or you have already taken care of
this.
Sorry for the misunderstanding, but this is not what I said. I was
suggesting to you that you do it. I haven't even been able to
reproduce the bug you are seeing, so I can't even tell with certainty
what the correct fix is.
I'm sorry :D (my mistake). I'll do it.
Post by k***@public.gmane.org
Post by k***@public.gmane.org
I'll start writing tests for the module in the near future. Then the core
devs should tell me if this code is going in and how.
I definitely think it should go in. I guess the question is how to
properly replace/merge it with the old module, which isn't compatible
(it uses different syntax, keywords, etc.)
Actually, to what degree is the new Plot() function incompatible with
the old one? Would it be possible to merge the two without breaking
compatibility with the old module?
There are some things about the api of the old module that I don't like,
but I'll check if there is a compromise that can be made. I understand the
importance of not breaking the api.

But I was thinking it would be best to have both modules and then a backend
for the old module in the new module. And maybe move the old module to
plotting.oldplot or leave the new module in plotting.newplot.
Post by k***@public.gmane.org
Post by k***@public.gmane.org
About the '3d' string - you are right it's a bad default. It's just that
contour was written first, but I'll change this now.
Cool. By the way, will it be possible in the future to call something
like p.change_plot_type('contour') (only with a better name than that
:) and it will change it from 3d to a contour?
At the moment 3dsurface (not parametric) and contour are represented by
different classes. It makes sense to merge them and add an option (actually
there is a repetition of code at the moment). It would be something like:
p = Plot(blah blah)
p[0].visualisation_method = '3d' or 'contour'
the name of the attribute may be other ('plot_type', 'projection', ...)
Post by k***@public.gmane.org
Post by k***@public.gmane.org
Finally - I was squashing and rebasing this pull request quite a bit.
Now as
Post by k***@public.gmane.org
it's getting more attention I'll stop doing it, so you are free to make
changes if you are interested.
Great. This makes it easier to follow your progress.
Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
In [6]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi, pi))
In [7]: p.show()
No labeled objects found. Use label='...' kwarg on individual plots.
warnings.warn("No labeled objects found. "
In [8]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi, pi), '3d')
In [9]: p.show()
UserWarning: xscale is not supported in 3D matplotlib backend.
warnings.warn('xscale is not supported in 3D matplotlib backend.')
UserWarning: axis_center is not supported in 3D matplotlib backend.
warnings.warn('axis_center is not supported in 3D matplotlib backend.')
UserWarning: xscale is not supported in 3D matplotlib backend.
warnings.warn('xscale is not supported in 3D matplotlib backend.')
Aaron Meurer
Post by Aaron Meurer
Hi.
This looks great. For others, to run the examples, download the
examples script and put in the sympy directory. Then, checkout
Krastanov's branch (from the pull request). Then, run IPython, and
type %run examples.py. And then type p0.show(), p1.show(), etc. (up
to p4).
And if you just want to test the plotting of your own functions in
isympy, you have to run "from sympy.plotting.newplot import *", or
else it will use the old plotting. The syntax is
In [8]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi,
pi),
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by Aaron Meurer
'3d')
In [9]: p.show()
(if you don't add '3d' in this case, it will default to a contour
plot, which btw is maybe not the best default)
Aaron Meurer
The proposal that I made in https://github.com/sympy/sympy/pull/673may or
may not became part of sympy but I like it and it's already quite useful for
me.
Here are some examples. I would like to know what do you think. The
3d
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by Aaron Meurer
stuff
runs only on the latest version of matplotlib _after_ fixing a bug
(mentioned in the commit history, but those will be squashed soon).
I didn't have any problems with it, though you do seem to have found a
bug in matplotlib. I would submit a pull request to them fixing it.
Aaron Meurer
The script to produce them is also attached (as the api is probably more
important than the visuals (the _series[index] stuff is just a workaround
until getters are written)).
Regards
Stefan
--
You received this message because you are subscribed to the Google
Groups
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google
Groups
Post by k***@public.gmane.org
Post by Aaron Meurer
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to sympy+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Aaron Meurer
2011-11-12 19:43:35 UTC
Permalink
Post by k***@public.gmane.org
Post by k***@public.gmane.org
Hi
I'm a bit ashamed that Aaron gave better introduction than me for my own
code :)
Anyway, I think the documentation of Plot and the module is quite detailed
so you can look also at help(Plot) anhelp(newplot).
About the warnings - my idea was to structure the base backend class in such
a way that any missing functionality in the backend subclass will just raise
a warning but not an error (unless it is some essential functionality). So
those will be addressed later.
It can plot Integrals (due to an old addition done to lambdify thanks to
Certik) but not Sums or anything fancy like product of Kets and Bras. To do
those a more in depth refactoring of lambda will be needed as Certik's
method for adding Integral to lambdify does not scale well. I think this is
an important problem.
I agree.  Is there an issue for this?
No issue for the moment. I take responsibility for creating one when I
gather enough understanding of the code and the problem.
Post by k***@public.gmane.org
Discontinuous functions may pose problems for the moment (none seen for the
moment, but this is mostly by chance).
As far as I can tell, this is a nontrivial problem to solve, as many
very good plotting systems choke on discontinuous functions.  Perhaps
there can be some kind of symbolic heuristic applied to find
discontinuities.
I think Maple has some option in its plotting module about detecting
asymptotes (numerically?) but I can not check it at the moment. Anyhow, this
is not the most important feature at the moment.
Post by k***@public.gmane.org
About the bug in matplotlib - Aaron, you said that you will make a pull
request for them. Should I do something or you have already taken care of
this.
Sorry for the misunderstanding, but this is not what I said.  I was
suggesting to you that you do it.  I haven't even been able to
reproduce the bug you are seeing, so I can't even tell with certainty
what the correct fix is.
I'm sorry :D (my mistake). I'll do it.
Post by k***@public.gmane.org
I'll start writing tests for the module in the near future. Then the core
devs should tell me if this code is going in and how.
I definitely think it should go in.  I guess the question is how to
properly replace/merge it with the old module, which isn't compatible
(it uses different syntax, keywords, etc.)
Actually, to what degree is the new Plot() function incompatible with
the old one?  Would it be possible to merge the two without breaking
compatibility with the old module?
There are some things about the api of the old module that I don't like, but
I'll check if there is a compromise that can be made. I understand the
importance of not breaking the api.
What are these specifically. Is it possible to support both APIs at
the same time, while deprecating the old one, r would they have to be
completely different functions to prevent ambiguous input?

Also, even if you don't plan to have this ready by the next release,
we can start deprecating the old module now.

The differences that I've noticed are that with the new module, you
have to specify a variable and range (but assumedly, this will be
relaxed at some point?), and that you have to call p.show() to
actually see the plot. One idea regarding the last point would be to
create a function plot() (lowercase) which automatically shows the
plot, which would be used for quick plotting, and then leave Plot()
for more advanced plots.

Aaron Meurer
Post by k***@public.gmane.org
But I was thinking it would be best to have both modules and then a backend
for the old module in the new module. And maybe move the old module to
plotting.oldplot or leave the new module in plotting.newplot.
Post by k***@public.gmane.org
About the '3d' string - you are right it's a bad default. It's just that
contour was written first, but I'll change this now.
Cool.  By the way, will it be possible in the future to call something
like p.change_plot_type('contour') (only with a better name than that
:) and it will change it from 3d to a contour?
At the moment 3dsurface (not parametric) and contour are represented by
different classes. It makes sense to merge them and add an option (actually
p = Plot(blah blah)
p[0].visualisation_method = '3d' or 'contour'
the name of the attribute may be other ('plot_type', 'projection', ...)
Post by k***@public.gmane.org
Finally - I was squashing and rebasing this pull request quite a bit. Now as
it's getting more attention I'll stop doing it, so you are free to make
changes if you are interested.
Great.  This makes it easier to follow your progress.
Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
In [6]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi, pi))
In [7]: p.show()
No labeled objects found. Use label='...' kwarg on individual plots.
 warnings.warn("No labeled objects found. "
In [8]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi, pi), '3d')
In [9]: p.show()
UserWarning: xscale is not supported in 3D matplotlib backend.
 warnings.warn('xscale is not supported in 3D matplotlib backend.')
UserWarning: axis_center is not supported in 3D matplotlib backend.
 warnings.warn('axis_center is not supported in 3D matplotlib backend.')
UserWarning: xscale is not supported in 3D matplotlib backend.
 warnings.warn('xscale is not supported in 3D matplotlib backend.')
Aaron Meurer
Hi.
This looks great.  For others, to run the examples, download the
examples script and put in the sympy directory.  Then, checkout
Krastanov's branch (from the pull request). Then, run IPython, and
type %run examples.py.  And then type p0.show(), p1.show(), etc. (up
to p4).
And if you just want to test the plotting of your own functions in
isympy, you have to run "from sympy.plotting.newplot import *", or
else it will use the old plotting.  The syntax is
In [8]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi, pi),
'3d')
In [9]: p.show()
(if you don't add '3d' in this case, it will default to a contour
plot, which btw is maybe not the best default)
Aaron Meurer
Post by k***@public.gmane.org
The proposal that I made in https://github.com/sympy/sympy/pull/673
may
or
may not became part of sympy but I like it and it's already quite useful for
me.
Here are some examples. I would like to know what do you think. The 3d
stuff
runs only on the latest version of matplotlib _after_ fixing a bug
(mentioned in the commit history, but those will be squashed soon).
I didn't have any problems with it, though you do seem to have found a
bug in matplotlib.  I would submit a pull request to them fixing it.
Aaron Meurer
Post by k***@public.gmane.org
The script to produce them is also attached (as the api is probably more
important than the visuals (the _series[index] stuff is just a workaround
until getters are written)).
Regards
Stefan
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to sympy+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
k***@public.gmane.org
2011-11-12 21:04:37 UTC
Permalink
Post by k***@public.gmane.org
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Hi
I'm a bit ashamed that Aaron gave better introduction than me for my
own
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
code :)
Anyway, I think the documentation of Plot and the module is quite detailed
so you can look also at help(Plot) anhelp(newplot).
About the warnings - my idea was to structure the base backend class
in
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
such
a way that any missing functionality in the backend subclass will just raise
a warning but not an error (unless it is some essential
functionality).
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
So
those will be addressed later.
It can plot Integrals (due to an old addition done to lambdify thanks
to
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Certik) but not Sums or anything fancy like product of Kets and Bras.
To
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
do
those a more in depth refactoring of lambda will be needed as Certik's
method for adding Integral to lambdify does not scale well. I think
this
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
is
an important problem.
I agree. Is there an issue for this?
No issue for the moment. I take responsibility for creating one when I
gather enough understanding of the code and the problem.
Post by Aaron Meurer
Post by k***@public.gmane.org
Discontinuous functions may pose problems for the moment (none seen
for
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
the
moment, but this is mostly by chance).
As far as I can tell, this is a nontrivial problem to solve, as many
very good plotting systems choke on discontinuous functions. Perhaps
there can be some kind of symbolic heuristic applied to find
discontinuities.
I think Maple has some option in its plotting module about detecting
asymptotes (numerically?) but I can not check it at the moment. Anyhow,
this
Post by k***@public.gmane.org
is not the most important feature at the moment.
Post by Aaron Meurer
Post by k***@public.gmane.org
About the bug in matplotlib - Aaron, you said that you will make a
pull
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
request for them. Should I do something or you have already taken care of
this.
Sorry for the misunderstanding, but this is not what I said. I was
suggesting to you that you do it. I haven't even been able to
reproduce the bug you are seeing, so I can't even tell with certainty
what the correct fix is.
I'm sorry :D (my mistake). I'll do it.
Post by Aaron Meurer
Post by k***@public.gmane.org
I'll start writing tests for the module in the near future. Then the core
devs should tell me if this code is going in and how.
I definitely think it should go in. I guess the question is how to
properly replace/merge it with the old module, which isn't compatible
(it uses different syntax, keywords, etc.)
Actually, to what degree is the new Plot() function incompatible with
the old one? Would it be possible to merge the two without breaking
compatibility with the old module?
There are some things about the api of the old module that I don't like,
but
Post by k***@public.gmane.org
I'll check if there is a compromise that can be made. I understand the
importance of not breaking the api.
What are these specifically. Is it possible to support both APIs at
the same time, while deprecating the old one, r would they have to be
completely different functions to prevent ambiguous input?
About the parts that I don't like: Using a big string for all the options
and the possibility to use an arbitrary big index when adding new plot.
That's all, I think. Those two (especially the first one) would be
difficult to support.

About supporting both apis - I think it's possible. For example: when there
is an ambiguity it will default to the old module, and when it is using the
old module it will raise a deprecation warning. All this will be done from
a proxy class Plot that is in sympy.plotting. The old module will be in
sympy.plotting.pyglet. The deprecation warning will read:

"To use directly the pyglet module do: from sympy.plotting.pyglet import
PygletPlot. To use exclusively the new module (that has pyglet as one of
the possible backends) do: from sympy.plotting.future import Plot".

If this is ok, I'll do it in my pull request.

And the old module needs only to be moved, not removed (and a backend for
it needs to be written, but that would take under 2 hours (under a day or
two for a CGI student)).

One big advantage (the only one) of the old module over matplotlib is that
it does all in OpenGL so you can turn the graph in realtime (imagine a
teacher showing a hydrogen orbital in front of the class, matplotlib is not
fast enough).
Post by k***@public.gmane.org
Also, even if you don't plan to have this ready by the next release,
we can start deprecating the old module now.
I suppose that a warning wont hurt.
Post by k***@public.gmane.org
The differences that I've noticed are that with the new module, you
have to specify a variable and range (but assumedly, this will be
relaxed at some point?), and that you have to call p.show() to
actually see the plot. One idea regarding the last point would be to
create a function plot() (lowercase) which automatically shows the
plot, which would be used for quick plotting, and then leave Plot()
for more advanced plots.
About the variable with range: I was not thinking about relaxing the
requirement, but I suppose it would be a wanted feature. I'll write some
code for it. Maybe only in the plot() function (lower case). And yes, I
agree that a plot() function will be a good idea.
Post by k***@public.gmane.org
Aaron Meurer
Post by k***@public.gmane.org
But I was thinking it would be best to have both modules and then a
backend
Post by k***@public.gmane.org
for the old module in the new module. And maybe move the old module to
plotting.oldplot or leave the new module in plotting.newplot.
Post by Aaron Meurer
Post by k***@public.gmane.org
About the '3d' string - you are right it's a bad default. It's just
that
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
contour was written first, but I'll change this now.
Cool. By the way, will it be possible in the future to call something
like p.change_plot_type('contour') (only with a better name than that
:) and it will change it from 3d to a contour?
At the moment 3dsurface (not parametric) and contour are represented by
different classes. It makes sense to merge them and add an option
(actually
Post by k***@public.gmane.org
p = Plot(blah blah)
p[0].visualisation_method = '3d' or 'contour'
the name of the attribute may be other ('plot_type', 'projection', ...)
Post by Aaron Meurer
Post by k***@public.gmane.org
Finally - I was squashing and rebasing this pull request quite a bit. Now as
it's getting more attention I'll stop doing it, so you are free to
make
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
changes if you are interested.
Great. This makes it easier to follow your progress.
Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
In [6]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi,
pi))
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
In [7]: p.show()
No labeled objects found. Use label='...' kwarg on individual plots.
warnings.warn("No labeled objects found. "
In [8]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi,
pi),
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
'3d')
In [9]: p.show()
UserWarning: xscale is not supported in 3D matplotlib backend.
warnings.warn('xscale is not supported in 3D matplotlib backend.')
UserWarning: axis_center is not supported in 3D matplotlib backend.
warnings.warn('axis_center is not supported in 3D matplotlib backend.')
UserWarning: xscale is not supported in 3D matplotlib backend.
warnings.warn('xscale is not supported in 3D matplotlib backend.')
Aaron Meurer
Post by Aaron Meurer
Hi.
This looks great. For others, to run the examples, download the
examples script and put in the sympy directory. Then, checkout
Krastanov's branch (from the pull request). Then, run IPython, and
type %run examples.py. And then type p0.show(), p1.show(), etc.
(up
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by Aaron Meurer
to p4).
And if you just want to test the plotting of your own functions in
isympy, you have to run "from sympy.plotting.newplot import *", or
else it will use the old plotting. The syntax is
In [8]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi, pi),
'3d')
In [9]: p.show()
(if you don't add '3d' in this case, it will default to a contour
plot, which btw is maybe not the best default)
Aaron Meurer
Post by k***@public.gmane.org
The proposal that I made in
https://github.com/sympy/sympy/pull/673
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by Aaron Meurer
Post by k***@public.gmane.org
may
or
may not became part of sympy but I like it and it's already quite
useful for
me.
Here are some examples. I would like to know what do you think.
The
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by Aaron Meurer
Post by k***@public.gmane.org
3d
stuff
runs only on the latest version of matplotlib _after_ fixing a bug
(mentioned in the commit history, but those will be squashed
soon).
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by Aaron Meurer
I didn't have any problems with it, though you do seem to have
found
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by Aaron Meurer
a
bug in matplotlib. I would submit a pull request to them fixing
it.
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by Aaron Meurer
Aaron Meurer
Post by k***@public.gmane.org
The script to produce them is also attached (as the api is
probably
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by Aaron Meurer
Post by k***@public.gmane.org
more
important than the visuals (the _series[index] stuff is just a workaround
until getters are written)).
Regards
Stefan
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google
Groups
Post by k***@public.gmane.org
Post by Aaron Meurer
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to sympy+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
k***@public.gmane.org
2011-11-12 21:06:45 UTC
Permalink
"CGI student" should read "GCI student" for GoogleCodeIn
Post by k***@public.gmane.org
Post by k***@public.gmane.org
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Hi
I'm a bit ashamed that Aaron gave better introduction than me for my
own
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
code :)
Anyway, I think the documentation of Plot and the module is quite detailed
so you can look also at help(Plot) anhelp(newplot).
About the warnings - my idea was to structure the base backend class
in
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
such
a way that any missing functionality in the backend subclass will
just
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
raise
a warning but not an error (unless it is some essential
functionality).
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
So
those will be addressed later.
It can plot Integrals (due to an old addition done to lambdify
thanks to
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Certik) but not Sums or anything fancy like product of Kets and
Bras. To
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
do
those a more in depth refactoring of lambda will be needed as
Certik's
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
method for adding Integral to lambdify does not scale well. I think
this
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
is
an important problem.
I agree. Is there an issue for this?
No issue for the moment. I take responsibility for creating one when I
gather enough understanding of the code and the problem.
Post by Aaron Meurer
Post by k***@public.gmane.org
Discontinuous functions may pose problems for the moment (none seen
for
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
the
moment, but this is mostly by chance).
As far as I can tell, this is a nontrivial problem to solve, as many
very good plotting systems choke on discontinuous functions. Perhaps
there can be some kind of symbolic heuristic applied to find
discontinuities.
I think Maple has some option in its plotting module about detecting
asymptotes (numerically?) but I can not check it at the moment. Anyhow,
this
Post by k***@public.gmane.org
is not the most important feature at the moment.
Post by Aaron Meurer
Post by k***@public.gmane.org
About the bug in matplotlib - Aaron, you said that you will make a
pull
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
request for them. Should I do something or you have already taken
care
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
of
this.
Sorry for the misunderstanding, but this is not what I said. I was
suggesting to you that you do it. I haven't even been able to
reproduce the bug you are seeing, so I can't even tell with certainty
what the correct fix is.
I'm sorry :D (my mistake). I'll do it.
Post by Aaron Meurer
Post by k***@public.gmane.org
I'll start writing tests for the module in the near future. Then the core
devs should tell me if this code is going in and how.
I definitely think it should go in. I guess the question is how to
properly replace/merge it with the old module, which isn't compatible
(it uses different syntax, keywords, etc.)
Actually, to what degree is the new Plot() function incompatible with
the old one? Would it be possible to merge the two without breaking
compatibility with the old module?
There are some things about the api of the old module that I don't
like, but
Post by k***@public.gmane.org
I'll check if there is a compromise that can be made. I understand the
importance of not breaking the api.
What are these specifically. Is it possible to support both APIs at
the same time, while deprecating the old one, r would they have to be
completely different functions to prevent ambiguous input?
About the parts that I don't like: Using a big string for all the options
and the possibility to use an arbitrary big index when adding new plot.
That's all, I think. Those two (especially the first one) would be
difficult to support.
About supporting both apis - I think it's possible. For example: when
there is an ambiguity it will default to the old module, and when it is
using the old module it will raise a deprecation warning. All this will be
done from a proxy class Plot that is in sympy.plotting. The old module will
"To use directly the pyglet module do: from sympy.plotting.pyglet import
PygletPlot. To use exclusively the new module (that has pyglet as one of
the possible backends) do: from sympy.plotting.future import Plot".
If this is ok, I'll do it in my pull request.
And the old module needs only to be moved, not removed (and a backend for
it needs to be written, but that would take under 2 hours (under a day or
two for a CGI student)).
One big advantage (the only one) of the old module over matplotlib is that
it does all in OpenGL so you can turn the graph in realtime (imagine a
teacher showing a hydrogen orbital in front of the class, matplotlib is not
fast enough).
Post by k***@public.gmane.org
Also, even if you don't plan to have this ready by the next release,
we can start deprecating the old module now.
I suppose that a warning wont hurt.
Post by k***@public.gmane.org
The differences that I've noticed are that with the new module, you
have to specify a variable and range (but assumedly, this will be
relaxed at some point?), and that you have to call p.show() to
actually see the plot. One idea regarding the last point would be to
create a function plot() (lowercase) which automatically shows the
plot, which would be used for quick plotting, and then leave Plot()
for more advanced plots.
About the variable with range: I was not thinking about relaxing the
requirement, but I suppose it would be a wanted feature. I'll write some
code for it. Maybe only in the plot() function (lower case). And yes, I
agree that a plot() function will be a good idea.
Post by k***@public.gmane.org
Aaron Meurer
Post by k***@public.gmane.org
But I was thinking it would be best to have both modules and then a
backend
Post by k***@public.gmane.org
for the old module in the new module. And maybe move the old module to
plotting.oldplot or leave the new module in plotting.newplot.
Post by Aaron Meurer
Post by k***@public.gmane.org
About the '3d' string - you are right it's a bad default. It's just
that
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
contour was written first, but I'll change this now.
Cool. By the way, will it be possible in the future to call something
like p.change_plot_type('contour') (only with a better name than that
:) and it will change it from 3d to a contour?
At the moment 3dsurface (not parametric) and contour are represented by
different classes. It makes sense to merge them and add an option
(actually
Post by k***@public.gmane.org
there is a repetition of code at the moment). It would be something
p = Plot(blah blah)
p[0].visualisation_method = '3d' or 'contour'
the name of the attribute may be other ('plot_type', 'projection', ...)
Post by Aaron Meurer
Post by k***@public.gmane.org
Finally - I was squashing and rebasing this pull request quite a bit. Now as
it's getting more attention I'll stop doing it, so you are free to
make
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
changes if you are interested.
Great. This makes it easier to follow your progress.
Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
In [6]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi,
pi))
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
In [7]: p.show()
No labeled objects found. Use label='...' kwarg on individual plots.
warnings.warn("No labeled objects found. "
In [8]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi,
pi),
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
'3d')
In [9]: p.show()
UserWarning: xscale is not supported in 3D matplotlib backend.
warnings.warn('xscale is not supported in 3D matplotlib backend.')
UserWarning: axis_center is not supported in 3D matplotlib backend.
warnings.warn('axis_center is not supported in 3D matplotlib backend.')
UserWarning: xscale is not supported in 3D matplotlib backend.
warnings.warn('xscale is not supported in 3D matplotlib backend.')
Aaron Meurer
Post by Aaron Meurer
Hi.
This looks great. For others, to run the examples, download the
examples script and put in the sympy directory. Then, checkout
Krastanov's branch (from the pull request). Then, run IPython, and
type %run examples.py. And then type p0.show(), p1.show(), etc.
(up
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by Aaron Meurer
to p4).
And if you just want to test the plotting of your own functions in
isympy, you have to run "from sympy.plotting.newplot import *", or
else it will use the old plotting. The syntax is
In [8]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi, pi),
'3d')
In [9]: p.show()
(if you don't add '3d' in this case, it will default to a contour
plot, which btw is maybe not the best default)
Aaron Meurer
Post by k***@public.gmane.org
The proposal that I made in
https://github.com/sympy/sympy/pull/673
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by Aaron Meurer
Post by k***@public.gmane.org
may
or
may not became part of sympy but I like it and it's already quite
useful for
me.
Here are some examples. I would like to know what do you think.
The
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by Aaron Meurer
Post by k***@public.gmane.org
3d
stuff
runs only on the latest version of matplotlib _after_ fixing a
bug
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by Aaron Meurer
Post by k***@public.gmane.org
(mentioned in the commit history, but those will be squashed
soon).
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by Aaron Meurer
I didn't have any problems with it, though you do seem to have
found
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by Aaron Meurer
a
bug in matplotlib. I would submit a pull request to them fixing
it.
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by Aaron Meurer
Aaron Meurer
Post by k***@public.gmane.org
The script to produce them is also attached (as the api is
probably
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by Aaron Meurer
Post by k***@public.gmane.org
more
important than the visuals (the _series[index] stuff is just a
workaround
until getters are written)).
Regards
Stefan
--
You received this message because you are subscribed to the
Google
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by Aaron Meurer
Post by k***@public.gmane.org
Groups
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google
Groups
Post by k***@public.gmane.org
Post by Aaron Meurer
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google
Groups
Post by k***@public.gmane.org
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to sympy+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Aaron Meurer
2011-11-12 21:46:32 UTC
Permalink
Post by k***@public.gmane.org
Post by k***@public.gmane.org
Post by k***@public.gmane.org
Hi
I'm a bit ashamed that Aaron gave better introduction than me for my own
code :)
Anyway, I think the documentation of Plot and the module is quite detailed
so you can look also at help(Plot) anhelp(newplot).
About the warnings - my idea was to structure the base backend class in
such
a way that any missing functionality in the backend subclass will just
raise
a warning but not an error (unless it is some essential
functionality).
So
those will be addressed later.
It can plot Integrals (due to an old addition done to lambdify thanks to
Certik) but not Sums or anything fancy like product of Kets and Bras. To
do
those a more in depth refactoring of lambda will be needed as Certik's
method for adding Integral to lambdify does not scale well. I think this
is
an important problem.
I agree.  Is there an issue for this?
No issue for the moment. I take responsibility for creating one when I
gather enough understanding of the code and the problem.
Post by k***@public.gmane.org
Discontinuous functions may pose problems for the moment (none seen for
the
moment, but this is mostly by chance).
As far as I can tell, this is a nontrivial problem to solve, as many
very good plotting systems choke on discontinuous functions.  Perhaps
there can be some kind of symbolic heuristic applied to find
discontinuities.
I think Maple has some option in its plotting module about detecting
asymptotes (numerically?) but I can not check it at the moment. Anyhow, this
is not the most important feature at the moment.
Post by k***@public.gmane.org
About the bug in matplotlib - Aaron, you said that you will make a pull
request for them. Should I do something or you have already taken
care
of
this.
Sorry for the misunderstanding, but this is not what I said.  I was
suggesting to you that you do it.  I haven't even been able to
reproduce the bug you are seeing, so I can't even tell with certainty
what the correct fix is.
I'm sorry :D (my mistake). I'll do it.
Post by k***@public.gmane.org
I'll start writing tests for the module in the near future. Then the core
devs should tell me if this code is going in and how.
I definitely think it should go in.  I guess the question is how to
properly replace/merge it with the old module, which isn't compatible
(it uses different syntax, keywords, etc.)
Actually, to what degree is the new Plot() function incompatible with
the old one?  Would it be possible to merge the two without breaking
compatibility with the old module?
There are some things about the api of the old module that I don't like, but
I'll check if there is a compromise that can be made. I understand the
importance of not breaking the api.
What are these specifically.  Is it possible to support both APIs at
the same time, while deprecating the old one, r would they have to be
completely different functions to prevent ambiguous input?
About the parts that I don't like: Using a big string for all the options
and the possibility to use an arbitrary big index when adding new plot.
That's all, I think. Those two (especially the first one) would be difficult
to support.
About supporting both apis - I think it's possible. For example: when there
is an ambiguity it will default to the old module, and when it is using the
old module it will raise a deprecation warning. All this will be done from a
proxy class Plot that is in sympy.plotting. The old module will be in
Actually, I think it may be cleaner to just create plot(), which uses
the new module, and lave Plot alone (if the user wants the new Plot(),
they can import it from the new module).
Post by k***@public.gmane.org
"To use directly the pyglet module do: from sympy.plotting.pyglet import
PygletPlot. To use exclusively the new module (that has pyglet as one of the
possible backends) do: from sympy.plotting.future import Plot".
If this is ok, I'll do it in my pull request.
I think it sounds OK. How does it fit in with my idea above?
Post by k***@public.gmane.org
And the old module needs only to be moved, not removed (and a backend for it
needs to be written, but that would take under 2 hours (under a day or two
for a CGI student)).
Feel free to add a CodeIn issue for it. Can you add labels to issues
in the tracker? There seems to be some bug in the admin interface
right now, so if you can't, I'll add you as a project member as soon
as it's fixed. Note that it should really only be a task if you have
finished enough that it is clear what the student needs to do, but we
can always add in the second round of tasks in December if it's too
early now.
Post by k***@public.gmane.org
One big advantage (the only one) of the old module over matplotlib is that
it does all in OpenGL so you can turn the graph in realtime (imagine a
teacher showing a hydrogen orbital in front of the class, matplotlib is not
fast enough).
Also, even if you don't plan to have this ready by the next release,
we can start deprecating the old module now.
I suppose that a warning wont hurt.
The differences that I've noticed are that with the new module, you
have to specify a variable and range (but assumedly, this will be
relaxed at some point?), and that you have to call p.show() to
actually see the plot.  One idea regarding the last point would be to
create a function plot() (lowercase) which automatically shows the
plot, which would be used for quick plotting, and then leave Plot()
for more advanced plots.
About the variable with range: I was not thinking about relaxing the
requirement, but I suppose it would be a wanted feature. I'll write some
code for it. Maybe only in the plot() function (lower case). And yes, I
agree that a plot() function will be a good idea.
Yes, putting it only in plot() sounds good to me.

Aaron Meurer
Post by k***@public.gmane.org
Aaron Meurer
Post by k***@public.gmane.org
But I was thinking it would be best to have both modules and then a backend
for the old module in the new module. And maybe move the old module to
plotting.oldplot or leave the new module in plotting.newplot.
Post by k***@public.gmane.org
About the '3d' string - you are right it's a bad default. It's just that
contour was written first, but I'll change this now.
Cool.  By the way, will it be possible in the future to call something
like p.change_plot_type('contour') (only with a better name than that
:) and it will change it from 3d to a contour?
At the moment 3dsurface (not parametric) and contour are represented by
different classes. It makes sense to merge them and add an option (actually
p = Plot(blah blah)
p[0].visualisation_method = '3d' or 'contour'
the name of the attribute may be other ('plot_type', 'projection', ...)
Post by k***@public.gmane.org
Finally - I was squashing and rebasing this pull request quite a bit. Now as
it's getting more attention I'll stop doing it, so you are free to make
changes if you are interested.
Great.  This makes it easier to follow your progress.
Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
In [6]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi, pi))
In [7]: p.show()
No labeled objects found. Use label='...' kwarg on individual plots.
 warnings.warn("No labeled objects found. "
In [8]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi, pi),
'3d')
In [9]: p.show()
UserWarning: xscale is not supported in 3D matplotlib backend.
 warnings.warn('xscale is not supported in 3D matplotlib backend.')
UserWarning: axis_center is not supported in 3D matplotlib backend.
 warnings.warn('axis_center is not supported in 3D matplotlib backend.')
UserWarning: xscale is not supported in 3D matplotlib backend.
 warnings.warn('xscale is not supported in 3D matplotlib backend.')
Aaron Meurer
Hi.
This looks great.  For others, to run the examples, download the
examples script and put in the sympy directory.  Then, checkout
Krastanov's branch (from the pull request). Then, run IPython, and
type %run examples.py.  And then type p0.show(), p1.show(), etc. (up
to p4).
And if you just want to test the plotting of your own functions in
isympy, you have to run "from sympy.plotting.newplot import *", or
else it will use the old plotting.  The syntax is
In [8]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi, pi),
'3d')
In [9]: p.show()
(if you don't add '3d' in this case, it will default to a contour
plot, which btw is maybe not the best default)
Aaron Meurer
Post by k***@public.gmane.org
The proposal that I made in
https://github.com/sympy/sympy/pull/673
may
or
may not became part of sympy but I like it and it's already quite
useful for
me.
Here are some examples. I would like to know what do you think. The
3d
stuff
runs only on the latest version of matplotlib _after_ fixing a bug
(mentioned in the commit history, but those will be squashed soon).
I didn't have any problems with it, though you do seem to have
found
a
bug in matplotlib.  I would submit a pull request to them fixing it.
Aaron Meurer
Post by k***@public.gmane.org
The script to produce them is also attached (as the api is
probably
more
important than the visuals (the _series[index] stuff is just a
workaround
until getters are written)).
Regards
Stefan
--
You received this message because you are subscribed to the Google
Groups
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to sympy+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
k***@public.gmane.org
2011-11-12 22:15:08 UTC
Permalink
Post by k***@public.gmane.org
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Hi
I'm a bit ashamed that Aaron gave better introduction than me for
my
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
own
code :)
Anyway, I think the documentation of Plot and the module is quite detailed
so you can look also at help(Plot) anhelp(newplot).
About the warnings - my idea was to structure the base backend
class
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
in
such
a way that any missing functionality in the backend subclass will just
raise
a warning but not an error (unless it is some essential functionality).
So
those will be addressed later.
It can plot Integrals (due to an old addition done to lambdify
thanks
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
to
Certik) but not Sums or anything fancy like product of Kets and
Bras.
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
To
do
those a more in depth refactoring of lambda will be needed as Certik's
method for adding Integral to lambdify does not scale well. I think this
is
an important problem.
I agree. Is there an issue for this?
No issue for the moment. I take responsibility for creating one when I
gather enough understanding of the code and the problem.
Post by Aaron Meurer
Post by k***@public.gmane.org
Discontinuous functions may pose problems for the moment (none seen for
the
moment, but this is mostly by chance).
As far as I can tell, this is a nontrivial problem to solve, as many
very good plotting systems choke on discontinuous functions. Perhaps
there can be some kind of symbolic heuristic applied to find
discontinuities.
I think Maple has some option in its plotting module about detecting
asymptotes (numerically?) but I can not check it at the moment.
Anyhow,
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
this
is not the most important feature at the moment.
Post by Aaron Meurer
Post by k***@public.gmane.org
About the bug in matplotlib - Aaron, you said that you will make a pull
request for them. Should I do something or you have already taken
care
of
this.
Sorry for the misunderstanding, but this is not what I said. I was
suggesting to you that you do it. I haven't even been able to
reproduce the bug you are seeing, so I can't even tell with certainty
what the correct fix is.
I'm sorry :D (my mistake). I'll do it.
Post by Aaron Meurer
Post by k***@public.gmane.org
I'll start writing tests for the module in the near future. Then
the
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
core
devs should tell me if this code is going in and how.
I definitely think it should go in. I guess the question is how to
properly replace/merge it with the old module, which isn't compatible
(it uses different syntax, keywords, etc.)
Actually, to what degree is the new Plot() function incompatible with
the old one? Would it be possible to merge the two without breaking
compatibility with the old module?
There are some things about the api of the old module that I don't
like,
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
but
I'll check if there is a compromise that can be made. I understand the
importance of not breaking the api.
What are these specifically. Is it possible to support both APIs at
the same time, while deprecating the old one, r would they have to be
completely different functions to prevent ambiguous input?
About the parts that I don't like: Using a big string for all the options
and the possibility to use an arbitrary big index when adding new plot.
That's all, I think. Those two (especially the first one) would be
difficult
Post by k***@public.gmane.org
to support.
About supporting both apis - I think it's possible. For example: when
there
Post by k***@public.gmane.org
is an ambiguity it will default to the old module, and when it is using
the
Post by k***@public.gmane.org
old module it will raise a deprecation warning. All this will be done
from a
Post by k***@public.gmane.org
proxy class Plot that is in sympy.plotting. The old module will be in
Actually, I think it may be cleaner to just create plot(), which uses
the new module, and lave Plot alone (if the user wants the new Plot(),
they can import it from the new module).
Ok.
Post by k***@public.gmane.org
Post by k***@public.gmane.org
"To use directly the pyglet module do: from sympy.plotting.pyglet import
PygletPlot. To use exclusively the new module (that has pyglet as one of
the
Post by k***@public.gmane.org
possible backends) do: from sympy.plotting.future import Plot".
If this is ok, I'll do it in my pull request.
I think it sounds OK. How does it fit in with my idea above?
Next release:
from sympy.plotting import plot # the function you proposed
from sympy.plotting import Plot # the old Plot with added deprecation
warning
from sympy.plotting.newplot import Plot # the new Plot
No complicated proxy object

Next release +1:
the old Plot is moved to plotting.pyglet and the new Plot takes it's place
Post by k***@public.gmane.org
Post by k***@public.gmane.org
And the old module needs only to be moved, not removed (and a backend
for it
Post by k***@public.gmane.org
needs to be written, but that would take under 2 hours (under a day or
two
Post by k***@public.gmane.org
for a CGI student)).
Feel free to add a CodeIn issue for it. Can you add labels to issues
in the tracker? There seems to be some bug in the admin interface
right now, so if you can't, I'll add you as a project member as soon
as it's fixed. Note that it should really only be a task if you have
finished enough that it is clear what the student needs to do, but we
can always add in the second round of tasks in December if it's too
early now.
I suppose it's best to leave it for December. I can add the appropriate
labels.
Post by k***@public.gmane.org
Post by k***@public.gmane.org
One big advantage (the only one) of the old module over matplotlib is
that
Post by k***@public.gmane.org
it does all in OpenGL so you can turn the graph in realtime (imagine a
teacher showing a hydrogen orbital in front of the class, matplotlib is
not
Post by k***@public.gmane.org
fast enough).
Post by Aaron Meurer
Also, even if you don't plan to have this ready by the next release,
we can start deprecating the old module now.
I suppose that a warning wont hurt.
Post by Aaron Meurer
The differences that I've noticed are that with the new module, you
have to specify a variable and range (but assumedly, this will be
relaxed at some point?), and that you have to call p.show() to
actually see the plot. One idea regarding the last point would be to
create a function plot() (lowercase) which automatically shows the
plot, which would be used for quick plotting, and then leave Plot()
for more advanced plots.
About the variable with range: I was not thinking about relaxing the
requirement, but I suppose it would be a wanted feature. I'll write some
code for it. Maybe only in the plot() function (lower case). And yes, I
agree that a plot() function will be a good idea.
Yes, putting it only in plot() sounds good to me.
Ok.
Post by k***@public.gmane.org
Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Aaron Meurer
Post by k***@public.gmane.org
But I was thinking it would be best to have both modules and then a backend
for the old module in the new module. And maybe move the old module to
plotting.oldplot or leave the new module in plotting.newplot.
Post by Aaron Meurer
Post by k***@public.gmane.org
About the '3d' string - you are right it's a bad default. It's just that
contour was written first, but I'll change this now.
Cool. By the way, will it be possible in the future to call
something
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
like p.change_plot_type('contour') (only with a better name than that
:) and it will change it from 3d to a contour?
At the moment 3dsurface (not parametric) and contour are represented
by
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
different classes. It makes sense to merge them and add an option (actually
p = Plot(blah blah)
p[0].visualisation_method = '3d' or 'contour'
the name of the attribute may be other ('plot_type', 'projection',
...)
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Finally - I was squashing and rebasing this pull request quite a
bit.
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Now as
it's getting more attention I'll stop doing it, so you are free to make
changes if you are interested.
Great. This makes it easier to follow your progress.
Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
In [6]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi, pi))
In [7]: p.show()
No labeled objects found. Use label='...' kwarg on individual
plots.
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
warnings.warn("No labeled objects found. "
In [8]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y, -pi, pi),
'3d')
In [9]: p.show()
UserWarning: xscale is not supported in 3D matplotlib backend.
warnings.warn('xscale is not supported in 3D matplotlib
backend.')
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
UserWarning: axis_center is not supported in 3D matplotlib
backend.
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
warnings.warn('axis_center is not supported in 3D matplotlib backend.')
UserWarning: xscale is not supported in 3D matplotlib backend.
warnings.warn('xscale is not supported in 3D matplotlib
backend.')
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Aaron Meurer
Post by Aaron Meurer
Hi.
This looks great. For others, to run the examples, download the
examples script and put in the sympy directory. Then, checkout
Krastanov's branch (from the pull request). Then, run IPython,
and
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by Aaron Meurer
type %run examples.py. And then type p0.show(), p1.show(), etc. (up
to p4).
And if you just want to test the plotting of your own functions
in
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by Aaron Meurer
isympy, you have to run "from sympy.plotting.newplot import *",
or
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by Aaron Meurer
else it will use the old plotting. The syntax is
In [8]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x, -1, 1), (y,
-pi,
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by Aaron Meurer
pi),
'3d')
In [9]: p.show()
(if you don't add '3d' in this case, it will default to a
contour
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by Aaron Meurer
plot, which btw is maybe not the best default)
Aaron Meurer
Post by k***@public.gmane.org
The proposal that I made in
https://github.com/sympy/sympy/pull/673
may
or
may not became part of sympy but I like it and it's already
quite
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by Aaron Meurer
Post by k***@public.gmane.org
useful for
me.
Here are some examples. I would like to know what do you think. The
3d
stuff
runs only on the latest version of matplotlib _after_ fixing a bug
(mentioned in the commit history, but those will be squashed soon).
I didn't have any problems with it, though you do seem to have
found
a
bug in matplotlib. I would submit a pull request to them fixing it.
Aaron Meurer
Post by k***@public.gmane.org
The script to produce them is also attached (as the api is
probably
more
important than the visuals (the _series[index] stuff is just a
workaround
until getters are written)).
Regards
Stefan
--
You received this message because you are subscribed to the Google
Groups
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google
Groups
Post by k***@public.gmane.org
Post by Aaron Meurer
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to sympy+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Aaron Meurer
2011-11-13 20:19:34 UTC
Permalink
Post by k***@public.gmane.org
from sympy.plotting import plot # the function you proposed
from sympy.plotting import Plot # the old Plot with added deprecation
warning
from sympy.plotting.newplot import Plot # the new Plot
No complicated proxy object
So how soon do you expect to have something workable enough (i.e., the
API should be stable) to merge then? We'll hopefully release in
December or January when I get off of classes and have enough time to
do it.

Aaron Meurer
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to sympy+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
k***@public.gmane.org
2011-11-13 20:35:33 UTC
Permalink
Post by Aaron Meurer
Post by k***@public.gmane.org
from sympy.plotting import plot # the function you proposed
from sympy.plotting import Plot # the old Plot with added deprecation
warning
from sympy.plotting.newplot import Plot # the new Plot
No complicated proxy object
So how soon do you expect to have something workable enough (i.e., the
API should be stable) to merge then? We'll hopefully release in
December or January when I get off of classes and have enough time to
do it.
A stable api by the end of the month, and documentation before the
release. It's not much work, almost all is already done. It's just that
'almost all' = 'the interesting part' and it will be harder to find time
for the rest. But it will be ready before the release.

The api for noncartesian plots wont be ready for the release. But that
would be an addition to the current api, not a change.


Aaron Meurer
Post by Aaron Meurer
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to sympy+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Aaron Meurer
2011-11-14 16:36:27 UTC
Permalink
Post by Aaron Meurer
Post by k***@public.gmane.org
from sympy.plotting import plot # the function you proposed
from sympy.plotting import Plot # the old Plot with added deprecation
warning
from sympy.plotting.newplot import Plot # the new Plot
No complicated proxy object
So how soon do you expect to have something workable enough (i.e., the
API should be stable) to merge then?  We'll hopefully release in
December or January when I get off of classes and have enough time to
do it.
A stable api by the end of the month, and documentation before the release.
It's not much work, almost all is already done. It's just that 'almost all'
= 'the interesting part' and it will be harder to find time for the rest.
But it will be ready before the release.
The api for noncartesian plots wont be ready for the release. But that would
be an addition to the current api, not a change.
Awesome. Is there an issue for this, or just a pull request? If
there's not an issue, can you create one, and put the
milestone-release-0.7.2 tag on it, so that we don't forget about it
come release time?

Aaron Meurer
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to sympy+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
k***@public.gmane.org
2011-11-14 21:22:06 UTC
Permalink
Post by k***@public.gmane.org
Post by Aaron Meurer
Post by Aaron Meurer
Post by k***@public.gmane.org
from sympy.plotting import plot # the function you proposed
from sympy.plotting import Plot # the old Plot with added deprecation
warning
from sympy.plotting.newplot import Plot # the new Plot
No complicated proxy object
So how soon do you expect to have something workable enough (i.e., the
API should be stable) to merge then? We'll hopefully release in
December or January when I get off of classes and have enough time to
do it.
A stable api by the end of the month, and documentation before the
release.
Post by Aaron Meurer
It's not much work, almost all is already done. It's just that 'almost
all'
Post by Aaron Meurer
= 'the interesting part' and it will be harder to find time for the rest.
But it will be ready before the release.
The api for noncartesian plots wont be ready for the release. But that
would
Post by Aaron Meurer
be an addition to the current api, not a change.
Awesome. Is there an issue for this, or just a pull request? If
there's not an issue, can you create one, and put the
milestone-release-0.7.2 tag on it, so that we don't forget about it
come release time?
Just created one: 2845
http://code.google.com/p/sympy/issues/detail?id=2845&thanks=2845&ts=1321305364

Stefan
Post by k***@public.gmane.org
Aaron Meurer
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to sympy+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Vinzent Steinberg
2011-11-15 12:29:11 UTC
Permalink
Post by Aaron Meurer
Post by k***@public.gmane.org
Discontinuous functions may pose problems for the moment (none seen for the
moment, but this is mostly by chance).
As far as I can tell, this is a nontrivial problem to solve, as many
very good plotting systems choke on discontinuous functions.  Perhaps
there can be some kind of symbolic heuristic applied to find
discontinuities.
IIRC, discontinuities where the funtion approaches infinity (like 1/x
for x -> 0) can also be found numerically using Newton's method (with
phi(x) = x + f(x)/f'(x) for iteration).

Vinzent
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to sympy+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Ondřej Čertík
2011-11-15 15:19:55 UTC
Permalink
Hi Stefan,
Post by k***@public.gmane.org
The proposal that I made in https://github.com/sympy/sympy/pull/673 may or
may not became part of sympy but I like it and it's already quite useful for
me.
Here are some examples. I would like to know what do you think. The 3d stuff
runs only on the latest version of matplotlib _after_ fixing a bug
(mentioned in the commit history, but those will be squashed soon).
The script to produce them is also attached (as the api is probably more
important than the visuals (the _series[index] stuff is just a workaround
until getters are written)).
I like this a lot, and I would suggest to get this into sympy as a new
module, after fixing things that Aaron has pointed out. That way,
people can start using it and improving it by sending pull requests to
sympy.

I am +1 to the plot() function, that calls either the new or old
Plot() to do plotting. Or just use Plot and put it into a new module,
and eventually (later) simply switch the default sympy.Plot from old
to new. Either is fine with me.

Ondrej
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to sympy+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Roberto Colistete Jr.
2011-11-25 14:19:06 UTC
Permalink
Hi Stefan,

I am very interested in MatPlotLib use by SymPy and I hope it will
be soon included in public release of SymPy. I think MatPlotLib is
better than PyGLES to make 2D and 3D plots.

And part of my interest is that MatPlotLib 1.0.0 is now released to
Meego 1.2 Harmattan (Nokia N9/950), look at my annoucements :
http://forum.meego.com/showthread.php?t=5231
http://talk.maemo.org/showthread.php?p=1128672
It does not have interactive backend but can save plots in PNG, PDF,
etc, using 'savefig()'.

So my Nokia N9 has : IPython 0.10.2, SymPy 0.7.1, NumPy 1.4.1 and
MatPlotLib 1.0.0.

Regards,

Roberto
Post by k***@public.gmane.org
The proposal that I made in https://github.com/sympy/sympy/pull/673
may or may not became part of sympy but I like it and it's already
quite useful for me.
Here are some examples. I would like to know what do you think. The 3d
stuff runs only on the latest version of matplotlib _after_ fixing a
bug (mentioned in the commit history, but those will be squashed soon).
The script to produce them is also attached (as the api is probably
more important than the visuals (the _series[index] stuff is just a
workaround until getters are written)).
Regards
Stefan
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to sympy+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
k***@public.gmane.org
2011-11-25 23:31:56 UTC
Permalink
Hi,

The package versions you have should be sufficient to run the new plotting
code. The nokia N900 wont be performing very well with the 3d graphs but
otherwise it should be useful. I don't know how it will work on N950. You
may need Matplotlib 1.1.0 for some of the 3d stuff. And finally, the
plotting code wont be in 0.7.2 due in a few weeks. It'll probably get
included after the end of Google Code In.

You can download the code from my github pull request. There are some bugs
for the moment. And it's slow.

Regards
Stefan

On 25 November 2011 15:19, Roberto Colistete Jr. <
Post by Ondřej Čertík
Hi Stefan,
I am very interested in MatPlotLib use by SymPy and I hope it will be
soon included in public release of SymPy. I think MatPlotLib is better than
PyGLES to make 2D and 3D plots.
And part of my interest is that MatPlotLib 1.0.0 is now released to
http://forum.meego.com/**showthread.php?t=5231<http://forum.meego.com/showthread.php?t=5231>
http://talk.maemo.org/**showthread.php?p=1128672<http://talk.maemo.org/showthread.php?p=1128672>
It does not have interactive backend but can save plots in PNG, PDF, etc,
using 'savefig()'.
So my Nokia N9 has : IPython 0.10.2, SymPy 0.7.1, NumPy 1.4.1 and
MatPlotLib 1.0.0.
Regards,
Roberto
The proposal that I made in https://github.com/sympy/**sympy/pull/673<https://github.com/sympy/sympy/pull/673>may or may not became part of sympy but I like it and it's already quite
Post by k***@public.gmane.org
useful for me.
Here are some examples. I would like to know what do you think. The 3d
stuff runs only on the latest version of matplotlib _after_ fixing a bug
(mentioned in the commit history, but those will be squashed soon).
The script to produce them is also attached (as the api is probably more
important than the visuals (the _series[index] stuff is just a workaround
until getters are written)).
Regards
Stefan
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to sympy+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Loading...