Re: [Matplotlib-users] Saving as eps file shifts image?

2010-07-27 Thread Jae-Joon Lee
I tried a simple array (see the code below) but cannot reproduce the problem you reported. import matplotlib.pyplot as plt import numpy as np arr = np.zeros((11, 11), dtype=d) arr[3,3]=1 im = plt.imshow(arr, interpolation=nearest, origin=lower) cont = plt.contour(arr, levels=[0.5])

[Matplotlib-users] Case stories of software including Matplotlib

2010-07-27 Thread German Ocampo
Good morning Do you know where I could get examples of case stories about commercial or open source software that has been developed using the Matplotlib library? Many Thanks German -- The Palm PDK Hot Apps Program

Re: [Matplotlib-users] error AttributeError: 'module' object has no attribute 'use'

2010-07-27 Thread Jae-Joon Lee
On Sun, Jul 25, 2010 at 3:55 PM, Satish Raghunath qgu...@my.utsa.edu wrote:   AttributeError: 'module' object has no attribute 'use' It means that the module object (matplotlib) has no attribute named use. This kind of error is often encountered when wrong module is imported as matplotlib. Try

[Matplotlib-users] matplotlib subplot2grid and projection

2010-07-27 Thread bbarton
Hi Everyone, I am working on a weather conditions plot containing wind speed and direction. For that I use a custom polar projection. Now updated from Matplotlib 0.99 to 1.0 to use the subplot2grid feature. Now, after trying and searching for hours, I seem to be too dumb to combine my custom

Re: [Matplotlib-users] matplotlib.test() no errors, but $nosetest matplotlib.tests - errors and failure?

2010-07-27 Thread Michael Droettboom
Of course, we'll prefer to see all of the tests pass... I'm surprised the two modes of running the tests gives different results. Are you sure they are running the same python? Does python `which nosetests` matplotlib.tests give you the same result as nosetests matplotlib.tests ?

Re: [Matplotlib-users] Case stories of software including Matplotlib

2010-07-27 Thread Benjamin Root
On Tue, Jul 27, 2010 at 6:01 AM, German Ocampo geroca...@gmail.com wrote: Good morning Do you know where I could get examples of case stories about commercial or open source software that has been developed using the Matplotlib library? Many Thanks German German, Interesting idea.

Re: [Matplotlib-users] Case stories of software including Matplotlib

2010-07-27 Thread German Ocampo
Benjamin In my case, I'm in the process of selling Matplotlib at the interior of the company for that I work, and it will be a strong point if I could get references or recommendations from commercial software or institutions that had success using Matplotlib. In my point of view, the idea to

Re: [Matplotlib-users] matplotlib.test() no errors, but $nosetest matplotlib.tests - errors and failure?

2010-07-27 Thread Michael Droettboom
Hmm... surprisingly, I am actually able to reproduce this sort of behaviour here. I'll look into it further. Mike On 07/27/2010 09:49 AM, Michael Droettboom wrote: Of course, we'll prefer to see all of the tests pass... I'm surprised the two modes of running the tests gives different

Re: [Matplotlib-users] matplotlib subplot2grid and projection

2010-07-27 Thread Jae-Joon Lee
Thanks for reporting. This is now fixed in r8581(maint branch) and r8582(trunk). Meanwhile, you may define your own subplot2grid function and use it instead. from matplotlib.gridspec import GridSpec from matplotlib.pyplot import gcf, draw_if_interactive, delaxes def mysubplot2grid(shape, loc,

[Matplotlib-users] PolyCollection API

2010-07-27 Thread Mathew Yeates
why doesn't this work? xs=[0,0,8,8] ys=[0,8,8,0] verts=zip(xs,ys) poly = PolyCollection(verts) I tried poly = PolyCollection([verts]) but that doesn't work either -Mathew -- The Palm PDK Hot Apps Program offers

Re: [Matplotlib-users] Case stories of software including Matplotlib

2010-07-27 Thread ms
On 27/07/10 15:05, Benjamin Root wrote: On Tue, Jul 27, 2010 at 6:01 AM, German Ocampogeroca...@gmail.com wrote: Good morning Do you know where I could get examples of case stories about commercial or open source software that has been developed using the Matplotlib library? Many Thanks

Re: [Matplotlib-users] PolyCollection API

2010-07-27 Thread Mathew Yeates
I installed matplotlib 1.0 and now I get a different error s=[0,0,8,8] ys=[0,8,8,0] verts=zip(xs,ys) poly = PolyCollection(verts) fails at line 587 in collections because xy = array([0, 0]) # xy.shape = (2,) and line 587 says xy = np.concatenate([xy, np.zeros((1,2))]) What do I do? -Mathew On

Re: [Matplotlib-users] Documentation error/bug?

2010-07-27 Thread Friedrich Romstedt
2010/7/26 Benjamin Root ben.r...@ou.edu: After some reading of sphinx documentation, it appears to be a bug with sphinx (or actually, smartypants) because it should not be doing this sort of interpretation within a docstring.  Anyway, supposedly the workaround is to put double backticks around

Re: [Matplotlib-users] Fit a plane to a set of xyz points

2010-07-27 Thread Friedrich Romstedt
2010/7/26 Mathew Yeates mat.yea...@gmail.com: Is there a simple function call for this? And finding the distance of a point to the plane? Hmm, when you are interested in the z distance alone, it should be a matrix equation: Z = X * m_x + Y * m_y + 1 * n Meaning you can invert it with

Re: [Matplotlib-users] PolyCollection API

2010-07-27 Thread Eric Firing
On 07/27/2010 08:14 AM, Mathew Yeates wrote: I installed matplotlib 1.0 and now I get a different error s=[0,0,8,8] ys=[0,8,8,0] verts=zip(xs,ys) poly = PolyCollection(verts) fails at line 587 in collections because xy = array([0, 0]) # xy.shape = (2,) and line 587 says xy =

Re: [Matplotlib-users] PolyCollection API

2010-07-27 Thread Tony S Yu
On Jul 27, 2010, at 2:14 PM, Mathew Yeates wrote: I installed matplotlib 1.0 and now I get a different error s=[0,0,8,8] ys=[0,8,8,0] verts=zip(xs,ys) poly = PolyCollection(verts) fails at line 587 in collections because xy = array([0, 0]) # xy.shape = (2,) and line 587 says xy =

Re: [Matplotlib-users] Case stories of software including Matplotlib

2010-07-27 Thread Tony S Yu
On Jul 27, 2010, at 1:31 PM, ms wrote: On 27/07/10 15:05, Benjamin Root wrote: On Tue, Jul 27, 2010 at 6:01 AM, German Ocampogeroca...@gmail.com wrote: Good morning Do you know where I could get examples of case stories about commercial or open source software that has been developed

Re: [Matplotlib-users] PolyCollection API

2010-07-27 Thread Mathew Yeates
I still get the error ValueError: arrays must have same number of dimensions at line 587 in collections.py This is on Windows. On Tue, Jul 27, 2010 at 11:42 AM, Eric Firing efir...@hawaii.edu wrote: On 07/27/2010 08:14 AM, Mathew Yeates wrote: I installed matplotlib 1.0 and now I get a

[Matplotlib-users] Axes3D depth problem

2010-07-27 Thread copyrights
Hallo, I got a depth problem with Axes3D. I made a plot_surface and add 2 Circle object with add_patch and mpl_toolkits.mplot3d.art3d.patch_2d_to_3d. The problem is that the circles are always in front. I upload a picture here http://yfrog.com/nd3dproblemp . The gui is rotatable, so I can't

Re: [Matplotlib-users] PolyCollection API

2010-07-27 Thread Eric Firing
On 07/27/2010 08:55 AM, Mathew Yeates wrote: I still get the error ValueError: arrays must have same number of dimensions at line 587 in collections.py I think you are not actually doing what you think you are doing, and what was explained by Tony. Try the attached script. Eric This is

Re: [Matplotlib-users] Axes3D depth problem

2010-07-27 Thread Benjamin Root
On Tue, Jul 27, 2010 at 2:25 PM, copyrig...@gmx.de wrote: Hallo, I got a depth problem with Axes3D. I made a plot_surface and add 2 Circle object with add_patch and mpl_toolkits.mplot3d.art3d.patch_2d_to_3d. The problem is that the circles are always in front. I upload a picture here

Re: [Matplotlib-users] PolyCollection API

2010-07-27 Thread Mathew Yeates
I tried xs=[0,0,8,8] ys=[0,8,8,0] verts=zip(xs,ys) poly = PolyCollection([verts]) already but it doesn't work on line 581 of collections.py there is for xy in verts: but verts=[[(0, 0), (0, 8), (8, 8), (8, 0)]] i.e. a list with a single element. so the loop happens only once -Mathew On

Re: [Matplotlib-users] PolyCollection API

2010-07-27 Thread Eric Firing
On 07/27/2010 09:43 AM, Mathew Yeates wrote: I tried xs=[0,0,8,8] ys=[0,8,8,0] verts=zip(xs,ys) poly = PolyCollection([verts]) already but it doesn't work Yes, I saw you say that, but---did you actually try running the script I attached? Please run it from the command line (python

Re: [Matplotlib-users] PolyCollection API

2010-07-27 Thread John Hunter
On Tue, Jul 27, 2010 at 2:50 PM, Eric Firing efir...@hawaii.edu wrote: On 07/27/2010 09:43 AM, Mathew Yeates wrote: I tried xs=[0,0,8,8] ys=[0,8,8,0] verts=zip(xs,ys) poly = PolyCollection([verts]) already but it doesn't work Yes, I saw you say that, but---did you actually try running

Re: [Matplotlib-users] Axes3D depth problem

2010-07-27 Thread copyrights
Hallo Ben Root, I put together some snippets #CODE import matplotlib.pyplot as plt from matplotlib.patches import Circle import mpl_toolkits.mplot3d.art3d as art3d from mpl_toolkits.mplot3d import Axes3D import numpy import matplotlib step = 0.04 maxval = 1.0 fig = plt.figure() ax =

Re: [Matplotlib-users] Fit a plane to a set of xyz points

2010-07-27 Thread Joe Kington
On Tue, Jul 27, 2010 at 1:37 PM, Friedrich Romstedt friedrichromst...@gmail.com wrote: 2010/7/26 Mathew Yeates mat.yea...@gmail.com: Is there a simple function call for this? And finding the distance of a point to the plane? Hmm, when you are interested in the z distance alone, it should

Re: [Matplotlib-users] PolyCollection API

2010-07-27 Thread Mathew Yeates
your code works fine. But I thought it wasnt working because when I do zs=[0,0.1,0.2,0.3] #pdb.set_trace() poly = PolyCollection([verts]) ax.add_collection3d(poly,zs=zs) I just get a flat plane. On Tue, Jul 27, 2010 at 12:50 PM, Eric Firing efir...@hawaii.edu wrote: On 07/27/2010 09:43 AM,

Re: [Matplotlib-users] Axes3D depth problem

2010-07-27 Thread Benjamin Root
On Tue, Jul 27, 2010 at 3:10 PM, copyrig...@gmx.de wrote: Hallo Ben Root, I put together some snippets #CODE import matplotlib.pyplot as plt from matplotlib.patches import Circle import mpl_toolkits.mplot3d.art3d as art3d from mpl_toolkits.mplot3d import Axes3D import numpy

Re: [Matplotlib-users] PolyCollection API

2010-07-27 Thread Mathew Yeates
My bad. Since I wanted to draw a plane, I thought I wanted to use a polygon. Instead, using plot_surface I get what I want. -Mathew On Tue, Jul 27, 2010 at 1:40 PM, Mathew Yeates mat.yea...@gmail.com wrote: your code works fine. But I thought it wasnt working because when I do