[Matplotlib-users] automatically adjust x, y axis equal limit on a 1:1 ratio plot?

2011-10-18 Thread Chao YUE
Dear all, I am making a 1:1 ratio plot to compare data. I can write a small part of code to detect which range of the x or y axis is bigger and then adjust the axis of shorter range to have the same range with the longer one. and use set_aspect('equal') method to have the same tick interval on

Re: [Matplotlib-users] automatically adjust x, y axis equal limit on a 1:1 ratio plot?

2011-10-18 Thread Chao YUE
two lines: ax.set_xlim(min(ax.get_xlim()+ax.get_ylim()),max(ax.get_xlim()+ax.get_ylim())) ax.set_ylim(ax.get_xlim()) chao 2011/10/18 Chao YUE chaoyue...@gmail.com Dear all, I am making a 1:1 ratio plot to compare data. I can write a small part of code to detect which range of the x or y

Re: [Matplotlib-users] matplotlib.rcParams(update) and parallel python

2011-10-18 Thread Martin Hoffmann
Thank you for the tip. I actually had played around with matplotlib.rcdefaults() before, but that didn't work. I tried now the using exactly the clear_state function you suggested. Since it still didn't work, I finally found out that I had a very similar problem with another module from which

Re: [Matplotlib-users] please help with arrow drawing.

2011-10-18 Thread Ryan Nelson
As far as I know, the 'arrow' function is not recommended. The 'annotate' function has a lot more features. Here's your code with the annotate function: import pylab from scipy import optimize import numpy x1=numpy.arange(-4000,1000,0.1) x2=numpy.arange(-1000,4000,0.1)

[Matplotlib-users] QT draw issue in 1.1.0 and PyQt4v2 missing?

2011-10-18 Thread RuiDC
As of 1.1.0, FigureCanvasQTAgg.draw() now no longer calls FigureCanvasAgg.draw(), and as a result I am getting problems with code that used to update positions/size of legend and labels during on_draw. 1. Is there a new way to get the canvas to draw? or is this a bug? The what's new in 1.1.0

Re: [Matplotlib-users] QT draw issue in 1.1.0 and PyQt4v2 missing?

2011-10-18 Thread Benjamin Root
On Tue, Oct 18, 2011 at 11:19 AM, RuiDC ru...@yahoo.com wrote: The what's new in 1.1.0 page, http://matplotlib.sourceforge.net/users/whats_new.html refers to: An rcParam entry, “backend.qt4”, has been added to allow users to select PyQt4, PyQt4v2, or PySide. 2. I cannot see any reference

Re: [Matplotlib-users] QT draw issue in 1.1.0 and PyQt4v2 missing?

2011-10-18 Thread Eric Firing
On 10/18/2011 06:19 AM, RuiDC wrote: As of 1.1.0, FigureCanvasQTAgg.draw() now no longer calls FigureCanvasAgg.draw(), and as a result I am getting problems with code that used to update positions/size of legend and labels during on_draw. 1. Is there a new way to get the canvas to draw? or

[Matplotlib-users] interactive plots in gtk

2011-10-18 Thread Zoltán Vörös
Hi All, I would like to ask how I can invoke the interactive option in a gtk GUI. Basically, I have something like this self.figure = Figure(figsize=(8,6), dpi=72) self.axis = self.figure.add_subplot(111) self.axis.plot(x,y) which works, except that I have to

Re: [Matplotlib-users] QT draw issue in 1.1.0 and PyQt4v2 missing?

2011-10-18 Thread Eric Firing
On 10/18/2011 06:19 AM, RuiDC wrote: As of 1.1.0, FigureCanvasQTAgg.draw() now no longer calls FigureCanvasAgg.draw(), and as a result I am getting problems with code that used to update positions/size of legend and labels during on_draw. 1. Is there a new way to get the canvas to draw? or

[Matplotlib-users] Error with boxplot() and infinite whiskers

2011-10-18 Thread Eric O LEBIGOT (EOL)
The following boxplot raises a warning: boxplot([1], whis=float('inf')) /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/axes.py:5487: RuntimeWarning: invalid value encountered in double_scalars hi_val = q3 + whis*iq I think that it would be

Re: [Matplotlib-users] memory error - netcdf plots

2011-10-18 Thread questions anon
Thanks Jeff, that certainly speeds it up! But when I take them out of the loop and place them elsewhere they are no longer added to the map. Is there someway I can call them in the loop but still get it to run quickly? Thanks On Fri, Oct 14, 2011 at 10:54 PM, Jeff Whitaker jsw...@fastmail.fm