Re: [matplotlib-devel] Updating MPlot3D to a more recent matplotlib.

2009-03-05 Thread Johann Cohen-Tanugi
wouaouh. if I had known that sumpy had this functionality, I would 
have downloaded it ages ago. This is a good example of justified 
'taylorisation', IMHO.
Big +1 on seing this moved from sympy to matplotlib. I am not expert at 
coding guis et al, but if you need reviewers/testers or doc writers, I 
will be happy to give a hand (even two).
best,
Johann

Ondrej Certik wrote:
> Hi,
>
> On Wed, Mar 4, 2009 at 11:38 AM, Jonathan Taylor
>  wrote:
>   
>> Great.  I applied your patch and pushed it to the web repository.
>>
>> I agree, that some more serious refactoring might be good.  I have
>> been leaving comments throughout the code with my thoughts on this.
>> 
>
> John just pointed me to this thread, so I just wanted to mention that
> we have 3d plots in sympy, that are pure python and use pyglet, here
> are some examples and docs:
>
> http://wiki.sympy.org/wiki/Plotting_Module
>
> http://docs.sympy.org/modules/plotting.html
>
> and if anyone would be interested in taking the code and use it for
> some of the 3D stuff that you want to do, I would fully support it.
> Ideally, if any of you would take it and maintain it, so that we don't
> have to, it'd be really awesome. We would like to just concentrate on
> symbolic manipulation with sympy and leave all the plotting to
> matplotlib, or other packages, if needed.
>
> Let me know if you are interested, we can help with integrating it.
>
> Ondrej
>
> --
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> ___
> Matplotlib-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>   

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Updating MPlot3D to a more recent matplotlib.

2009-03-05 Thread Rob Clewley
On Thu, Mar 5, 2009 at 5:14 AM, Johann Cohen-Tanugi
 wrote:
> wouaouh. if I had known that sumpy had this functionality, I would
> have downloaded it ages ago. This is a good example of justified
> 'taylorisation', IMHO.
> Big +1 on seing this moved from sympy to matplotlib. I am not expert at
> coding guis et al, but if you need reviewers/testers or doc writers, I
> will be happy to give a hand (even two).
> best,
> Johann

Yes, I didn't know that either. But it's not clear if I can plot
discrete data using this interface - at least the examples on the wiki
make it look that way. I'm also +1 on seeing it moved into mpl, but I
don't know if the APIs and dependencies are too dissimilar to make it
work.

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Updating MPlot3D to a more recent matplotlib.

2009-03-05 Thread Ondrej Certik
On Thu, Mar 5, 2009 at 10:02 AM, Rob Clewley  wrote:
> On Thu, Mar 5, 2009 at 5:14 AM, Johann Cohen-Tanugi
>  wrote:
>> wouaouh. if I had known that sumpy had this functionality, I would
>> have downloaded it ages ago. This is a good example of justified
>> 'taylorisation', IMHO.
>> Big +1 on seing this moved from sympy to matplotlib. I am not expert at
>> coding guis et al, but if you need reviewers/testers or doc writers, I
>> will be happy to give a hand (even two).
>> best,
>> Johann
>
> Yes, I didn't know that either. But it's not clear if I can plot
> discrete data using this interface - at least the examples on the wiki

I am not sure if I understand your question, but It only plots
discrete data --- it takes some sympy expression, evaluates it on a
discrete grid and plots it. So you would just take the plotting stuff.

> make it look that way. I'm also +1 on seeing it moved into mpl, but I
> don't know if the APIs and dependencies are too dissimilar to make it
> work.

There are no dependencies besides pyglet (e.g.  it does not depend on
sympy, or if it does, it can be trivially fixed).

As to the API, just look into sympy/plotting. And play with the 3D
plots in sympy to see how it looks like and how fast/slow it is (I
think it's pretty fast). Then you will have to decide, if it's easier
for you to implement something from scratch, or take our stuff.

As I said, I would love if mpl has similar capability, so that we can
get rid of this from sympy. If you decide to go this way, I (and other
sympy developers) will be at hand to help you integrate it.

Ondrej

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Updating MPlot3D to a more recent matplotlib.

2009-03-05 Thread Rob Clewley
>> Yes, I didn't know that either. But it's not clear if I can plot
>> discrete data using this interface - at least the examples on the wiki
>
> I am not sure if I understand your question, but It only plots
> discrete data --- it takes some sympy expression, evaluates it on a
> discrete grid and plots it. So you would just take the plotting stuff.

OK, but it wasn't clear from the example that I could plot a 3D array
of arbitrary data points. The way that you put together the demo plots
involved a symbolic function that would be called to generate the
points. Maybe you could add an example that plots some arbitrary data
that has been imported from a text file?

>> make it look that way. I'm also +1 on seeing it moved into mpl, but I
>> don't know if the APIs and dependencies are too dissimilar to make it
>> work.
>
> There are no dependencies besides pyglet (e.g.  it does not depend on
> sympy, or if it does, it can be trivially fixed).

Well, I meant more like is there a design dependency that is
incompatible with mpl. I'll shut up now because I know zilch about
mpl's internals!

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Updating MPlot3D to a more recent matplotlib.

2009-03-05 Thread Ondrej Certik
On Thu, Mar 5, 2009 at 10:15 AM, Rob Clewley  wrote:
>>> Yes, I didn't know that either. But it's not clear if I can plot
>>> discrete data using this interface - at least the examples on the wiki
>>
>> I am not sure if I understand your question, but It only plots
>> discrete data --- it takes some sympy expression, evaluates it on a
>> discrete grid and plots it. So you would just take the plotting stuff.
>
> OK, but it wasn't clear from the example that I could plot a 3D array
> of arbitrary data points. The way that you put together the demo plots

As I understand it, it plots triangles and/or wireframe in the end.
Currently I think our plotting mainly works with surfaces. How can you
plot a 3D array of arbitrary data points? You need to convert it to
some triangles first, e.g. do you want to plot contours (isosurfaces)?
Or do you want to cut a plane in your 3D data points and plot that
plane?

> involved a symbolic function that would be called to generate the
> points. Maybe you could add an example that plots some arbitrary data
> that has been imported from a text file?
>
>>> make it look that way. I'm also +1 on seeing it moved into mpl, but I
>>> don't know if the APIs and dependencies are too dissimilar to make it
>>> work.
>>
>> There are no dependencies besides pyglet (e.g.  it does not depend on
>> sympy, or if it does, it can be trivially fixed).
>
> Well, I meant more like is there a design dependency that is
> incompatible with mpl. I'll shut up now because I know zilch about
> mpl's internals!

The best thing is to just look into our sources, it's pretty well documented.

Ondrej

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Updating MPlot3D to a more recent matplotlib.

2009-03-05 Thread Rob Clewley
On Thu, Mar 5, 2009 at 10:39 AM, Ondrej Certik  wrote:

>> OK, but it wasn't clear from the example that I could plot a 3D array
>> of arbitrary data points. The way that you put together the demo plots
>
> As I understand it, it plots triangles and/or wireframe in the end.
> Currently I think our plotting mainly works with surfaces. How can you
> plot a 3D array of arbitrary data points?

E.g., by plotting a dot at the coordinate (x,y,z).

> You need to convert it to
> some triangles first, e.g. do you want to plot contours (isosurfaces)?
> Or do you want to cut a plane in your 3D data points and plot that
> plane?
>

If I have a set of scalar sample data on a rectangular 2D mesh that I
want to plot in the 3D I'd want a simple wireframe rectangular surface
plot. Can it do that?

-Rob

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Updating MPlot3D to a more recent matplotlib.

2009-03-05 Thread Ondrej Certik
On Thu, Mar 5, 2009 at 11:44 AM, Rob Clewley  wrote:
> On Thu, Mar 5, 2009 at 10:39 AM, Ondrej Certik  wrote:
>
>>> OK, but it wasn't clear from the example that I could plot a 3D array
>>> of arbitrary data points. The way that you put together the demo plots
>>
>> As I understand it, it plots triangles and/or wireframe in the end.
>> Currently I think our plotting mainly works with surfaces. How can you
>> plot a 3D array of arbitrary data points?
>
> E.g., by plotting a dot at the coordinate (x,y,z).

I guess more like a small ball in opengl. I think this can be done
directly in pyglet.

>
>> You need to convert it to
>> some triangles first, e.g. do you want to plot contours (isosurfaces)?
>> Or do you want to cut a plane in your 3D data points and plot that
>> plane?
>>
>
> If I have a set of scalar sample data on a rectangular 2D mesh that I
> want to plot in the 3D I'd want a simple wireframe rectangular surface
> plot. Can it do that?

Yes, that can be done. I can post a simple example, but right now I am
urgently working on getting mayavi2 working in the offline mode in the
Sage notebook for my presentation on Friday, so I'll get back to this
later.

Ondrej

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Updating MPlot3D to a more recent matplotlib.

2009-03-05 Thread Gael Varoquaux
On Thu, Mar 05, 2009 at 11:44:16AM -0500, Rob Clewley wrote:
> If I have a set of scalar sample data on a rectangular 2D mesh that I
> want to plot in the 3D I'd want a simple wireframe rectangular surface
> plot. Can it do that?

My experience from trying to design a simple API to do simple 3D plotting
of data stored as numpy array is that everybody has his own usecase (that
he often believes is universal and obvious), and that designing an API to
make a particular usecase simple is easy, but keeping reasonnably
versatile and powerful API while making it easy to use for all the
'simple' usecases is terribly hard.

That said, Mayavi2 is incredibly powerful and with time (thanks to
feedback from users) we are getting better at having a simple and
powerful API, and a documentation that tries to 'solve your problem'.

I know Mayavi2 has its problems (mainly difficult to instal because of
historical reasons, and big dependencies), but for non trivial 3D
plotting problems, especially with large datasets, keep it in mind. (It
also works well for trivial problems, it is just that if it is not
packaged, I understand that the hassle of installing it may be higher
than the gain of using it).

By the way, I am happy to take feedback on any problems with Mayavi2 (I
am not pretending I will solve them :>). I believe that we have made huge
progress in usability recently, and that it is no longer a monster hard
to master and useless for simple problems, but I may be mistaken.

Cheers,

Gaël

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Updating MPlot3D to a more recent matplotlib.

2009-03-05 Thread Gael Varoquaux
On Thu, Mar 05, 2009 at 07:03:00PM +0100, Cohen-Tanugi Johann wrote:
> Nevertheless, I hate to think of matplotlib sending people to mayavi2 each 
> time 3D plotting is needed. Basic functionalities built-in would still be 
> highly desirable.

Absolutely. I think we need basic 3D plotting functionnality that work
without any 3D rendering library, both for robustess and for simplicity.

I used to think different, because I believe that this approach is bound
to fail on anything but very simple problems (my experience with gnuplot
:>). I fear people are going to try and pull too far the simple 3D
implementation.

Nevertheless, it would be great to have some 3D in matplotlib, for easier
mixing of 2D and 3D (I do this with Mayavi2 by saving to a temporary
file, loading the result with matplotlib's imread, and displaying it with
an imshow -- ugly!), and to have backend-universal, robust, 3D plotting.

Gaël

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel