Re: [Matplotlib-users] zero division: warning and exception

2009-05-14 Thread Armin Moser
darkside schrieb: > Hi list, > I have to make a division that sometimes yields and inf, and I want to > replace it by 0. > I have try this: > --- > import pylab as p > p.seterr(divide='raise') > l = array vector defined along the program > try: >

[Matplotlib-users] APLpy 0.9.1 Release

2009-05-14 Thread Astronomical Python
We are pleased to announce the release of APLpy 0.9.1, which includes bug fixes, improvements, and new features. APLpy is a python module that makes it easy to interactively produce publication-quality plots of astronomical images in FITS format. More details are available at http

Re: [Matplotlib-users] zero division: warning and exception

2009-05-14 Thread John Hunter
On Thu, May 14, 2009 at 7:26 PM, darkside wrote: > Hi list, > I have to make a division that sometimes yields and inf, and I want to > replace it by 0. > I have try this: > --- > import pylab as p > p.seterr(divide='raise') > l = array vector defined along the p

Re: [Matplotlib-users] the problem about axe

2009-05-14 Thread John Hunter
On Thu, May 14, 2009 at 7:59 PM, GoogleWind wrote: > > Yeah, Thank you. > This works. When I set aspect='auto', the im will not changed when I zoom in > or out.  However another problem appears. When I changed the size of the > frame. The length to width ratio is changed. So the map get an unexpec

Re: [Matplotlib-users] the problem about axe

2009-05-14 Thread GoogleWind
Yeah, Thank you. This works. When I set aspect='auto', the im will not changed when I zoom in or out. However another problem appears. When I changed the size of the frame. The length to width ratio is changed. So the map get an unexpected shape. Is there other suggestion to avoid this. Huang. -

[Matplotlib-users] zero division: warning and exception

2009-05-14 Thread darkside
Hi list, I have to make a division that sometimes yields and inf, and I want to replace it by 0. I have try this: --- import pylab as p p.seterr(divide='raise') l = array vector defined along the program try: a = (dr*R*dl)/(1.-((R0/R)*p.sin(l))**2

Re: [Matplotlib-users] Annotations with pan / zoom

2009-05-14 Thread Ryan May
On Thu, May 14, 2009 at 4:58 PM, Jae-Joon Lee wrote: > > > > You can't do this using the existing support for clipping artists? I was > > planning on cooking up an example that did just that, but haven't yet > found > > the time. > > What I want (and what I think is desirable) is that the annota

Re: [Matplotlib-users] Annotations with pan / zoom

2009-05-14 Thread Jae-Joon Lee
> > You can't do this using the existing support for clipping artists?  I was > planning on cooking up an example that did just that, but haven't yet found > the time. What I want (and what I think is desirable) is that the annotation should be drawn when (and only when) the xy coordinate is insid

Re: [Matplotlib-users] Annotations with pan / zoom

2009-05-14 Thread Ryan May
On Thu, May 14, 2009 at 2:03 PM, Jae-Joon Lee wrote: > On Thu, May 14, 2009 at 4:36 AM, Ben Coppin wrote: > > Hi, > > > > I've added annotations to a graph I am producing using matplotlib. The > > annotations work fine, but when you zoom and pan, the annotations move > off > > the edge of the ch

Re: [Matplotlib-users] Annotations with pan / zoom

2009-05-14 Thread Jae-Joon Lee
On Thu, May 14, 2009 at 4:36 AM, Ben Coppin wrote: > Hi, > > I've added annotations to a graph I am producing using matplotlib. The > annotations work fine, but when you zoom and pan, the annotations move off > the edge of the chart and are still visible while they're in the main TK > window. Does

Re: [Matplotlib-users] One more question regarding to boxplotting

2009-05-14 Thread Jouni K . Seppänen
Gökhan SEVER writes: > Still a question stays in my mind: How do you decribe box-whisker plots in > your writing while using matplotlib's boxplot command? It uses 25, 50, 75th > percentiles of the data for sure, but apart from what I expected whiskers > are not at 5th, and 95th percentiles of the

Re: [Matplotlib-users] Canvas in wx.ScrolledPanel

2009-05-14 Thread Thomas Coudrat
Thank you gregor, it is now doing exactly what I want ! Thomas. On Thu, May 14, 2009 at 5:12 AM, Gregor Thalhammer < gregor.thalham...@gmail.com> wrote: > Thomas Coudrat schrieb: > >> Hello list, >> >> I am new here an i need help on something : I am using Matplotlib in the >> wxPython GUI, and

[Matplotlib-users] grayscale function

2009-05-14 Thread darkside
Hello, First of all, I'm so sorry if I make a silly question or if it's explained anywhere, buy I can't find help. I have to do a grayscale figure for the function show in fig1, using a density function, and obtain the picture from fig2. I have tried a lot of things, but at the end I don't know ho

[Matplotlib-users] A request for code critique

2009-05-14 Thread Gökhan SEVER
Hello, After solving the boxplotting mystery, and figuring out how to change the mouse hover reading sensitivities, I have finished my small script which creates boxplots from a given file. I can call it either by issueing ./splot.py file or from inside ipython -pylab with run command. However I s

Re: [Matplotlib-users] One more question regarding to boxplotting

2009-05-14 Thread Gökhan SEVER
Hello, I have finally solved this riddle while reading the source code of boxplot in axes.py file. And yes whisker plotting is done different than I expect. When I assigned "whis" keyword to 3.0 the lower whisker is plotted on the right spot. And Josh, yes you were right, it did plot the lower whi

Re: [Matplotlib-users] the problem about axe

2009-05-14 Thread John Hunter
On Thu, May 14, 2009 at 8:44 AM, John Hunter wrote: > I'm not 100% what problem you are describing, but my hunch is that you > want aspect='equal' as a kwarg to imshow. Sorry, I meant aspect='auto' JDH -- The NEW KODAK

Re: [Matplotlib-users] the problem about axe

2009-05-14 Thread John Hunter
On Wed, May 13, 2009 at 7:50 PM, GoogleWind wrote: > > hello everyone, > > I have use maplotlib to show an image. the image is a map. > The problem is when I zoom in the map, The extent of self.ax changes to fix > my selected. However, I want the extent of self.ax stand unchanged. Only the > map's

[Matplotlib-users] the problem about axe

2009-05-14 Thread GoogleWind
hello everyone, I have use maplotlib to show an image. the image is a map. The problem is when I zoom in the map, The extent of self.ax changes to fix my selected. However, I want the extent of self.ax stand unchanged. Only the map's extent changed. Is there any suggestion? self.fig = F

[Matplotlib-users] Sublots in several figures

2009-05-14 Thread Stefanie Lück
Hi! I have 3 line charts which I would like to add one by one in a Figure() (back-to-back) to a wxPython Scrollpanel . I tried this code but all 3 charts are allways put together in each figure. How can I add them seperate in one figure? Thanks in advance! The data files are attached. Stefanie

Re: [Matplotlib-users] Canvas in wx.ScrolledPanel

2009-05-14 Thread Gregor Thalhammer
Thomas Coudrat schrieb: > Hello list, > > I am new here an i need help on something : I am using Matplotlib in > the wxPython GUI, and i am trying to draw a BIG canvas, in a SMALL > window, which would be scrollable. > My implementation works if i use simple text too long for the size of > the w

[Matplotlib-users] Annotations with pan / zoom

2009-05-14 Thread Ben Coppin
Hi, I've added annotations to a graph I am producing using matplotlib. The annotations work fine, but when you zoom and pan, the annotations move off the edge of the chart and are still visible while they're in the main TK window. Does anyone know of a way to make the annotations disappear when th

Re: [Matplotlib-users] contour overlapping

2009-05-14 Thread Armin Moser
Sebastian Busch schrieb: > Armin Moser wrote: >> Sebastian Busch wrote: >>> ... >>> array([list(a[i,:i])+list(b[i,i:]) for i in range(a.shape[0])]) >> It seems that I did not understand what you tried to reach. >> ... > > Sorry. I wanted to do the same as Matthias -- taking his example: I meant I

Re: [Matplotlib-users] contour overlapping

2009-05-14 Thread Sebastian Busch
Armin Moser wrote: > Sebastian Busch wrote: >> ... >> array([list(a[i,:i])+list(b[i,i:]) for i in range(a.shape[0])]) > It seems that I did not understand what you tried to reach. > ... Sorry. I wanted to do the same as Matthias -- taking his example: = from scipy import ones, array matrix1

Re: [Matplotlib-users] contour overlapping

2009-05-14 Thread Bala subramanian
Thank you Matthias, Sebastin and Armin!!! My matrices are square matrices and not rectangular one. I tried the way of creating a new matrix from existing ones as suggested by matthias and it worked great. I will try the masked array method too. Thank you all once again, Bala On Wed, May 13, 200

Re: [Matplotlib-users] problem with usetex & \color

2009-05-14 Thread Matthias Michler
Hi Jae-Joon, thank you very much for taking the time and for your suggestions. Indeed the different distillers yield different output as you can see in the attached pics. Does this mean that this behaviour is due to tex / the installed distiller or are different distillers differently handled i