Re: [Matplotlib-users] Basemap/ orthographic projection plot doesn't respect globe boundary

2010-04-05 Thread Will Hewson

Hey Jeff,

It's somewhere between the two - the original satellite swath is converted
to a regular 0.5 degree grid by truncating, binning, and averaging each
point's lons and lats over the top of a 720 x 360 np.zeros array. the
plotting still works fine for non ortho/ hemispherical projections, and I've
no big problem with using global projections for the time being. Thanks for
your help in the meantime anyway.

Cheers,


Will.



Jeff Whitaker wrote:
 
 On 4/4/10 11:06 AM, Will Hewson wrote:
 Hi again Jeff et al...

 I've had a play around with the extra few lines of code - on paper this
 seems like it should solve the problems I'm experiencing. However, an
 error's being thrown up by the transform scalar function, as my lons and
 lats won't necessarily be increasing. The data I'm plotting is satellite
 data and so at the beginning and end of the orbit file lats go over the
 pole
 from 90 to -90, with a similar problem for the lons - whereby the data is
 taken across the satellite track. I've thought about sorting the data
 before
 passing it to transform_scalar but I'm always going to be left with the
 problem in either lats or lons.

 I've uploaded the file I'm currently working with this time. It's three
 columns of lons, lats and z values.

 Once again, many thanks for your help.

 Will.

 http://old.nabble.com/file/p28133659/test.plt test.plt

 
 Will:  Is it a regular lat/lon grid or a satellite swath?  If it's the 
 latter, you can't use my solution.
 
 -Jeff
 
 
 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
 
 

-- 
View this message in context: 
http://old.nabble.com/Basemap--orthographic-projection-plot-doesn%27t-respect-globe-boundary-tp28117654p28138677.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Basemap/ orthographic projection plot doesn't respect globe boundary

2010-04-05 Thread Jeff Whitaker
On 4/5/10 4:16 AM, Will Hewson wrote:
 Hey Jeff,

 It's somewhere between the two - the original satellite swath is converted
 to a regular 0.5 degree grid by truncating, binning, and averaging each
 point's lons and lats over the top of a 720 x 360 np.zeros array. the
 plotting still works fine for non ortho/ hemispherical projections, and I've
 no big problem with using global projections for the time being. Thanks for
 your help in the meantime anyway.

 Cheers,


 Will.


Will:  If it's a regular 0.5 degree lat/lon grid, it should work in 
transform_scalar.  However, I don't see how to read the data in your 
test.plt file into a regular 360x720 grid.  It seems to only contain the 
points in the swath with nonzero values.

-Jeff


 Jeff Whitaker wrote:

 On 4/4/10 11:06 AM, Will Hewson wrote:
  
 Hi again Jeff et al...

 I've had a play around with the extra few lines of code - on paper this
 seems like it should solve the problems I'm experiencing. However, an
 error's being thrown up by the transform scalar function, as my lons and
 lats won't necessarily be increasing. The data I'm plotting is satellite
 data and so at the beginning and end of the orbit file lats go over the
 pole
 from 90 to -90, with a similar problem for the lons - whereby the data is
 taken across the satellite track. I've thought about sorting the data
 before
 passing it to transform_scalar but I'm always going to be left with the
 problem in either lats or lons.

 I've uploaded the file I'm currently working with this time. It's three
 columns of lons, lats and z values.

 Once again, many thanks for your help.

 Will.

 http://old.nabble.com/file/p28133659/test.plt test.plt


 Will:  Is it a regular lat/lon grid or a satellite swath?  If it's the
 latter, you can't use my solution.

 -Jeff


 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


  



--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Basemap/ orthographic projection plot doesn't respect globe boundary

2010-04-05 Thread Will Hewson

I should perhaps of explained my code (included in top post) a little better,
the values in my attached file aren't on a regular grid to start with, I do
a little bit of juggling as follows to get them into a regular grid:

I'm firstly setting up my 2D grid of 0.5 degree lat lons, followed by
identically sized grids of zeros for the data bin, and mean divisors:

x = np.arange(-180, 180, 0.5); y = np.arange(-90, 90, 0.5)
grid_lon, grid_lat = np.meshgrid(x,y) #regularly spaced 2D grid
n_vals = np.zeros((360,720)) #mean divisor
dat = np.zeros((360,720)) #2D grid of zeros 

I'm then taking my input data (e.g. the .plt file attached), and rounding
the lat lons to the nearest 0 or 0.5:

lon = (np.around(lon*2))/2 #round to nearest .0 or 0.5
lat = (np.around(lat*2))/2 #round to nearest .0 or 0.5

Then for each row in my input file where Z is greater than 0, I'm adding the
n'th Z value to its corresponding position in the dat zeros array, and
keeping a count of how many values are going into each cell in the mean
divisor array:

j=0
for i in slcol:
  if lon[j]  0:
grid_lon_ind = 360+(lon[j]*2)
grid_lat_ind = 180+(lat[j]*2)
  else:
grid_lon_ind = 360-(lon[j]*2)
grid_lat_ind = 180+(lat[j]*2)
  if i  0:
dat[grid_lat_ind, grid_lon_ind] += i #add i'th value
n_vals[grid_lat_ind, grid_lon_ind] += 1 #increase cell counter by 1 for
each extra value
  j+=1

Finally the new dat array is divided by the mean divisor array to give me my
mean Z values:

dat = np.nan_to_num(dat/n_vals)

I've done it this way as opposed to interpolating *properly* in order to
(for instance) stop the values bleeding away from the edges of the satellite
swath.

Cheers,

Will.


Jeff Whitaker wrote:
 
 On 4/5/10 4:16 AM, Will Hewson wrote:
 Hey Jeff,

 It's somewhere between the two - the original satellite swath is
 converted
 to a regular 0.5 degree grid by truncating, binning, and averaging each
 point's lons and lats over the top of a 720 x 360 np.zeros array. the
 plotting still works fine for non ortho/ hemispherical projections, and
 I've
 no big problem with using global projections for the time being. Thanks
 for
 your help in the meantime anyway.

 Cheers,


 Will.

 
 Will:  If it's a regular 0.5 degree lat/lon grid, it should work in 
 transform_scalar.  However, I don't see how to read the data in your 
 test.plt file into a regular 360x720 grid.  It seems to only contain the 
 points in the swath with nonzero values.
 
 -Jeff


 Jeff Whitaker wrote:

 On 4/4/10 11:06 AM, Will Hewson wrote:
  
 Hi again Jeff et al...

 I've had a play around with the extra few lines of code - on paper this
 seems like it should solve the problems I'm experiencing. However, an
 error's being thrown up by the transform scalar function, as my lons
 and
 lats won't necessarily be increasing. The data I'm plotting is
 satellite
 data and so at the beginning and end of the orbit file lats go over the
 pole
 from 90 to -90, with a similar problem for the lons - whereby the data
 is
 taken across the satellite track. I've thought about sorting the data
 before
 passing it to transform_scalar but I'm always going to be left with the
 problem in either lats or lons.

 I've uploaded the file I'm currently working with this time. It's three
 columns of lons, lats and z values.

 Once again, many thanks for your help.

 Will.

 http://old.nabble.com/file/p28133659/test.plt test.plt


 Will:  Is it a regular lat/lon grid or a satellite swath?  If it's the
 latter, you can't use my solution.

 -Jeff


 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


  

 
 
 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
 
 

-- 
View this message in context: 
http://old.nabble.com/Basemap--orthographic-projection-plot-doesn%27t-respect-globe-boundary-tp28117654p28139978.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Download Intel#174; Parallel Studio Eval
Try the new 

Re: [Matplotlib-users] speed up imports?

2010-04-05 Thread Michael Droettboom
All of those calls to open are being generated from the pytz import -- 
which is why pytz seems like the likely candidate.  Is it possible you 
have pytz installed as a compressed egg, or on a remote disk, or 
something that may be causing a file reading penalty?

As Eric said, make sure you time the import pytz in a clean Python 
session -- if a module is already imported in the Python interpreter, it 
won't be reimported.

Mike

Andrew Kelly wrote:
 import pytz only took 0.0 seconds.
  
 I actually just ran that pstats module and there is one line that 
 stuck out at me:
   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
 10.0000.0000.0000.000 
 C:\Python26\lib\os.py:35(_get_exports_list)
   5603.1070.0063.1070.006 {open}
  
 That is ~50% of the load time.  I have 0 idea what this is though.
  
 Let me try this on my os machine.
  
 -Andy

 On Fri, Apr 2, 2010 at 12:31 PM, Michael Droettboom md...@stsci.edu 
 mailto:md...@stsci.edu wrote:

 It looks like most of the time is being taken up by pytz (timezone
 library), which opens ~500 files.  How does the total time of
 import pytz compare?

 Mike

 Andrew Kelly wrote:

 I see.  I was wondering why it spit out a binary file.

 test.out is attached...

 -Andy

 On Fri, Apr 2, 2010 at 10:55 AM, Michael Droettboom
 md...@stsci.edu mailto:md...@stsci.edu
 mailto:md...@stsci.edu mailto:md...@stsci.edu wrote:

Can you provide the actual saved profiler data?  The output
 of the
command itself doesn't provide enough information to
 diagnose the
problem, since it doesn't have full file paths etc.

When you do (thanks Gökhan for the less verbose version):

 python.exe -c import cProfile; cProfile.run('import pylab',
'test.out')

this should produce a binary file test.out that can be loaded
with the pstats module and used by GUI tools such as
 KCacheGrind
to help us get to the bottom of this.

Mike

Andrew Kelly wrote:

I'm back.

My backend is wx.  Import wx does not really take
 much time
to import at all.  In fact time.time() before and after
 = 0.0

Some computer details:
Processor: AMD Phenom IIx4 810 Processor 2.6 GHz
RAM: 8.00 GB

As for the cProfiler output on pylab, I have attached the
output as test.txt.
 -Andy

On Fri, Apr 2, 2010 at 7:22 AM, Gökhan Sever
gokhanse...@gmail.com mailto:gokhanse...@gmail.com
 mailto:gokhanse...@gmail.com mailto:gokhanse...@gmail.com
mailto:gokhanse...@gmail.com
 mailto:gokhanse...@gmail.com mailto:gokhanse...@gmail.com
 mailto:gokhanse...@gmail.com

wrote:



   On Fri, Apr 2, 2010 at 8:28 AM, Michael Droettboom
   md...@stsci.edu mailto:md...@stsci.edu
 mailto:md...@stsci.edu mailto:md...@stsci.edu
mailto:md...@stsci.edu mailto:md...@stsci.edu
 mailto:md...@stsci.edu mailto:md...@stsci.edu wrote:

   My gut says it's probably the GUI framework
 import that is
   dominating
   the time.  Which backend are you using?  Does
 importing it
   take a large
   amount of time as well?

   Can you provide a profiler output file we can
 examine
to narrow it
   down?  The following from a command prompt should be
   sufficient to write
   out a file called import.prof:

python.exe -c import cProfile;
 prof=cProfile.Profile();
   prof.run('import pylab', 'import.prof')

   Mike


   Just for the records,

   It reads as:

   python -c import cProfile; cProfile.run('import pylab',
   filename='test.out')

   in Python 2.6.2

   These helped me to load the profile output:

   import pstats
   stats = pstats.Stats(test.out)
   stats.print_stats()

   -- Gökhan


  
 --
   Download Intel#174; Parallel Studio Eval
   Try the new software tools for yourself. Speed
 compiling,
find bugs
   proactively, and fine-tune applications for parallel
performance.
   See why Intel Parallel Studio 

Re: [Matplotlib-users] Getting coordinates of the zoom rectangle

2010-04-05 Thread Gökhan Sever
On Mon, Apr 5, 2010 at 6:39 AM, Mauro Cavalcanti mauro...@gmail.com wrote:

 Dear ALL,

 Good morning... Here is a question that may already have been asked
 (and answered), but not to my knowledge. Matplotlib's figure windows
 come with that handy navigation bar, which includes a Pan/Zoom button
 and a Zoom-to-rectangle button. Once a zoom rectangle is defined on a
 figure, is it possible to get the coordinates of it (that is, the
 lower and upper corner coordinates which define the zoom rectangle)?
 If so, how can this be done?

 Thanks in advance for any reply.

 With best regards,

 --
 Dr. Mauro J. Cavalcanti
 P.O. Box 46521, CEP 20551-970
 Rio de Janeiro, RJ, BRASIL
 E-mail: mauro...@gmail.com
 Web: http://sites.google.com/site/maurobio
 Linux Registered User #473524 * Ubuntu User #22717


Hi,

Search for zoom_window.py and  rectangle_selector.py in your matplotlib
examples directory.

-- 
Gökhan
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Tick line linewidth and linestyle don't work

2010-04-05 Thread Jae-Joon Lee
On Sun, Apr 4, 2010 at 11:55 AM, Thomas Robitaille
thomas.robitai...@gmail.com wrote:
 It looks as though the set_linewidth and set_linestyle commands are silently 
 ignored. Is this normal? I have submitted a bug report here:

linewidth and linestyle are (or looks) ignored because ticklines are
actually markers.
To change width of the ticklines, you should use set_mew.
A change of the linestyle should also be possible, but I'm not sure if
there is a handy way to do that.

Regards,

-JJ

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Basemap/ orthographic projection plot doesn't respect globe boundary

2010-04-05 Thread Jeff Whitaker

On 4/5/10 7:25 AM, Will Hewson wrote:

I should perhaps of explained my code (included in top post) a little better,
the values in my attached file aren't on a regular grid to start with, I do
a little bit of juggling as follows to get them into a regular grid:

I'm firstly setting up my 2D grid of 0.5 degree lat lons, followed by
identically sized grids of zeros for the data bin, and mean divisors:

x = np.arange(-180, 180, 0.5); y = np.arange(-90, 90, 0.5)
grid_lon, grid_lat = np.meshgrid(x,y) #regularly spaced 2D grid
n_vals = np.zeros((360,720)) #mean divisor
dat = np.zeros((360,720)) #2D grid of zeros

I'm then taking my input data (e.g. the .plt file attached), and rounding
the lat lons to the nearest 0 or 0.5:

lon = (np.around(lon*2))/2 #round to nearest .0 or 0.5
lat = (np.around(lat*2))/2 #round to nearest .0 or 0.5

Then for each row in my input file where Z is greater than 0, I'm adding the
n'th Z value to its corresponding position in the dat zeros array, and
keeping a count of how many values are going into each cell in the mean
divisor array:

j=0
for i in slcol:
   if lon[j]  0:
 grid_lon_ind = 360+(lon[j]*2)
 grid_lat_ind = 180+(lat[j]*2)
   else:
 grid_lon_ind = 360-(lon[j]*2)
 grid_lat_ind = 180+(lat[j]*2)
   if i  0:
 dat[grid_lat_ind, grid_lon_ind] += i #add i'th value
 n_vals[grid_lat_ind, grid_lon_ind] += 1 #increase cell counter by 1 for
each extra value
   j+=1

Finally the new dat array is divided by the mean divisor array to give me my
mean Z values:

dat = np.nan_to_num(dat/n_vals)

I've done it this way as opposed to interpolating *properly* in order to
(for instance) stop the values bleeding away from the edges of the satellite
swath.

Cheers,

Will.
   


Will:  I made some slight modifications to your original script and it 
works fine with the ortho projection using either contourf on the 
original lat/lon grid or pcolormesh on the interpolated map projection 
grid.


-Jeff


Jeff Whitaker wrote:
   

On 4/5/10 4:16 AM, Will Hewson wrote:
 

Hey Jeff,

It's somewhere between the two - the original satellite swath is
converted
to a regular 0.5 degree grid by truncating, binning, and averaging each
point's lons and lats over the top of a 720 x 360 np.zeros array. the
plotting still works fine for non ortho/ hemispherical projections, and
I've
no big problem with using global projections for the time being. Thanks
for
your help in the meantime anyway.

Cheers,


Will.

   

Will:  If it's a regular 0.5 degree lat/lon grid, it should work in
transform_scalar.  However, I don't see how to read the data in your
test.plt file into a regular 360x720 grid.  It seems to only contain the
points in the swath with nonzero values.

-Jeff
 


Jeff Whitaker wrote:

   

On 4/4/10 11:06 AM, Will Hewson wrote:

 

Hi again Jeff et al...

I've had a play around with the extra few lines of code - on paper this
seems like it should solve the problems I'm experiencing. However, an
error's being thrown up by the transform scalar function, as my lons
and
lats won't necessarily be increasing. The data I'm plotting is
satellite
data and so at the beginning and end of the orbit file lats go over the
pole
from 90 to -90, with a similar problem for the lons - whereby the data
is
taken across the satellite track. I've thought about sorting the data
before
passing it to transform_scalar but I'm always going to be left with the
problem in either lats or lons.

I've uploaded the file I'm currently working with this time. It's three
columns of lons, lats and z values.

Once again, many thanks for your help.

Will.

http://old.nabble.com/file/p28133659/test.plt test.plt


   

Will:  Is it a regular lat/lon grid or a satellite swath?  If it's the
latter, you can't use my solution.

-Jeff


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users



 


   


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


 
   



--
Jeffrey S. Whitaker Phone  : (303)497-6313
Meteorologist   FAX: 

Re: [Matplotlib-users] Basemap/ orthographic projection plot doesn't respect globe boundary

2010-04-05 Thread Will Hewson

Jeff, this is great, works fine - many thanks for all your help over the last
few days, it really is appreciated. I'm trying to build the case within my
office for switching over to Basemap from IDL, ironing out niggles like this
is really useful in this respect.

All the best,


Will.


Jeff Whitaker wrote:
 
 On 4/5/10 7:25 AM, Will Hewson wrote:
 I should perhaps of explained my code (included in top post) a little
 better,
 the values in my attached file aren't on a regular grid to start with, I
 do
 a little bit of juggling as follows to get them into a regular grid:

 I'm firstly setting up my 2D grid of 0.5 degree lat lons, followed by
 identically sized grids of zeros for the data bin, and mean divisors:

 x = np.arange(-180, 180, 0.5); y = np.arange(-90, 90, 0.5)
 grid_lon, grid_lat = np.meshgrid(x,y) #regularly spaced 2D grid
 n_vals = np.zeros((360,720)) #mean divisor
 dat = np.zeros((360,720)) #2D grid of zeros

 I'm then taking my input data (e.g. the .plt file attached), and rounding
 the lat lons to the nearest 0 or 0.5:

 lon = (np.around(lon*2))/2 #round to nearest .0 or 0.5
 lat = (np.around(lat*2))/2 #round to nearest .0 or 0.5

 Then for each row in my input file where Z is greater than 0, I'm adding
 the
 n'th Z value to its corresponding position in the dat zeros array, and
 keeping a count of how many values are going into each cell in the mean
 divisor array:

 j=0
 for i in slcol:
if lon[j]  0:
  grid_lon_ind = 360+(lon[j]*2)
  grid_lat_ind = 180+(lat[j]*2)
else:
  grid_lon_ind = 360-(lon[j]*2)
  grid_lat_ind = 180+(lat[j]*2)
if i  0:
  dat[grid_lat_ind, grid_lon_ind] += i #add i'th value
  n_vals[grid_lat_ind, grid_lon_ind] += 1 #increase cell counter by 1
 for
 each extra value
j+=1

 Finally the new dat array is divided by the mean divisor array to give me
 my
 mean Z values:

 dat = np.nan_to_num(dat/n_vals)

 I've done it this way as opposed to interpolating *properly* in order to
 (for instance) stop the values bleeding away from the edges of the
 satellite
 swath.

 Cheers,

 Will.

 
 Will:  I made some slight modifications to your original script and it 
 works fine with the ortho projection using either contourf on the 
 original lat/lon grid or pcolormesh on the interpolated map projection 
 grid.
 
 -Jeff

 Jeff Whitaker wrote:

 On 4/5/10 4:16 AM, Will Hewson wrote:
  
 Hey Jeff,

 It's somewhere between the two - the original satellite swath is
 converted
 to a regular 0.5 degree grid by truncating, binning, and averaging each
 point's lons and lats over the top of a 720 x 360 np.zeros array. the
 plotting still works fine for non ortho/ hemispherical projections, and
 I've
 no big problem with using global projections for the time being. Thanks
 for
 your help in the meantime anyway.

 Cheers,


 Will.


 Will:  If it's a regular 0.5 degree lat/lon grid, it should work in
 transform_scalar.  However, I don't see how to read the data in your
 test.plt file into a regular 360x720 grid.  It seems to only contain the
 points in the swath with nonzero values.

 -Jeff
  

 Jeff Whitaker wrote:


 On 4/4/10 11:06 AM, Will Hewson wrote:

  
 Hi again Jeff et al...

 I've had a play around with the extra few lines of code - on paper
 this
 seems like it should solve the problems I'm experiencing. However, an
 error's being thrown up by the transform scalar function, as my lons
 and
 lats won't necessarily be increasing. The data I'm plotting is
 satellite
 data and so at the beginning and end of the orbit file lats go over
 the
 pole
 from 90 to -90, with a similar problem for the lons - whereby the
 data
 is
 taken across the satellite track. I've thought about sorting the data
 before
 passing it to transform_scalar but I'm always going to be left with
 the
 problem in either lats or lons.

 I've uploaded the file I'm currently working with this time. It's
 three
 columns of lons, lats and z values.

 Once again, many thanks for your help.

 Will.

 http://old.nabble.com/file/p28133659/test.plt test.plt



 Will:  Is it a regular lat/lon grid or a satellite swath?  If it's the
 latter, you can't use my solution.

 -Jeff


 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users



  



 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and 

Re: [Matplotlib-users] Changing the font

2010-04-05 Thread Alex S

I think I'm using MPL .99.1 (is there a command to check?) on Windows XP. 
Thanks for the debug tip, I don't think posting the whole thing is necessary
because this line seems to be the problem:

findfont: Could not match
:family=serif:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning
C:\Python26\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf

So I guess the font's missing from the folder.  Can I add it somehow?



Michael Droettboom-3 wrote:
 
 Can you set verbose.level to debug-annoying in your matplotlibrc 
 file, and then send the output to this list.  That may help us track 
 down where the font lookup is failing.  Also, what platform and version 
 of matplotlib are you running?
 
 Mike
 
 Alex S wrote:
 Hi, sorry I wasn't too clear... I changed that, but I don't seem to be
 able
 to choose between the different serif fonts, it just always gives me the
 default...



 Alex S wrote:
   
 Hi there,
 I'm trying to change the font default on my graph to New Century
 Schoolbook.  I'm trying to do this by editing the matplotlibrc file. 
 Unfortunately, although I'm able to change the font.family, I can't
 figure
 out how to make it use something other than the default in the family... 
 I tried changing the list further down to only include the font I want,
 like this:

 font.serif  : New Century Schoolbook #Bitstream Vera Serif, New
 Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman,
 Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif

 (note I commented out the other fonts, just rearranging the list to put
 New Century Schoolbook first didn't seem to work either)

 Could anyone tell me what I'm doing wrong?
 Thanks a lot!
 Alex


 

   
 
 -- 
 Michael Droettboom
 Science Software Branch
 Operations and Engineering Division
 Space Telescope Science Institute
 Operated by AURA for NASA
 
 
 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
 
 

-- 
View this message in context: 
http://old.nabble.com/Changing-the-font-tp28111472p28141094.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] EPS files with LaTeX are invalid

2010-04-05 Thread Jae-Joon Lee
On Fri, Apr 2, 2010 at 11:20 AM, Michael Droettboom md...@stsci.edu wrote:
 It seems the relevant change is in r8102: fix some issues in the bbox
 after the postscript distiller is run.  This change removed a commented
 out call to ps2eps.  I'm a bit out of my depth here as to why that
 change was made, and why .eps files seemingly haven't been true .eps
 files for a long time prior to that change.  Anyone else?


To my best knowledge, the bbox of the eps output before r8102 was
incorrect for some cases. r8102 was my attempt to fix some of the
issues. The ps backend is quite complicated in how final output is
produced (psfrag, distiller, pstoeps), and this often messes up the
initially specified bbox and results in incorrect ones. While I think
I fixed some of the issues, there still could be some left. And I hope
someone who is more knowledgeable than me take a look.

For the reported issue, I haven't take a time to investigate (but I
will soon), but I doubt if it is an issue of pstoeps function (as I
said, it seems to write a matching save-restore pair).

Regards,

-JJ

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Changing the font

2010-04-05 Thread Michael Droettboom
It would still be helpful to see the whole listing (send it to me 
offlist) because that will indicate where fonts are being looked for, 
and hopefully *why* this is failing.

It should search for fonts in the standard Windows location (usually 
C:\Windows\Fonts).  Have you tried setting font.family to New Century 
Schoolbook directly?  (I wonder if the secondary lookup is failing).

Cheers,
Mike

Alex S wrote:
 I think I'm using MPL .99.1 (is there a command to check?) on Windows XP. 
 Thanks for the debug tip, I don't think posting the whole thing is necessary
 because this line seems to be the problem:

 findfont: Could not match
 :family=serif:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
 Returning
 C:\Python26\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf

 So I guess the font's missing from the folder.  Can I add it somehow?



 Michael Droettboom-3 wrote:
   
 Can you set verbose.level to debug-annoying in your matplotlibrc 
 file, and then send the output to this list.  That may help us track 
 down where the font lookup is failing.  Also, what platform and version 
 of matplotlib are you running?

 Mike

 Alex S wrote:
 
 Hi, sorry I wasn't too clear... I changed that, but I don't seem to be
 able
 to choose between the different serif fonts, it just always gives me the
 default...



 Alex S wrote:
   
   
 Hi there,
 I'm trying to change the font default on my graph to New Century
 Schoolbook.  I'm trying to do this by editing the matplotlibrc file. 
 Unfortunately, although I'm able to change the font.family, I can't
 figure
 out how to make it use something other than the default in the family... 
 I tried changing the list further down to only include the font I want,
 like this:

 font.serif  : New Century Schoolbook #Bitstream Vera Serif, New
 Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman,
 Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif

 (note I commented out the other fonts, just rearranging the list to put
 New Century Schoolbook first didn't seem to work either)

 Could anyone tell me what I'm doing wrong?
 Thanks a lot!
 Alex


 
 
   
   
 -- 
 Michael Droettboom
 Science Software Branch
 Operations and Engineering Division
 Space Telescope Science Institute
 Operated by AURA for NASA


 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


 

   

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Changing the font

2010-04-05 Thread Alex S

Ah ok, I've sent it on to you.  I've just tried setting font.family to New
Century Schoolbook directly but it generates something similar.  I'm
starting to think part of the problem is that I've set the home directory to
U: somehow, U: being a shared drive which doesn't have a font directory... 
I don't know how I set this, it's not mentioned in the rc file anywhere that
I can see...


Michael Droettboom-3 wrote:
 
 It would still be helpful to see the whole listing (send it to me 
 offlist) because that will indicate where fonts are being looked for, 
 and hopefully *why* this is failing.
 
 It should search for fonts in the standard Windows location (usually 
 C:\Windows\Fonts).  Have you tried setting font.family to New Century 
 Schoolbook directly?  (I wonder if the secondary lookup is failing).
 
 Cheers,
 Mike
 
 Alex S wrote:
 I think I'm using MPL .99.1 (is there a command to check?) on Windows XP. 
 Thanks for the debug tip, I don't think posting the whole thing is
 necessary
 because this line seems to be the problem:

 findfont: Could not match
 :family=serif:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
 Returning
 C:\Python26\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf

 So I guess the font's missing from the folder.  Can I add it somehow?



 Michael Droettboom-3 wrote:
   
 Can you set verbose.level to debug-annoying in your matplotlibrc 
 file, and then send the output to this list.  That may help us track 
 down where the font lookup is failing.  Also, what platform and version 
 of matplotlib are you running?

 Mike

 Alex S wrote:
 
 Hi, sorry I wasn't too clear... I changed that, but I don't seem to be
 able
 to choose between the different serif fonts, it just always gives me
 the
 default...



 Alex S wrote:
   
   
 Hi there,
 I'm trying to change the font default on my graph to New Century
 Schoolbook.  I'm trying to do this by editing the matplotlibrc file. 
 Unfortunately, although I'm able to change the font.family, I can't
 figure
 out how to make it use something other than the default in the
 family... 
 I tried changing the list further down to only include the font I
 want,
 like this:

 font.serif  : New Century Schoolbook #Bitstream Vera Serif,
 New
 Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman,
 Bookman,
 Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif

 (note I commented out the other fonts, just rearranging the list to
 put
 New Century Schoolbook first didn't seem to work either)

 Could anyone tell me what I'm doing wrong?
 Thanks a lot!
 Alex


 
 
   
   
 -- 
 Michael Droettboom
 Science Software Branch
 Operations and Engineering Division
 Space Telescope Science Institute
 Operated by AURA for NASA


 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


 

   
 
 -- 
 Michael Droettboom
 Science Software Branch
 Operations and Engineering Division
 Space Telescope Science Institute
 Operated by AURA for NASA
 
 
 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
 
 

-- 
View this message in context: 
http://old.nabble.com/Changing-the-font-tp28111472p28141683.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Changing the font

2010-04-05 Thread Michael Droettboom
For the benefit of future users Googling this problem --

After an off-list discussion, we realized there were a couple of fonts 
on Alex' system with the names Century Schoolbook and New Century 
Schoolbook LT Std.  Using one of those names instead resolved the problem.

Mike

Alex S wrote:
 Ah ok, I've sent it on to you.  I've just tried setting font.family to New
 Century Schoolbook directly but it generates something similar.  I'm
 starting to think part of the problem is that I've set the home directory to
 U: somehow, U: being a shared drive which doesn't have a font directory... 
 I don't know how I set this, it's not mentioned in the rc file anywhere that
 I can see...


 Michael Droettboom-3 wrote:
   
 It would still be helpful to see the whole listing (send it to me 
 offlist) because that will indicate where fonts are being looked for, 
 and hopefully *why* this is failing.

 It should search for fonts in the standard Windows location (usually 
 C:\Windows\Fonts).  Have you tried setting font.family to New Century 
 Schoolbook directly?  (I wonder if the secondary lookup is failing).

 Cheers,
 Mike

 Alex S wrote:
 
 I think I'm using MPL .99.1 (is there a command to check?) on Windows XP. 
 Thanks for the debug tip, I don't think posting the whole thing is
 necessary
 because this line seems to be the problem:

 findfont: Could not match
 :family=serif:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
 Returning
 C:\Python26\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf

 So I guess the font's missing from the folder.  Can I add it somehow?



 Michael Droettboom-3 wrote:
   
   
 Can you set verbose.level to debug-annoying in your matplotlibrc 
 file, and then send the output to this list.  That may help us track 
 down where the font lookup is failing.  Also, what platform and version 
 of matplotlib are you running?

 Mike

 Alex S wrote:
 
 
 Hi, sorry I wasn't too clear... I changed that, but I don't seem to be
 able
 to choose between the different serif fonts, it just always gives me
 the
 default...



 Alex S wrote:
   
   
   
 Hi there,
 I'm trying to change the font default on my graph to New Century
 Schoolbook.  I'm trying to do this by editing the matplotlibrc file. 
 Unfortunately, although I'm able to change the font.family, I can't
 figure
 out how to make it use something other than the default in the
 family... 
 I tried changing the list further down to only include the font I
 want,
 like this:

 font.serif  : New Century Schoolbook #Bitstream Vera Serif,
 New
 Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman,
 Bookman,
 Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif

 (note I commented out the other fonts, just rearranging the list to
 put
 New Century Schoolbook first didn't seem to work either)

 Could anyone tell me what I'm doing wrong?
 Thanks a lot!
 Alex


 
 
 
   
   
   
 -- 
 Michael Droettboom
 Science Software Branch
 Operations and Engineering Division
 Space Telescope Science Institute
 Operated by AURA for NASA


 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


 
 
   
   
 -- 
 Michael Droettboom
 Science Software Branch
 Operations and Engineering Division
 Space Telescope Science Institute
 Operated by AURA for NASA


 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


 

   

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list

Re: [Matplotlib-users] Changing the font

2010-04-05 Thread Alex S

Yup, thanks for the help everyone


Michael Droettboom-3 wrote:
 
 For the benefit of future users Googling this problem --
 
 After an off-list discussion, we realized there were a couple of fonts 
 on Alex' system with the names Century Schoolbook and New Century 
 Schoolbook LT Std.  Using one of those names instead resolved the
 problem.
 
 Mike
 
 Alex S wrote:
 Ah ok, I've sent it on to you.  I've just tried setting font.family to
 New
 Century Schoolbook directly but it generates something similar.  I'm
 starting to think part of the problem is that I've set the home directory
 to
 U: somehow, U: being a shared drive which doesn't have a font
 directory... 
 I don't know how I set this, it's not mentioned in the rc file anywhere
 that
 I can see...


 Michael Droettboom-3 wrote:
   
 It would still be helpful to see the whole listing (send it to me 
 offlist) because that will indicate where fonts are being looked for, 
 and hopefully *why* this is failing.

 It should search for fonts in the standard Windows location (usually 
 C:\Windows\Fonts).  Have you tried setting font.family to New Century 
 Schoolbook directly?  (I wonder if the secondary lookup is failing).

 Cheers,
 Mike

 Alex S wrote:
 
 I think I'm using MPL .99.1 (is there a command to check?) on Windows
 XP. 
 Thanks for the debug tip, I don't think posting the whole thing is
 necessary
 because this line seems to be the problem:

 findfont: Could not match
 :family=serif:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
 Returning
 C:\Python26\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf

 So I guess the font's missing from the folder.  Can I add it somehow?



 Michael Droettboom-3 wrote:
   
   
 Can you set verbose.level to debug-annoying in your matplotlibrc 
 file, and then send the output to this list.  That may help us track 
 down where the font lookup is failing.  Also, what platform and
 version 
 of matplotlib are you running?

 Mike

 Alex S wrote:
 
 
 Hi, sorry I wasn't too clear... I changed that, but I don't seem to
 be
 able
 to choose between the different serif fonts, it just always gives me
 the
 default...



 Alex S wrote:
   
   
   
 Hi there,
 I'm trying to change the font default on my graph to New Century
 Schoolbook.  I'm trying to do this by editing the matplotlibrc file. 
 Unfortunately, although I'm able to change the font.family, I can't
 figure
 out how to make it use something other than the default in the
 family... 
 I tried changing the list further down to only include the font I
 want,
 like this:

 font.serif  : New Century Schoolbook #Bitstream Vera Serif,
 New
 Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman,
 Bookman,
 Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif

 (note I commented out the other fonts, just rearranging the list to
 put
 New Century Schoolbook first didn't seem to work either)

 Could anyone tell me what I'm doing wrong?
 Thanks a lot!
 Alex


 
 
 
   
   
   
 -- 
 Michael Droettboom
 Science Software Branch
 Operations and Engineering Division
 Space Telescope Science Institute
 Operated by AURA for NASA


 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


 
 
   
   
 -- 
 Michael Droettboom
 Science Software Branch
 Operations and Engineering Division
 Space Telescope Science Institute
 Operated by AURA for NASA


 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


 

   
 
 -- 
 Michael Droettboom
 Science Software Branch
 Operations and Engineering Division
 Space Telescope Science Institute
 Operated by AURA for NASA
 
 
 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 

Re: [Matplotlib-users] speed up imports?

2010-04-05 Thread Eric Firing
Michael Droettboom wrote:
 All of those calls to open are being generated from the pytz import -- 
 which is why pytz seems like the likely candidate.  Is it possible you 
 have pytz installed as a compressed egg, or on a remote disk, or 
 something that may be causing a file reading penalty?

Mike,

The pytz import time, at nearly 1/3 of the total mpl import time, is 
crazy even on linux, given that it adds only a tiny bit of 
functionality, and as far as I can see, even that is only rarely used.

Therefore I have committed a change so that it is imported only if and 
when it is required.  Our examples still work, after I modified one that 
was trying to import timezone from mpl.dates (although it was not 
actually using timezone).  This probably illustrates the way in which 
this change may break some user code: user programs requiring 
pytz.timezone and pytz.tzinfo will have to import them directly instead 
of getting them from mpl.dates.  I hope this is acceptable; importing 
them from mpl.dates seems like bad practice anyway, since mpl.dates was 
not using them or modifying them but was just passing them on from pytz.

I suspect pytz could be redesigned so that it would not be so 
horrendously slow to import, but I am not going to tackle that.

After the change:

efir...@manini:~$ time python -c import pylab

real0m0.441s
user0m0.372s
sys 0m0.064s

Before the change:

efir...@manini:~$ time python -c import pylab

real0m0.626s
user0m0.480s
sys0m0.124s

Again, this is recent linux on a 3-year-old laptop.

Eric

 
 As Eric said, make sure you time the import pytz in a clean Python 
 session -- if a module is already imported in the Python interpreter, it 
 won't be reimported.
 
 Mike
 


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] How to overlay an image on a multi plot?

2010-04-05 Thread Josh Hemann

Alan,

Thanks much for that link. I started playing with this code and after some
hacking I might get what I need. If I cobble this together successfully I'll
post the results and the code.

Josh

-
Josh Hemann
Statistical Advisor 
http://www.vni.com/ Visual Numerics 
jhemann at vni dizzot com 

-- 
View this message in context: 
http://old.nabble.com/How-to-overlay-an-image-on-a-multi-plot--tp28111498p28143553.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Getting coordinates of the zoom rectangle

2010-04-05 Thread Gökhan Sever
On Mon, Apr 5, 2010 at 3:17 PM, Mauro Cavalcanti mauro...@gmail.com wrote:

 Dear Gökhan,

 Thanks for your reply, but unfortunately it was not entirely helpful.

 The rectangle_selector.py exemple indeed seems to do what I want, by
 means of a callback function, however in the example program this
 function should print the rectangle coordinates to the screen but it
 does nothing.


Check the shell where you called the script. It updates when select a region
and release the mouse.


 BTW, where is the documentation for the matplotlib.widgets classes? I
 could find none.


Just browse the actual source .../lib/matplotlib/widgets.py. Classes are
methods are nicely documented. I would suggest you to use IPython to access
the docstrings with ease.

import matplotlib.widgets as w

w?

w.TAB



 Best regards,

 2010/4/5 Gökhan Sever gokhanse...@gmail.com:
 
 
  On Mon, Apr 5, 2010 at 6:39 AM, Mauro Cavalcanti mauro...@gmail.com
 wrote:
 
  Dear ALL,
 
  Good morning... Here is a question that may already have been asked
  (and answered), but not to my knowledge. Matplotlib's figure windows
  come with that handy navigation bar, which includes a Pan/Zoom button
  and a Zoom-to-rectangle button. Once a zoom rectangle is defined on a
  figure, is it possible to get the coordinates of it (that is, the
  lower and upper corner coordinates which define the zoom rectangle)?
  If so, how can this be done?
 
  Thanks in advance for any reply.
 
  With best regards,
 
  --
  Dr. Mauro J. Cavalcanti
  P.O. Box 46521, CEP 20551-970
  Rio de Janeiro, RJ, BRASIL
  E-mail: mauro...@gmail.com
  Web: http://sites.google.com/site/maurobio
  Linux Registered User #473524 * Ubuntu User #22717
 
  Hi,
 
  Search for zoom_window.py and  rectangle_selector.py in your matplotlib
  examples directory.
 
  --
  Gökhan
 



 --
 Dr. Mauro J. Cavalcanti
 P.O. Box 46521, CEP 20551-970
 Rio de Janeiro, RJ, BRASIL
 E-mail: mauro...@gmail.com
 Web: http://sites.google.com/site/maurobio
 Linux Registered User #473524 * Ubuntu User #22717




-- 
Gökhan
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] How to overlay an image on a multi plot? (Edit: how to plot sparklines on an existing plot)

2010-04-05 Thread Josh Hemann


AlanIsaac wrote:
 
 Nice.
 You might want to see 
 http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001OR
 if you have not already.
 
 Alan Isaac
 

Thanks again Alan. I know I am abusing the term sparkline because I am not
embedding the visualization within text, but I am not sure what else to call
it. I do think that showing the time series not bound within a set of axes,
without labels, underscores that the time series is a quick hit, just like
the histograms are. The main focus should be on the scatter plot, with the
marginal visualizations there to aid in quick assessment of distribution and
behavior over time. For true sparklines, here is 
http://bitworking.org/news/Sparklines_in_data_URIs_in_Python another nice
example in Python .

-
Josh Hemann
Statistical Advisor 
http://www.vni.com/ Visual Numerics 
jhemann at vni dizzot com 

-- 
View this message in context: 
http://old.nabble.com/How-to-overlay-an-image-on-a-multi-plot--tp28111498p28147118.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users