[Matplotlib-users] duplicate matplotlib figure

2011-04-18 Thread Eli Brosh
Hello, Suppose I create a matplotlib figure and plot things in it. In pylab it would be like: from pylab import * figure(1) plot([1,2,3],[1,2,3],'r*',label='label1') plot([1,2,3],[2,3,4],'r',label='label2') legend(loc='upper right') text(1.2,3,'nice figure') xlabel('xlabel') ylabel('ylabel')

[Matplotlib-users] minvalue must be less than or equal to maxvalue error

2011-04-18 Thread Muffles
Hello all, i created some program to read from netcdf files and plot the data, and it seems to work ok. But when i try to run an older file, it just shows this: Traceback (most recent call last): File netcdf2png.py, line 199, in module savefig(range.png) File

[Matplotlib-users] OverflowError: math range error

2011-04-18 Thread Muffles
Hello all, I am getting this error, and im not very experienced with matplotlib, but in most files this code worked, but in some i just get this error: Traceback (most recent call last): File /home/paoli/public_html/netcdf2png.py, line 128, in module colorbar = fig.colorbar(pc) File

Re: [Matplotlib-users] Pixel shape

2011-04-18 Thread Sebastian Berg
The solution is already the aspect='auto', ie: import numpy as np from matplotlib import pyplot as plt a = np.arange(100).reshape(10,10) plt.imshow(a, aspect='auto') aspect='auto' is what you were looking for, the documentation (as you probably already found is for example at:

Re: [Matplotlib-users] Pixel shape

2011-04-18 Thread Joe Kington
Actually, I think he's wanting a set aspect, right? Either way, it's just aspect=1.5 or aspect=0.6667 depending on the orientation he wants. On Mon, Apr 18, 2011 at 6:37 AM, Sebastian Berg sebast...@sipsolutions.netwrote: The solution is already the aspect='auto', ie: import numpy as np

[Matplotlib-users] Date format the x-axis of a barh() plot?

2011-04-18 Thread jfortiv
Hello, I'm trying to create a bar chart that looks something like a gannt chart... See the simple example here: http://www.promana.net/making-use-of-gantt-charts/ I'm trying to utilize barh() and fmt_xdata to accomplish this with the following: #~~~ date1 =

Re: [Matplotlib-users] Date format the x-axis of a barh() plot?

2011-04-18 Thread Sebastian Berg
Hello, don't know the foo behind it, but using ax.xaxis.set_major_formatter(mdates.DateFormatter('%Y-%m-%d %H:%M:%S')) works. Regards, Sebastian On Sun, 2011-04-17 at 19:52 -0700, jfortiv wrote: Hello, I'm trying to create a bar chart that looks something like a gannt chart... See the

[Matplotlib-users] Re size the colorbar

2011-04-18 Thread Muffles
Ive seen lots of examples around, but i cant seem to adapt any to my implementation. The only thing i want is to change what values the colorbar shows. In the colorbar there are values from 1 to 1e+9, and im only interested in the values from 1e+4 to 1e+9... pc =

Re: [Matplotlib-users] OverflowError: math range error

2011-04-18 Thread Michael Droettboom
Do you have a minimal script that reproduces this error? Cheers, Mike On 04/18/2011 07:37 AM, Muffles wrote: Hello all, I am getting this error, and im not very experienced with matplotlib, but in most files this code worked, but in some i just get this error: Traceback (most recent call

Re: [Matplotlib-users] Re size the colorbar

2011-04-18 Thread Eric Firing
On 04/18/2011 06:07 AM, Muffles wrote: Ive seen lots of examples around, but i cant seem to adapt any to my implementation. The only thing i want is to change what values the colorbar shows. In the colorbar there are values from 1 to 1e+9, and im only interested in the values from 1e+4 to

Re: [Matplotlib-users] strange behavior with imshow

2011-04-18 Thread Daπid
I have checked with all the interpolation modes and the only one that behaves badly is 'nearest'. There are them: http://dl.dropbox.com/u/1351211/Interpolation_modes.zip On Mon, Apr 18, 2011 at 12:46 PM, Emanuele Passera emanuele.pass...@treuropa.com wrote: Hello everybody, I am experiencing a

[Matplotlib-users] [ANN] Courses in Colorado: Introduction to Python and Python for Scientists and Engineers

2011-04-18 Thread Mike Müller
Python Course in Golden, CO, USA Introduction to Python and Python for Scientists and Engineers -- June 3 - 4, 2011 Introduction to Python June 5, 2011 Python for Scientists and Engineers