Re: [Matplotlib-users] custom axis range

2011-10-14 Thread Benjamin Root
On Friday, October 14, 2011, jopeto wrote: > > Hello, > > I have a question regarding setting a custom axis range. Here's a basic > example: > > import matplotlib.pyplot as plt > > fig = plt.figure() > ax = fig.add_subplot(1,1,1) > ax.plot([1,2,3]) > ax.axis([xmin,xmax,ymin,ymax]) > plt.show() > >

[Matplotlib-users] question about tight_layout()

2011-10-14 Thread C M
Just trying out the latest mpl 1.1.0 and the tight_layout() method. I saw the guide written about it, but am a unsure how to use this when using the OO approach to using Matplotlib. When using pyplot, the method is: plt.tight_layout(). When using the OO form of mpl, is it: figure.tight_layout(

[Matplotlib-users] custom axis range

2011-10-14 Thread jopeto
Hello, I have a question regarding setting a custom axis range. Here's a basic example: import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(1,1,1) ax.plot([1,2,3]) ax.axis([xmin,xmax,ymin,ymax]) plt.show() Now the question that I'm having is the following. The way I underst

Re: [Matplotlib-users] how to make x and y axis equal distance in ticks

2011-10-14 Thread Benjamin Root
On Fri, Oct 14, 2011 at 12:24 PM, Chao YUE wrote: > Dear all, > > I am trying to plot data on a 1:1 ratio plot to compare the data. > I can set the x and y aixs to have the same limits. but how can I set them > to have the same distance between ticks in the graph? > Thanks a lot, > > chao > > Set

[Matplotlib-users] how to make x and y axis equal distance in ticks

2011-10-14 Thread Chao YUE
Dear all, I am trying to plot data on a 1:1 ratio plot to compare the data. I can set the x and y aixs to have the same limits. but how can I set them to have the same distance between ticks in the graph? Thanks a lot, chao --

Re: [Matplotlib-users] key_press_event weirdness

2011-10-14 Thread John Hunter
On Fri, Oct 14, 2011 at 8:52 AM, John Hunter wrote: > On Fri, Oct 14, 2011 at 8:46 AM, Jorge Scandaliaris > wrote: >> You're right, John, it works here too with the gtkagg backend. I have just >> noticed that I had different backend options set in matplotlib.conf and >> matplotlibrc. My initial r

Re: [Matplotlib-users] key_press_event weirdness

2011-10-14 Thread John Hunter
On Fri, Oct 14, 2011 at 8:46 AM, Jorge Scandaliaris wrote: > You're right, John, it works here too with the gtkagg backend. I have just > noticed that I had different backend options set in matplotlib.conf and > matplotlibrc. My initial report refers then to the Qt4Agg backend. OK, I can confirm

Re: [Matplotlib-users] key_press_event weirdness

2011-10-14 Thread Jorge Scandaliaris
John Hunter writes: > > I am not seeing this on Linux x86_64 with backend GTKAgg version > 2.22.0 on python 2.7. Eg, if I run: > > > python simple_plot.py -dgtkagg > > and then hover over the axes window (w/o clicking on it but the window > has the focus on hover) and press 'g') the grid

Re: [Matplotlib-users] key_press_event weirdness

2011-10-14 Thread John Hunter
On Fri, Oct 14, 2011 at 7:18 AM, Jorge Scandaliaris wrote: > I run Arch Linux x86_64 and I am using the GTKAgg backend. I tried both with > IPython and python directly (2.7.2). I am not seeing this on Linux x86_64 with backend GTKAgg version 2.22.0 on python 2.7. Eg, if I run: > python si

Re: [Matplotlib-users] key_press_event weirdness

2011-10-14 Thread Jorge Scandaliaris
Benjamin Root writes: > > Which backend and platform are you using?Ben Root > I run Arch Linux x86_64 and I am using the GTKAgg backend. I tried both with IPython and python directly (2.7.2). jorges -- All the data

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

2011-10-14 Thread Jeff Whitaker
On 10/12/11 8:20 PM, questions anon wrote: Hi All, I keep receiving a memory error when processing many netcdf files. I assumed it had something to do with how I loop things and maybe needed to close things off properly but I recently received an error that made me think it might be because of

Re: [Matplotlib-users] Creating a new colormap based on a cmap from matplotlib.cm?

2011-10-14 Thread Yoshi Rokuko
+ Keith Hughitt -+ > Hi all, > > Does anyone know of a good way to create a new LinearSegmentedColormap > based off an existing one? > > I have a function which attempts to generate N "optimal" color map > indices for a given data array. In

[Matplotlib-users] Adding Arrows to polar plots

2011-10-14 Thread Nils Wagner
Hi all, what is the native "data" coordinate system for Arrows in a polar plot ? How do I add arrows to a polar plot ? An example would be appreciated. fig = figure(figsize=(12,12)) ax = fig.add_subplot(111, polar=True) Nils