[matplotlib-devel] zdir and offset features for 3d contourf

2011-01-13 Thread Benjamin Root
A fellow student approached me today wanting to know if matplotlib was able
to produce a certain kind of 3d plot where a filled contour was placed on
one of the axes panels.  I knew it was possible with regular contours, but
was surprised when I realized that the same feature wasn't available for
contourf.  So I wrote a patch to add that feature (and clean up a few
documentation-related things).  I also added an example script with
examples/mplot3d/contourf3d_demo2.py.

This is the image produced by the example:
http://dl.dropbox.com/u/7325604/newcontourf3d.png

This was committed in r8915.

Enjoy!
Ben Root
--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] zdir and offset features for 3d contourf

2011-01-13 Thread Eric Firing
On 01/13/2011 09:08 AM, Benjamin Root wrote:
> A fellow student approached me today wanting to know if matplotlib was
> able to produce a certain kind of 3d plot where a filled contour was
> placed on one of the axes panels.  I knew it was possible with regular
> contours, but was surprised when I realized that the same feature wasn't
> available for contourf.  So I wrote a patch to add that feature (and
> clean up a few documentation-related things).  I also added an example
> script with examples/mplot3d/contourf3d_demo2.py.
>
> This is the image produced by the example:
> http://dl.dropbox.com/u/7325604/newcontourf3d.png

Nice!  Thank you!

On a related note, a considerable fraction of the mpl bug tickets on 
sourceforge are for mplot3d.  For a while I was assigning them to 
Reinier Heeres, but I think he has been unable to get to them.  I 
suspect some are actually quite simple to fix, and others may already 
have been fixed by work you have been doing on mplot3d.  If you get a 
chance, please look through them and close any that can be closed.  If 
there are any that you think you will be able to address, but not 
immediately, please assign them to yourself.

Thanks.

Eric

>
> This was committed in r8915.
>
> Enjoy!
> Ben Root

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] [Python-modules-team] Bug#608942: python-matplotlib-doc: spaces in arguments of Sphinx ":param" field

2011-01-13 Thread Sandro Tosi
Hi,
Jakub spotted this problem with mpl and new sphinx:

On Tue, Jan 4, 2011 at 20:47, Jakub Wilk  wrote:
> In Sphinx 1.0, ":param" field can accept up to 2 whitespace-separated
> arguments. Unforunately, this new feature breaks a bit documentation of some
> stuff in the mpl_toolkits.axes_grid.axes_divider module, which is using
> spaces for its own purpose:
>
> $ grep -E -r 'param [^ ]* [^ ]*:' .
> ./lib/mpl_toolkits/axes_grid/axes_divider.py:        :param nx, nx1:
> Integers specifying the column-position of the
> ./lib/mpl_toolkits/axes_grid/axes_divider.py:        :param ny, ny1: same as
> nx and nx1, but for row positions.
> ./lib/mpl_toolkits/axes_grid/axes_divider.py:        :param nx, nx1:
> Integers specifying the column-position of the
> ./lib/mpl_toolkits/axes_grid/axes_divider.py:        :param ny, ny1: same as
> nx and nx1, but for row positions.
> ./lib/mpl_toolkits/axes_grid/axes_divider.py:        :param nx, nx1:
> Integers specifying the column-position of the
> ./lib/mpl_toolkits/axes_grid/axes_divider.py:        :param ny, ny1: same as
> nx and nx1, but for row positions.
>
> [0] See bottom of:
> http://sphinx.pocoo.org/domains.html#info-field-lists

That generates pages like this:

locate(nx, ny, nx1=None, ny1=None, renderer=None)¶
Parameters: 

* nx1 (nx,) – Integers specifying the column-position of the
cell. When nx1 is None, a single nx-th column is specified. Otherwise
location of columns spanning between nx to nx1 (but excluding nx1-th
column) is specified.
* ny1 (ny,) – same as nx and nx1, but for row positions.

With the attached patch, I removed the space between those arguments,
but at least it generates a correct list even tho it's a bit visually
unpleasant.

Cheers,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi


50_bts608942_spaces_in_param_args.patch
Description: application/mbox
--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Path.to_polygons problem

2011-01-13 Thread Lionel Roubeyrie
Hi all,
Using the last 1.0.1 matplotlib version,sometimes exporting paths to
polygons gives wrong results like here (paths come from a
tricontourset) :
In [94]: path
Out[94]:
Path([[ 172.0079229   -43.79390934]
 [ 171.97660793  -43.785 ]
 [ 171.96206864  -43.78273625]
 [ 171.959   -43.78114859]
 ...
 [ 171.593   -44.00678244]
 [ 171.64906502  -44.01  ]
 [ 171.654   -44.01077106]
 [ 171.7068607   -44.0160044 ]], [1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2
 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2])
In [95]: path.vertices.shape
Out[95]: (210, 2)

but to_polygons gives another result :
In [98]: path.to_polygons()
Out[98]:
[array([[ 172.0079229 ,  -43.79390934],
   [ 171.86039224,  -43.65  ],
   [ 172.081 ,  -43.54450289],
   [ 172.386 ,  -43.57010293],
   [ 172.60631978,  -43.67753099],
   [ 172.59231502,  -43.71219961],
   [ 172.325 ,  -43.78095532],
   [ 172.02  ,  -43.79497729]]),
 array([[ 171.715 ,  -44.0160044 ],
   [ 173.02676111,  -43.92  ],
   [ 172.935 ,  -43.53340591],
   [ 171.40281884,  -43.70029758],
   [ 171.37760645,  -43.94389688],
   [ 171.54044973,  -44.0037666 ],
   [ 171.7068607 ,  -44.0160044 ],
   [ 171.7068607 ,  -44.0160044 ]])]

Cheers

-- 
Lionel Roubeyrie
lionel.roubey...@gmail.com
http://youarealegend.blogspot.com

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Recent sphinx and documentation images output format

2011-01-13 Thread Sandro Tosi
Hi,
as per recent sphinx (I got 1.0.6 where, and with 1.0.1 it worked
fine), the image 'formats' is loaded as a unicode object, and so it's
no more a str as previously identified in
lib/matplotlib/sphinxext/plot_directive.py: the attached patch make
the doc be buildable again with 1.0.6 and should be backportable.

Cheers,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi


60_doc_output_format.patch
Description: application/mbox
--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel