[Matplotlib-users] How to remove white space

2010-04-01 Thread yogesh karpate
Dear All,
   I have one .png image of 940X780 and i am plotting waveforms
on it. When I save this plot as .png , matp[lotlib gives image in
800X600 that too with white space. I dont want to keep the white space and i
want the same resolution as original image.How should I go ahead?
Thanks in advance!!!
Regards
Yogesh
--
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 remove white space

2010-04-01 Thread Matthias Michler
On Thursday 01 April 2010 09:41:06 yogesh karpate wrote:
 Dear All,
I have one .png image of 940X780 and i am plotting waveforms
 on it. When I save this plot as .png , matp[lotlib gives image in
 800X600 that too with white space. I dont want to keep the white space and
 i want the same resolution as original image.How should I go ahead?
 Thanks in advance!!!
 Regards
 Yogesh

Hi Yogesh,

Doesn't the following example fulfill your needs (already posted to How to 
save file in to image in desired resolution in matplotlib?)?

fig = plt.figure(figsize=(9.4, 7.8))
ax = plt.axes([0.0, 0.0, 1.0, 1.0]) # leaves no white space around the axes
ax.plot([1, 2, 4], lw=5)
ax.set_xticks([]) # removes ticks
ax.set_yticks([])

fig.savefig('test.png', dpi=100)

Kind regards,
Matthias

--
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


[Matplotlib-users] Change axis's scale

2010-04-01 Thread timothee cezard
Hi all,
I have several graph to create and the position on the x axis can vary 
quite a lot.
Most of the time I'm quite happy with the default behavior but when my x 
values are very high matplotlib automatically change the ticks and set a 
scale on the axis (see screenshot) 
http://img6.imageshack.us/img6/6834/chab052195802198642shif.png
I looking for a way to change the default behavior to get a scale in 
10E** instead of some random scale.
Is there a simple way of doing that?

Thanks a lot for your help

Tim

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


--
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] Change axis's scale

2010-04-01 Thread Matthias Michler
On Thursday 01 April 2010 12:27:59 timothee cezard wrote:
 Hi all,
 I have several graph to create and the position on the x axis can vary
 quite a lot.
 Most of the time I'm quite happy with the default behavior but when my x
 values are very high matplotlib automatically change the ticks and set a
 scale on the axis (see screenshot)
 http://img6.imageshack.us/img6/6834/chab052195802198642shif.png
 I looking for a way to change the default behavior to get a scale in
 10E** instead of some random scale.
 Is there a simple way of doing that?

 Thanks a lot for your help

 Tim

Hi Tim,

the random scale you are observing is the originalscale, where some useful 
offset has been substracted and is shown in the lower right.
You can circumvent this behaviour by using your own Formatter like a 
ScalarFormatter withour offset:
  formatter = plt.ScalarFormatter(useOffset=False)
Furthermore you can switch off the scientific formatting (extracting a common 
prefactor) using
  formatter.set_scientific(False)
Applying this formatter to the current axes:
  plt.gca().xaxis.set_major_formatter(formatter)

or a string-formatter like
  majorFormatter = plt.FormatStrFormatter('%.5e')
or
 majorFormatter = plt.FormatStrFormatter('%g')

Kind regards,
Matthias

PS: By the way, you should start a new thread for a new topic (sending a new 
mail to mpl-users) instead of responding to another message.

--
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


[Matplotlib-users] Problems with Matplotlib and Python 2.6

2010-04-01 Thread Mauro Cavalcanti
Dear ALL,

Long time no see Well, I have recently upgraded from Ubuntu
Intrepid to Jaunty (sure, I know that I'm a couple of versions
delayed, but keeping a working system stable is essential). I did not
a fresh install of Ubuntu, just upgraded using the system's facility
for that. Previously I have did that from Ubuntu Hardy to Intrepid,
with less (or no) troubles. However, in Jaunty the default Python
interpreter has been upgraded from 2.5 to 2.6 and this is presenting
the most annoying problems.

For now, the most vexing problem is that although Matplotlib is
correctly installed and seemingly working, it does not show any
graphics! For exemple, if I run the simple example from Matplotlib's
website:

Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type help, copyright, credits or license for more information.
 from pylab import randn, hist
 x = randn(1)
 hist(x, 100)

Instead of a nice histogram, I am just presented with a dump of the
contents of an array:

(array([  2,   0,   1,   2,   1,   2,   1,   3,   4,   7,  15,  16,   9,
  (cut here to save space)
   3.97823055,  4.05708515,  4.13593975,  4.21479434,  4.29364894,
4.37250354]), a list of 100 Patch objects)

No error messages or complaints about a missing graphics backend is
issued, so I'm lost.

Any hints?

Thanks in advance for any assistance you can provide.

Best wishes,

-- 
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

--
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] Problems with Matplotlib and Python 2.6

2010-04-01 Thread Sandro Tosi
On Thu, Apr 1, 2010 at 13:53, Mauro Cavalcanti mauro...@gmail.com wrote:
 Dear ALL,

 Long time no see Well, I have recently upgraded from Ubuntu
 Intrepid to Jaunty (sure, I know that I'm a couple of versions
 delayed, but keeping a working system stable is essential). I did not
 a fresh install of Ubuntu, just upgraded using the system's facility
 for that. Previously I have did that from Ubuntu Hardy to Intrepid,
 with less (or no) troubles. However, in Jaunty the default Python
 interpreter has been upgraded from 2.5 to 2.6 and this is presenting
 the most annoying problems.

Yeah, let's all thanks Ubuntu for the its attention to quality and
well-prepared transitions...

 For now, the most vexing problem is that although Matplotlib is
 correctly installed and seemingly working, it does not show any
 graphics! For exemple, if I run the simple example from Matplotlib's
 website:

 Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
 [GCC 4.3.3] on linux2
 Type help, copyright, credits or license for more information.
 from pylab import randn, hist
 x = randn(1)
 hist(x, 100)

On Debian,

$ python2.6
Python 2.6.5rc2 (r265rc2:78822, Mar 11 2010, 16:48:00)
[GCC 4.4.3] on linux2
Type help, copyright, credits or license for more information.
 from pylab import randn, hist, show
 x = randn(1)
 hist(x, 100)
 show()

works as expected

$ python2.6 -c import matplotlib ; print matplotlib.__version__
0.99.1.1

Wouldn't you want to run ipython instead of python?

Regards,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi

--
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] Problems with Matplotlib and Python 2.6

2010-04-01 Thread Darren Dale
On Thu, Apr 1, 2010 at 7:53 AM, Mauro Cavalcanti mauro...@gmail.com wrote:
 Dear ALL,

 Long time no see Well, I have recently upgraded from Ubuntu
 Intrepid to Jaunty (sure, I know that I'm a couple of versions
 delayed, but keeping a working system stable is essential). I did not
 a fresh install of Ubuntu, just upgraded using the system's facility
 for that. Previously I have did that from Ubuntu Hardy to Intrepid,
 with less (or no) troubles. However, in Jaunty the default Python
 interpreter has been upgraded from 2.5 to 2.6 and this is presenting
 the most annoying problems.

 For now, the most vexing problem is that although Matplotlib is
 correctly installed and seemingly working, it does not show any
 graphics! For exemple, if I run the simple example from Matplotlib's
 website:

 Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
 [GCC 4.3.3] on linux2
 Type help, copyright, credits or license for more information.
 from pylab import randn, hist
 x = randn(1)
 hist(x, 100)

 Instead of a nice histogram, I am just presented with a dump of the
 contents of an array:

 (array([  2,   0,   1,   2,   1,   2,   1,   3,   4,   7,  15,  16,   9,
      (cut here to save space)
       3.97823055,  4.05708515,  4.13593975,  4.21479434,  4.29364894,
        4.37250354]), a list of 100 Patch objects)

 No error messages or complaints about a missing graphics backend is
 issued, so I'm lost.

 Any hints?

When you run setup.py, the install routines attempt to determine what
backend to use. If a suitable gui toolkit is not found, mpl defaults
to the Agg backend. I suggest creating a matplotlibrc file that
specifies a gui backend.

Darren

--
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] Problems with Matplotlib and Python 2.6

2010-04-01 Thread Mauro Cavalcanti
Dears Sandro  Darren,

First of all, thank you *very much* for the fast reply!

Let's see... I have the same problem (no graphics display) with either
Python and IPython. BTW, in previous versions of Python which I'v used
(2.3, 2.4, and 2.5) Matplotlib graphic backends always worked quite
well.

I forgot to mention that I'm using the default version of Matplotlib
that comes with Jaunty and it is quite old (0.98.5.2). Should I will
try to reinstall it from the sources (easy_install only finds the old
version)?

I will check the matplotlibrc, but why should the Agg default backend not work?

With best regards,

2010/4/1 Darren Dale dsdal...@gmail.com:
 On Thu, Apr 1, 2010 at 7:53 AM, Mauro Cavalcanti mauro...@gmail.com wrote:
 Dear ALL,

 Long time no see Well, I have recently upgraded from Ubuntu
 Intrepid to Jaunty (sure, I know that I'm a couple of versions
 delayed, but keeping a working system stable is essential). I did not
 a fresh install of Ubuntu, just upgraded using the system's facility
 for that. Previously I have did that from Ubuntu Hardy to Intrepid,
 with less (or no) troubles. However, in Jaunty the default Python
 interpreter has been upgraded from 2.5 to 2.6 and this is presenting
 the most annoying problems.

 For now, the most vexing problem is that although Matplotlib is
 correctly installed and seemingly working, it does not show any
 graphics! For exemple, if I run the simple example from Matplotlib's
 website:

 Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
 [GCC 4.3.3] on linux2
 Type help, copyright, credits or license for more information.
 from pylab import randn, hist
 x = randn(1)
 hist(x, 100)

 Instead of a nice histogram, I am just presented with a dump of the
 contents of an array:

 (array([  2,   0,   1,   2,   1,   2,   1,   3,   4,   7,  15,  16,   9,
      (cut here to save space)
       3.97823055,  4.05708515,  4.13593975,  4.21479434,  4.29364894,
        4.37250354]), a list of 100 Patch objects)

 No error messages or complaints about a missing graphics backend is
 issued, so I'm lost.

 Any hints?

 When you run setup.py, the install routines attempt to determine what
 backend to use. If a suitable gui toolkit is not found, mpl defaults
 to the Agg backend. I suggest creating a matplotlibrc file that
 specifies a gui backend.

 Darren




-- 
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

--
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] Problems with Matplotlib and Python 2.6

2010-04-01 Thread Sandro Tosi
 I will check the matplotlibrc, but why should the Agg default backend not 
 work?

Because 'Agg' is a file-based backend, that you use when you want to
generate a file as output (a PNG, f.e.), so savefig() works while
show() not.

You are looking for a GUI backend, something like TkAgg, GTKAgg or
Qt4Agg, that calling show() will generate a window with the graph in
it.

Regards,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi

--
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] Problems with Matplotlib and Python 2.6

2010-04-01 Thread Scott Sinclair
On 1 April 2010 13:53, Mauro Cavalcanti mauro...@gmail.com wrote:
 Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
 [GCC 4.3.3] on linux2
 Type help, copyright, credits or license for more information.
 from pylab import randn, hist
 x = randn(1)
 hist(x, 100)

 Instead of a nice histogram, I am just presented with a dump of the
 contents of an array:

 (array([  2,   0,   1,   2,   1,   2,   1,   3,   4,   7,  15,  16,   9,
      (cut here to save space)
       3.97823055,  4.05708515,  4.13593975,  4.21479434,  4.29364894,
        4.37250354]), a list of 100 Patch objects)

 No error messages or complaints about a missing graphics backend is
 issued, so I'm lost.

Are you even expecting the correct behaviour? I'm under the impression
that it's necessary to import and call show() if you want to see the
plot? I thought it was necessary to use IPython in pylab mode to get
the behaviour you're after i.e calling hist also brings up the plot
window.

I guess I'm hijacking your thread to ask whether the example on the
front page is misleading, or if my understanding is flawed?

Cheers,
Scott

--
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


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

2010-04-01 Thread Josh Hemann

Hi All, 

I used the 
http://matplotlib.sourceforge.net/examples/pylab_examples/scatter_hist.html
scatter_hist example  from the Gallery to create the following
visualization:

http://old.nabble.com/file/p28111498/Full5%252B8%252B2_vs_Bulk1%252B2.png 

What I would like to do is overlay some 
http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001OR sparklines  
so in one visualization I can see
 - The correlation between two variables
 - The marginal densities of the variables
 - A quick idea of what the variables did in time

I found some Python code for generating sparklines at M
http://www.perrygeo.net/wordpress/?p=64 atthew Perry's blog . The code works
great for my purposes, and the sparklines are dumped out as PNG files, like
this one

http://old.nabble.com/file/p28111498/spark_x.png 

But, all of the examples and forum discussions I can find pertain to using
an image as the background for a set of axes, and then plotting or
contouring over the image. I simply want to overlay a PNG on an existing set
of multiple axes. I know I can use something like Adobe Illustrator to do
this outside of matplotlib, but is there a way to do this programmatically?

Thanks!

-
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--tp28111498p28111498.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-01 Thread Jeff Klukas
On Thu, Apr 1, 2010 at 11:21 AM, Alex S schmitt.happ...@gmail.com 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?

The default font family is sans-serif, so you also need to add:
font.family  : serif

I think that should solve the problem.

Cheers,
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


Re: [Matplotlib-users] Problems with Matplotlib and Python 2.6 - SOLVED

2010-04-01 Thread Mauro Cavalcanti
Dear ALL,

I finally solved the problems with displying graphics in Matplotib
with Python 2.6 under Ubuntu Jaunty.

It just turned out that, when upgrading from Intrepid to Jaunty,
several required development packages were removed from the system. I
just discovered that when trying to build and install the latest
version of MPL from source. When I installed them, I could build,
install and run the latest version (0.99.1.2) and it is working well!

I had a similar problem with the wxPython 2.8 GUI library (all my GUI
applications which worked well under Python 2.5 broke after the
upgrade to Python 2.6), however in this case the wxPython developers
mantain their own software repository, so that it was just a question
of updating the software sources.

Despite a few ours of pain/panic, I'm rather satisfied with Ubuntu
Jaunty (and surely Karmic and Lynx are even better), which runs faster
and easily than Intrepid and has less bugs than Hardy.

Thanks to Sandro Tosi, Darren Dale, and Scott Sinclair for their suggestions.

With warmest 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

--
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-01 Thread Alan G Isaac
On 4/1/2010 1:26 PM, Josh Hemann wrote:
 What I would like to do is overlay some
 http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001OR  sparklines
 so in one visualization I can see
   - The correlation between two variables
   - The marginal densities of the variables
   - A quick idea of what the variables did in time


http://agile.unisonis.com/proj/sparkplot/sparkplot.py

fwiw,
Alan Isaac


--
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] Animated quiver

2010-04-01 Thread Eric Firing
Fiocco Davide wrote:
 Dear all,
 
 I'm trying to plot a 2D vector field. It's a function of time so I would like 
 to display an animation.
 For single frames I used quiver and I'm happy with it... is there any way to 
 update a quiver with time?
 

If the vectors will always be at the same locations, then you can use 
the set_UVC method to update the vector data; this should make it 
possible to use one of the animation techniques for which examples are 
given in the examples/animation subdirectory of the mpl source 
distribution.  (The examples subdirectory of the source is generally a 
better source of up-to-date examples than the cookbook.)  I haven't 
tried it, though, and I don't know of any example specific to quiver.

Depending on your use case, you may find it more desirable to save a set 
of single frames and then display them as a movie or animated gif.  A 
movie-making example is included in examples/animation.

Eric

 I tried something close to what I found on 
 http://www.scipy.org/Cookbook/Matplotlib/Animations but that didn't work.
 
 Thanks a lot, 
 
 Davide
 --
 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] Changing the font

2010-04-01 Thread Alex S

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
 
 

-- 
View this message in context: 
http://old.nabble.com/Changing-the-font-tp28111472p28112278.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] manual placement of a colorbar

2010-04-01 Thread Jeff Whitaker
On 4/1/10 1:24 PM, Mathew Yeates wrote:
 Hi

 I have a Basemap and I want to manually add a colorbar to the side. As 
 you can see in the attached image, the colorbar is not correctly 
 positioned.

 Here is a snippet of code

 ax=fig.add_axes([0.1,0.1,0.8,.8])
 m = Basemap(resolution='c',projection='cyl',lon_0=0,ax=ax)

 cax = fig.add_axes([0.9, 0.1, 0.1, 0.8]) # setup colorbar axes.
 cmap = mpl.cm.cool
 norm = mpl.colors.Normalize(vmin=5, vmax=10)
 cb1 = mpl.colorbar.ColorbarBase(cax, cmap=cmap,
norm=norm,
orientation='vertical')

 what am I doing wrong?

 Mathew
Nothing.  You just have to tweak the cax parameters to get it positioned 
where you want it.

A quick and dirty approach would be to let matplotlib position the 
colorbar by using

import matplotlib.pyplot as plt

plot stuff on basemap

plt.colorbar(orientation='vertical',shrink=0.5)  # play with the shrink 
param to get it to be the same size as the map

-Jeff


-- 
Jeffrey S. Whitaker Phone  : (303)497-6313
Meteorologist   FAX: (303)497-6449
NOAA/OAR/PSD  R/PSD1Email  : jeffrey.s.whita...@noaa.gov
325 BroadwayOffice : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg


--
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] manual placement of a colorbar

2010-04-01 Thread Mathew Yeates
This doesn't work for what I'm doing. Unless I call contour or something
similar, this will fail. I am only using m.plot and this doesn't set things
up properly to call colorbar.



On Thu, Apr 1, 2010 at 12:40 PM, Jeff Whitaker jsw...@fastmail.fm wrote:

 On 4/1/10 1:24 PM, Mathew Yeates wrote:

 Hi

 I have a Basemap and I want to manually add a colorbar to the side. As you
 can see in the attached image, the colorbar is not correctly positioned.

 Here is a snippet of code

 ax=fig.add_axes([0.1,0.1,0.8,.8])
 m = Basemap(resolution='c',projection='cyl',lon_0=0,ax=ax)

 cax = fig.add_axes([0.9, 0.1, 0.1, 0.8]) # setup colorbar axes.
 cmap = mpl.cm.cool
 norm = mpl.colors.Normalize(vmin=5, vmax=10)
 cb1 = mpl.colorbar.ColorbarBase(cax, cmap=cmap,
   norm=norm,
   orientation='vertical')

 what am I doing wrong?

 Mathew

 Nothing.  You just have to tweak the cax parameters to get it positioned
 where you want it.

 A quick and dirty approach would be to let matplotlib position the colorbar
 by using

 import matplotlib.pyplot as plt

 plot stuff on basemap

 plt.colorbar(orientation='vertical',shrink=0.5)  # play with the shrink
 param to get it to be the same size as the map

 -Jeff


 --
 Jeffrey S. Whitaker Phone  : (303)497-6313
 Meteorologist   FAX: (303)497-6449
 NOAA/OAR/PSD  R/PSD1Email  : jeffrey.s.whita...@noaa.gov
 325 BroadwayOffice : Skaggs Research Cntr 1D-113
 Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg


--
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] manual placement of a colorbar

2010-04-01 Thread Jae-Joon Lee
If you're not afraid of contaminating your code with axes_grid toolkit,

instead

cax = fig.add_axes([0.9, 0.1, 0.1, 0.8]) # setup colorbar axes.

try

from mpl_toolkits.axes_grid import make_axes_locatable
import  matplotlib.axes as maxes

divider = make_axes_locatable(ax)
cax = divider.new_horizontal(5%, pad=0.05, axes_class=maxes.Axes)
fig.add_axes(cax)

This way, the height of the colorbar always matches that of your main axes.

Regards,

-JJ


On Thu, Apr 1, 2010 at 3:24 PM, Mathew Yeates mat.yea...@gmail.com wrote:
 Hi

 I have a Basemap and I want to manually add a colorbar to the side. As you
 can see in the attached image, the colorbar is not correctly positioned.

 Here is a snippet of code

 ax=fig.add_axes([0.1,0.1,0.8,.8])
 m = Basemap(resolution='c',projection='cyl',lon_0=0,ax=ax)

 cax = fig.add_axes([0.9, 0.1, 0.1, 0.8]) # setup colorbar axes.
 cmap = mpl.cm.cool
 norm = mpl.colors.Normalize(vmin=5, vmax=10)
 cb1 = mpl.colorbar.ColorbarBase(cax, cmap=cmap,
    norm=norm,
    orientation='vertical')

 what am I doing wrong?

 Mathew

 --
 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] How to save file in to image in desired resolution in matplotlib?

2010-04-01 Thread Friedrich Romstedt
The list config got me, so to the list too ...

2010/3/31 Matthias Michler matthiasmich...@gmx.net:
 On Wednesday 31 March 2010 09:24:10 yogesh karpate wrote:
 Dear All,
I am using one image of 235X130 and plotting the curve on
 it, now when i save it it goes  in the resoltuion  of 800X600,
 I want to keep the resolution intact.What can be done for that to keep the
 resolution same?
 You can adjust the resolution by changing the figure size and the dpi in
 savefig.

I think, but am not shure, that a problem could be that text is scaled
according to dpi, such that ugly things result with e.g. dpi = 2 or
so.  You can also use, when you have an 2-element iterable *shape*
created, holding the pixel extent:

dpi = fig.dpi
fig.set_size_inches(shape[0] / dpi, shape[1] / dpi)

The standard dpi is sensible, otherwise it's for sure possible to
override beforehand.

Then your save command should give the desired result.  I have no time
to check, sorry, may you do that :-) Thanks.

Friedrich

--
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] manual placement of a colorbar

2010-04-01 Thread Mathew Yeates
Thanks a bunch JJ. I've been trying to figure that one out all day!

Mathew

On Thu, Apr 1, 2010 at 1:04 PM, Jae-Joon Lee lee.j.j...@gmail.com wrote:

 If you're not afraid of contaminating your code with axes_grid toolkit,

 instead

 cax = fig.add_axes([0.9, 0.1, 0.1, 0.8]) # setup colorbar axes.

 try

 from mpl_toolkits.axes_grid import make_axes_locatable
 import  matplotlib.axes as maxes

 divider = make_axes_locatable(ax)
 cax = divider.new_horizontal(5%, pad=0.05, axes_class=maxes.Axes)
 fig.add_axes(cax)

 This way, the height of the colorbar always matches that of your main axes.

 Regards,

 -JJ


 On Thu, Apr 1, 2010 at 3:24 PM, Mathew Yeates mat.yea...@gmail.com
 wrote:
  Hi
 
  I have a Basemap and I want to manually add a colorbar to the side. As
 you
  can see in the attached image, the colorbar is not correctly positioned.
 
  Here is a snippet of code
 
  ax=fig.add_axes([0.1,0.1,0.8,.8])
  m = Basemap(resolution='c',projection='cyl',lon_0=0,ax=ax)
 
  cax = fig.add_axes([0.9, 0.1, 0.1, 0.8]) # setup colorbar axes.
  cmap = mpl.cm.cool
  norm = mpl.colors.Normalize(vmin=5, vmax=10)
  cb1 = mpl.colorbar.ColorbarBase(cax, cmap=cmap,
 norm=norm,
 orientation='vertical')
 
  what am I doing wrong?
 
  Mathew
 
 
 --
  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] a quick way to plot 3D surface with point coordination?

2010-04-01 Thread Friedrich Romstedt
2010/4/1 ericyosho ericyo...@gmail.com:
 And we know that for points with coordination, scatter must be the
 simplest way to visualize them.
 Is there any trick to convert a scatter graph into a surface picture directly?

I'm afraid not, because one needs an algorithm to infer the connectivity :-(

Friedrich

--
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


[Matplotlib-users] Cmap creation

2010-04-01 Thread Bruce Ford
I'm running into walls trying to create a custom cmap.

Running the example custom_cmap.py unchanged, I get :

AttributeError: 'module' object has no attribute 'register_cmap'
  args = ('module' object has no attribute 'register_cmap',)

I've included custom_cmap.py below.  It's a major shortcoming that
there is not a suitable anomaly cmap (with white about the middle).
Please consider this for an addition.

Anyway, what am I missing with this error?  Thanks so much!

Bruce
---
Bruce W. Ford
Clear Science, Inc.
br...@clearscienceinc.com
http://www.ClearScienceInc.com
Phone/Fax: 904-379-9704
8241 Parkridge Circle N.
Jacksonville, FL  32211
Skype:  bruce.w.ford
Google Talk: for...@gmail.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


[Matplotlib-users] speed up imports?

2010-04-01 Thread Andrew Kelly
Has anyone had any success in speeding up the mpl imports?

import matplotlib.pyplot as plt
( or from matplotlib.figure import Figure)

takes 6 full seconds to load.  That seems excessive.  Any ideas?

-Andy
--
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] Cmap creation

2010-04-01 Thread Friedrich Romstedt
You forgot about the attachment?

Friedrich

--
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] speed up imports?

2010-04-01 Thread Friedrich Romstedt
Hmm, I wrote one time a lazy-import module, you create objects and use
their attributes, but the object imports the module not earlier than
the first attribute access.  Thus these objects are used like the
module via import module.  I.e., module = Lazy('matplotlib.module').
 There are also wrappers for classes for replacement of from moudule
import Class syntax.  Is anybody interested, anyway?

Friedrich

--
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] speed up imports?

2010-04-01 Thread Eric Firing
Andrew Kelly wrote:
 Has anyone had any success in speeding up the mpl imports?
 
 import matplotlib.pyplot as plt 
 ( or from matplotlib.figure import Figure)
 
 takes 6 full seconds to load.  That seems excessive.  Any ideas?

Unless you have a very old machine, it sounds like something is wrong.
On my laptop it is about 0.6 seconds. About 20% of that is for numpy.

Are mpl and numpy installed locally on your machine, as opposed to being 
accessed over a samba or nfs mount?

Eric


 
 -Andy
 

--
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] Cmap creation

2010-04-01 Thread Chloe Lewis
The example works for me; Python 2.6.4 (recent Enthought install).

Can you use your new colormap without registering it?

C

On Apr 1, 2010, at 1 Apr, 2:14 PM, Bruce Ford wrote:

 I'm running into walls trying to create a custom cmap.

 Running the example custom_cmap.py unchanged, I get :

 AttributeError: 'module' object has no attribute 'register_cmap'
  args = ('module' object has no attribute 'register_cmap',)

 I've included custom_cmap.py below.  It's a major shortcoming that
 there is not a suitable anomaly cmap (with white about the middle).
 Please consider this for an addition.

 Anyway, what am I missing with this error?  Thanks so much!

 Bruce
 ---
 Bruce W. Ford
 Clear Science, Inc.
 br...@clearscienceinc.com
 http://www.ClearScienceInc.com
 Phone/Fax: 904-379-9704
 8241 Parkridge Circle N.
 Jacksonville, FL  32211
 Skype:  bruce.w.ford
 Google Talk: for...@gmail.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


Chloe Lewis
Graduate student, Amundson Lab
Ecosystem Sciences
137 Mulford Hall
Berkeley, CA  94720-3114
http://nature.berkeley.edu/~chlewis








--
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


[Matplotlib-users] EPS files with LaTeX are invalid

2010-04-01 Thread Thomas Robitaille
Hello,

I upgraded to the latest svn version of matplotlib today, and found that eps 
files produced with the system latex now seem to be invalid. For example, if I 
run the following script

import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as mpl

mpl.rc('text', usetex=False)

fig = mpl.figure()
ax = fig.add_subplot(1,1,1)
fig.savefig('test_notex.eps')

mpl.rc('text', usetex=True)

fig = mpl.figure()
ax = fig.add_subplot(1,1,1)
fig.savefig('test_tex.eps')

and try running pstopdf on them (on MacOS 10.6) I get the following

air:air tom$ pstopdf test_tex.eps 
%%[ Warning: Empty job. No PDF file produced. ] %%
air:air tom$ pstopdf test_notex.eps 
air:air tom$ 

So the file with the system LaTeX enabled no longer works. ps2pdf still works, 
but the error with pstopdf is important, because for example Preview.app on mac 
relies on pstopdf, not ps2pdf.

I tried this on two different computers under MacOS 10.6, and tried with 
ghostscript 8.70 and 8.71 installed, and the problem occurs either way.

Does anyone know what might be causing this? I submitted a bug report a little 
while back about this

https://sourceforge.net/tracker/?func=detailaid=2974953group_id=80706atid=560720

Thanks in advance for any help,

Thomas





--
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] speed up imports?

2010-04-01 Thread Eric Firing
Andrew Kelly wrote:
 Has anyone had any success in speeding up the mpl imports?
 
 import matplotlib.pyplot as plt 
 ( or from matplotlib.figure import Figure)
 
 takes 6 full seconds to load.  That seems excessive.  Any ideas?
 
 -Andy

Andy,

A couple replies came back directly to me (probably intended for the 
list, though), and both reported results similar to yours, on Windows 
machines only.  What OS and version are you running?

Eric

--
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] speed up imports?

2010-04-01 Thread Andrew Kelly
Eric,

I am running it on a windows 7 machine and a windows XP machine.  Odd that
it does this only on win32.

-Andy

On Thu, Apr 1, 2010 at 4:17 PM, Eric Firing efir...@hawaii.edu wrote:

 Andrew Kelly wrote:

 Has anyone had any success in speeding up the mpl imports?

 import matplotlib.pyplot as plt ( or from matplotlib.figure import
 Figure)

 takes 6 full seconds to load.  That seems excessive.  Any ideas?

 -Andy


 Andy,

 A couple replies came back directly to me (probably intended for the list,
 though), and both reported results similar to yours, on Windows machines
 only.  What OS and version are you running?

 Eric

--
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


[Matplotlib-users] downloadable docs?

2010-04-01 Thread Stuart McGraw
I live in a third world part of the US where internet
access is via modem so reading the matplotlib docs via 
the internet very painful.  A full afternoon trying to
build the docs was unsuccessful.

Is there anyplace where I can download pre-built HTML
of all the docs (not just the User Manual)?


--
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] speed up imports?

2010-04-01 Thread C M
On Thu, Apr 1, 2010 at 7:17 PM, Eric Firing efir...@hawaii.edu wrote:
 Andrew Kelly wrote:
 Has anyone had any success in speeding up the mpl imports?

 import matplotlib.pyplot as plt
 ( or from matplotlib.figure import Figure)

 takes 6 full seconds to load.  That seems excessive.  Any ideas?

 -Andy

 Andy,

 A couple replies came back directly to me (probably intended for the
 list, though), and both reported results similar to yours, on Windows
 machines only.  What OS and version are you running?

Sorry Eric, that was indeed intended for the list.  Just for the
list's sake, I'll repeat it:

It takes longer than any other Python module for me, too, about 5-6
seconds on a cold load (on Windows), though faster on a warm load.
 I am running it locally on a laptop that is 1.7 GHz Intel Pentium
laptop with 1Meg RAM.

And I should add:  I don't currently have Linux installed, but will
soon again I hope, and I will take note of how long it takes on Linux.

Thanks,
Che

--
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] speed up imports?

2010-04-01 Thread Gökhan Sever
On Thu, Apr 1, 2010 at 7:57 PM, C M cmpyt...@gmail.com wrote:

 On Thu, Apr 1, 2010 at 7:17 PM, Eric Firing efir...@hawaii.edu wrote:
  Andrew Kelly wrote:
  Has anyone had any success in speeding up the mpl imports?
 
  import matplotlib.pyplot as plt
  ( or from matplotlib.figure import Figure)
 
  takes 6 full seconds to load.  That seems excessive.  Any ideas?
 
  -Andy
 
  Andy,
 
  A couple replies came back directly to me (probably intended for the
  list, though), and both reported results similar to yours, on Windows
  machines only.  What OS and version are you running?

 Sorry Eric, that was indeed intended for the list.  Just for the
 list's sake, I'll repeat it:

 It takes longer than any other Python module for me, too, about 5-6
 seconds on a cold load (on Windows), though faster on a warm load.
  I am running it locally on a laptop that is 1.7 GHz Intel Pentium
 laptop with 1Meg RAM.

 And I should add:  I don't currently have Linux installed, but will
 soon again I hope, and I will take note of how long it takes on Linux.

 Thanks,
 Che


This is Intel Core 2 Duo 2.5Ghz with 4GB Ram.


Platform :
Linux-2.6.31.9-174.fc12.i686.PAE-i686-with-fedora-12-Constantine
Python   : ('CPython', 'tags/r262', '71600')
IPython  : 0.10
Matplotlib   : 1.0.svn.rev8214


I[2]: %time import matplotlib.pyplot as plt
CPU times: user 0.35 s, sys: 0.09 s, total: 0.43 s
Wall time: 1.18 s

My test-bed is IPython -pylab and the first load always takes longer.
Probably it's caching at the first time to speed-up later imports.

-- 
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] downloadable docs?

2010-04-01 Thread Gökhan Sever
On Thu, Apr 1, 2010 at 6:04 PM, Stuart McGraw smcg4...@frii.com wrote:

 I live in a third world part of the US where internet
 access is via modem so reading the matplotlib docs via
 the internet very painful.  A full afternoon trying to
 build the docs was unsuccessful.

 Is there anyplace where I can download pre-built HTML
 of all the docs (not just the User Manual)?


My build-html folder is 111.8 MB totaling 4.215 files.

7z compression makes it down to 72 MB. tar.lzma 85 MB, and tar.bz2 92MB

As far as I know having a recent version of Sphinx, you should be able to
build the documentation yourself. What problems are you seeing?

PDF version ~8MB might be the best option providing that you have low-speed
internet
http://matplotlib.sf.net/Matplotlib.pdf


-- 
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] downloadable docs?

2010-04-01 Thread Stuart McGraw
On 04/01/2010 08:09 PM, Gökhan Sever wrote:
 On Thu, Apr 1, 2010 at 6:04 PM, Stuart McGraw smcg4...@frii.com
 mailto:smcg4...@frii.com wrote:
 
 I live in a third world part of the US where internet
 access is via modem so reading the matplotlib docs via
 the internet very painful.  A full afternoon trying to
 build the docs was unsuccessful.
 
 Is there anyplace where I can download pre-built HTML
 of all the docs (not just the User Manual)?
 
 My build-html folder is 111.8 MB totaling 4.215 files.
 
 7z compression makes it down to 72 MB. tar.lzma 85 MB, and tar.bz2 92MB
 
 As far as I know having a recent version of Sphinx, you should be able
 to build the documentation yourself. What problems are you seeing?

I have python-2.6, matplotlib-0.99.1, spinx-0.6.5 installed on 
Fedora-11 via Fedora's package management system.  I unpacked the
matplotlib source in a tmp dir, cd'd to the doc/ dir, did python
make.py html and got a lot of warnings and errors that I do not 
recall.  Figuring it maybe needed the local src built, I cd'd to
matplotlib and did a python setup.py build which went ok.  
Retried the doc python make.py html -- this time failed 
when trying to build the examples/pylab_examples/loadrec.py 
example: could not import xlwt.  Downloaded, installed xlwt.
Still fails on same example, this time with core dump. 
(For  brevity I've left out a lot of other things I tried.)
Gave up.  :-(

 PDF version ~8MB might be the best option providing that you have
 low-speed internet
 http://matplotlib.sf.net/Matplotlib.pdf

Yes, after looking at it, I think it will do fine.  I posted 
while downloading it and didn't realize the api doc was included.
I guess what I am actually missing is only the examples.  If I
was doing something silly in my attempt to build above (was in a 
rush so read the install instructions pretty quickly) I 'll give
it another try.  Otherwise I think I can live without ther examples, 
or access them online.

Thanks for your response.


--
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