[Matplotlib-users] bbox_inches='tight' issue with text outside axes

2010-06-03 Thread Thomas Robitaille
Hello, I have run into a problem with the bbox_inches='tight' option which allows a tight bounding box to be computed for a plot. In the following example: import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as mpl fig = mpl.figure() ax = fig.add_subplot(1,1,1)

Re: [Matplotlib-users] bbox_inches='tight' issue with text outside axes

2010-06-03 Thread Jae-Joon Lee
The currently implemented bounding box algorithm is very simple and it basically only accounts the title, axis label and ticklabels etc. I thought about implementing a general algorithm that accounts all the visible artist, but I found it very difficult (at least for me) given the support of the

Re: [Matplotlib-users] [mplot3d] change axis background color

2010-06-03 Thread Jae-Joon Lee
On Wed, Jun 2, 2010 at 2:46 PM, Denis Laxalde dlaxa...@gmail.com wrote: That would indeed be a better approach. Can somebody points me to the particular methods/attributes to look at ? As far as I can see, there is no public methods/attributes. Can you file a bug so that Reinier (or others)

Re: [Matplotlib-users] Difference between axes_grid and axes_grid1

2010-06-03 Thread Benjamin Root
Well, the link is still not back, so I will probe you a bit further. You say that axes_grid is provided for backward compatibility, does that mean that I should be using axes_grid1 for new code? I have noticed differences in behavior if I import axes_grid versus axes_grid1. For example, my

Re: [Matplotlib-users] Difference between axes_grid and axes_grid1

2010-06-03 Thread Jae-Joon Lee
On Thu, Jun 3, 2010 at 12:52 PM, Benjamin Root ben.r...@ou.edu wrote: Well, the link is still not back, so I will probe you a bit further.  You say that axes_grid is provided for backward compatibility, does that mean that I should be using axes_grid1 for new code?  I have noticed differences

[Matplotlib-users] how to display data with a fixed color scale ?

2010-06-03 Thread Jim Vickroy
I want to generate a 2-d figure with a (fixed) color scale that does not vary with the range of the data being plotted. How do I do this? Attempts to specify vimin and vmax appear to be ignored. The following example: #code import numpy data = numpy.zeros(shape=(240,240),dtype=int) data[

Re: [Matplotlib-users] how to display data with a fixed color scale ?

2010-06-03 Thread Jae-Joon Lee
On Thu, Jun 3, 2010 at 4:00 PM, Jim Vickroy jim.vick...@noaa.gov wrote: How do I do this?  Attempts to specify vimin and vmax appear to be ignored. Hmm, vmin and vmax should work. cax= ax.imshow(data, interpolation='bilinear', vmin=-1, vmax=1) If these are still ignored, what the

Re: [Matplotlib-users] how to display data with a fixed color scale ?

2010-06-03 Thread Jim Vickroy
Jae-Joon Lee wrote: On Thu, Jun 3, 2010 at 4:00 PM, Jim Vickroy jim.vick...@noaa.gov wrote: How do I do this? Attempts to specify vimin and vmax appear to be ignored. Hmm, vmin and vmax should work. cax= ax.imshow(data, interpolation='bilinear', vmin=-1, vmax=1) If these are

Re: [Matplotlib-users] how to display data with a fixed color scale ?

2010-06-03 Thread Eric Firing
On 06/03/2010 10:00 AM, Jim Vickroy wrote: I want to generate a 2-d figure with a (fixed) color scale that does not vary with the range of the data being plotted. How do I do this? Attempts to specify vimin and vmax appear to be ignored. The following example: #code import numpy data =

Re: [Matplotlib-users] how to display data with a fixed color scale ?

2010-06-03 Thread Jim Vickroy
Eric Firing wrote: On 06/03/2010 10:00 AM, Jim Vickroy wrote: I want to generate a 2-d figure with a (fixed) color scale that does not vary with the range of the data being plotted. How do I do this? Attempts to specify vimin and vmax appear to be ignored. The following example: #code

Re: [Matplotlib-users] how to display data with a fixed color scale ?

2010-06-03 Thread Jim Vickroy
OK, upon a more careful review of the code, I made a simple(-minded) error. Specifying vmin and vmax do work (as everyone already knew). Thanks to Jae-Joon and Eric for their quick replies. and valuable suggestions. -- jv Jim Vickroy wrote: I want to generate a 2-d figure with a (fixed)

Re: [Matplotlib-users] leading whitespace in text

2010-06-03 Thread PHobson
-Original Message- From: Christoph Gohlke [mailto:cgoh...@uci.edu] Sent: Sunday, May 30, 2010 3:41 PM To: matplotlib-users@lists.sourceforge.net Subject: [Matplotlib-users] leading whitespace in text Hello, consider the following simple code: import matplotlib from

Re: [Matplotlib-users] leading whitespace in text

2010-06-03 Thread Christoph Gohlke
On 6/3/2010 5:20 PM, phob...@geosyntec.com wrote: -Original Message- From: Christoph Gohlke [mailto:cgoh...@uci.edu] Sent: Sunday, May 30, 2010 3:41 PM To: matplotlib-users@lists.sourceforge.net Subject: [Matplotlib-users] leading whitespace in text Hello, consider the following

Re: [Matplotlib-users] leading whitespace in text

2010-06-03 Thread Eric Firing
On 06/03/2010 02:29 PM, Christoph Gohlke wrote: On 6/3/2010 5:20 PM, phob...@geosyntec.com wrote: -Original Message- From: Christoph Gohlke [mailto:cgoh...@uci.edu] Sent: Sunday, May 30, 2010 3:41 PM To: matplotlib-users@lists.sourceforge.net Subject: [Matplotlib-users] leading

Re: [Matplotlib-users] Difference between axes_grid and axes_grid1

2010-06-03 Thread Benjamin Root
On Thu, Jun 3, 2010 at 12:22 PM, Jae-Joon Lee lee.j.j...@gmail.com wrote: On Thu, Jun 3, 2010 at 12:52 PM, Benjamin Root ben.r...@ou.edu wrote: Well, the link is still not back, so I will probe you a bit further. You say that axes_grid is provided for backward compatibility, does that mean