Re: [Matplotlib-users] code searching

2009-02-09 Thread Lionel Roubeyrie
Thanks John, it's what I need.

Le vendredi 06 février 2009 à 13:10 -0600, John Hunter a écrit :
> On Fri, Feb 6, 2009 at 10:56 AM, Ryan May  wrote:
> > Lionel Roubeyrie wrote:
> >> You're right, it's the chaco's zooming plot, I confused.
> >> Is there a way to have this render with matplotlib?
> >
> > The event_handling/zoom_window.py example is kind of similar and might give 
> > some
> > clues of where to go.  But no, I don't know of a straight-forward version of
> > chaco's example using matplotlib.  Patches are accepted. :)
> 
> The following example is pretty close to what you want I think --
> select a span in the upper axes to see the zoom in the lower:
> 
> http://matplotlib.sourceforge.net/examples/widgets/span_selector.html
> 
> JDH
> 
> --
> Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills and code to
> build responsive, highly engaging applications that combine the power of local
> resources and data with the reach of the web. Download the Adobe AIR SDK and
> Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
> ___
> Matplotlib-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
-- 
Lionel Roubeyrie
chargé d'études
LIMAIR - La Surveillance de l'Air en Limousin
http://www.limair.asso.fr



--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] only left and bottom border in figure frame

2009-02-09 Thread Zunbeltz Izaola
Dear Tony,


Thank you very much. This is what I was looking for.
It would be nice if it is integrated in the main matpotlib; 
especially if it would be possible to set the projection type in the
matplotlibrc file.

Zunbeltz

On Fri, 2009-02-06 at 13:05 -0500, Tony S Yu wrote:
> On Feb 6, 2009, at 8:45 AM, Zunbeltz Izaola wrote:
> 
> > Dear all,
> >
> > I would like to have a plot where the frame only have left and
> > bottom border. I can not find in the documentation any function to  
> > draw
> > the Rectangle contained in figure() only with this 2 lines. It is
> > possilbe?
> 
> Hi Zunbeltz,
> 
> Attached is an example of a custom Axes class that does what you want.  
> There are examples at the bottom of the file that show its use. I  
> worked on generalizing this idea for inclusion in MPL, but the code  
> got really nasty, really quickly.
> 
> On a side note, if any of the MPL devs think this would make a useful  
> API example (since this topic has come up a few times on the list),  
> feel free to do whatever you want with it.
> 
> Cheers,
> -Tony
> 
> 
> >
> >
> > Regards,
> >
> > Zunbeltz
> 
-- 
Dr. Zunbeltz Izaola

Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
Methods and Instruments (SF1)
Glienicker Str. 100
D-14109 Berlin

Tel (030) 8062-3179 
Fax (030) 8062-2523 
Room A 349 



--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] release candidate

2009-02-09 Thread Sandro Tosi
Hi John,
thanks for the heads up:)

On Sun, Feb 8, 2009 at 21:46, John Hunter  wrote:
> We have accumulated a number of bug fixes in our stable release
> branch, so I would like to release the 3rd bugfix release.  Please
> test and report any problems
>
>  
> http://matplotlib.sourceforge.net/release-candidates/matplotlib-0.98.5.3.tar.gz

I just built mpl on Debian, and the easy test works fine:

$ python -c "import matplotlib ; print matplotlib.__version__"
0.98.5.3

There are some warnings/errors during docs creation, I'll try to debug
them (but I can assure I'll due in few hours/days); if needed I can
provided the (long) build log :)

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

--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] xticklabels printed twice when using twinx

2009-02-09 Thread Christoffer Aberg
Hi all,

I have noticed a funny behaviour when using twinx to do two plots on the
same axes: the xticklabels are printed twice, once for each axes. This
shows up as slightly thicker labels than for a single axes. It is
particularly visible for ps or pdf output, but can be seen also in an
interactive session.

I can also see this in the figure shown for the two_scales.py example
(http://matplotlib.sourceforge.net/_images/two_scales.png), where the
xticklabels are thicker than the yticklabels (though it is not so
apparent due to different colours. I therefore assume it is not just my
installation. (Adding

for tl in ax2.get_xticklabels():
tl.set_fontsize(16)

just before the last plt.show() in two_scales.py makes it even more
visible)

Does anyone know of a reasonable work-around? Surely it is not the
intended behaviour?

Thanks for any help,
Christoffer Åberg


--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] rc params strangeness/error

2009-02-09 Thread Michael Droettboom
matplotlib is inconsistent in its treatment of rcParams.  Some have 
immediate side effects, others are cached during initialization and 
changing them later has no effect.  This is a long standing problem, but 
not one with an easy solution, since the caching, particularly in the 
case of font lookup, is an important optimization.

Personally, I feel that rcParams should be primarily for environmental 
settings, and thus should not be updatable after initialization -- but 
that's only my opinion -- I have heard the opposite argued rather 
convincingly.  In my opinion, it is the inconsistency between rcParams 
(or lack of documentation about when they are effective) that is worth 
addressing.

In your particular case, there is an easy non-rcParam alternative -- 
just send text parameters to the title command.

Mike

Leo Trottier wrote:
> Hi,
>
> Did anyone have any insight on this?  Alternatively, anyone know why 
> there has been little uptake on this question ...(apologies that it 
> was accidentally sent twice)?
>
> Leo
>
> On Tue, Feb 3, 2009 at 11:42 PM, Leo Trottier  > wrote:
>
> Matplotlib 0.98.5.2
> Location: C:\leo\.matplotlib
> Running Windows XP SP2
> Obtained from pythonxy v. 2.1.10
> No rc customizations ...
>
> I've been having a devil of a time getting my rcParams to update
> mid-script.  Perhaps this isn't possible, but if that's so, it's
> not entirely clear.  Even if it is so, this is seemingly a defect,
> because in an interactive session one expects quite different
> behavior (and no amount of iPython %reset-ing seems to be able to
> help).
>
> Note that manually setting the font (or what have you) in *title*
> works fine.
>
> Here is some example code:
>
> ## BEGIN #
> import matplotlib
> from matplotlib import rc, rcParams, rcdefaults
> from matplotlib.pyplot import plot, show, figure, title
>
> print matplotlib.__version__
> print matplotlib.get_configdir()
> print
> print "rcParams['font.sans-serif']:", rcParams['font.sans-serif']
> print 'family is:', rcParams['font.family']
> print
> figure(4)
> title('This should be in a sans-serif font')
> show()
>
> rcParams['font.sans-serif'] = rcParams['font.monospace']
> print "rcParams['font.sans-serif']:", rcParams['font.sans-serif']
> print 'family is:', rcParams['font.family']
> print
> figure(1)
> title('This should be in a monospace font')
> show()
>
> rcParams['font.sans-serif'] = rcParams['font.serif']
> print "rcParams['font.sans-serif']:", rcParams['font.sans-serif']
> print 'family is:', rcParams['font.family']
> print
> figure(2)
> title('This should be in a serif font')
> show()
>
> rcdefaults()
> print "rcParams['font.sans-serif']:", rcParams['font.sans-serif']
> print 'family is:', rcParams['font.family']
> print
> figure(3)
> title('This should be back to a sans-serif font')
> show()
> # END 
>
>
> 
>
> --
> Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills and code to
> build responsive, highly engaging applications that combine the power of local
> resources and data with the reach of the web. Download the Adobe AIR SDK and
> Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
> 
>
> ___
> Matplotlib-users mailing list
> [email protected]
> 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


--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] basemap install problem for 64-Bit/x86_64 on os-x

2009-02-09 Thread Mike
I needed to update my python interpreter to 64-bit recently on my  
mac.  I all my needed modules updated fine, including matplotlib, but  
basemap gives me trouble:

Python 2.6.1 (r261:67515, Jan 29 2009, 15:27:04)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
 >>> import numpy
 >>> import matplotlib
 >>> from mpl_toolkits.basemap import Basemap
Traceback (most recent call last):
   File "", line 1, in 
   File "/Library/Frameworks/Python64.framework/Versions/2.6/lib/ 
python2.6/site-packages/mpl_toolkits/basemap/__init__.py", line 43, in  

 import _geoslib, netcdftime
ImportError: dlopen(/Library/Frameworks/Python64.framework/Versions/ 
2.6/lib/python2.6/site-packages/_geoslib.so, 2): Symbol not found:  
_GEOSArea
   Referenced from: /Library/Frameworks/Python64.framework/Versions/ 
2.6/lib/python2.6/site-packages/_geoslib.so
   Expected in: dynamic lookup
 >>>

Looking at the install of basemap closely I noticed some errors that  
make me wonder whether the geos libraries need to be compiled as 64- 
bit to work?

ld: warning in /usr/local/lib/libgeos_c.dylib, file is not of  
required architecture
ld: warning in /usr/local/lib/libgeos.dylib, file is notld: warning  
in /usr/local/lib/libgeos_c.dylib, file is not of require
d architecture
ld: warning in /usr/local/lib/libgeos.dylib, file is not of required  
architecture
  of required architecture
ld: warning in /usr/local/lib/libgeos_c.dylib, file is not of  
required architecture
ld: warning in /usr/local/lib/libgeos.dylib, file is not of required  
architecture

As always, any help is much appreciated.

Mike

P.S. Both matplotlib and basemap are from today's svn.



--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Memory leaks in a web application

2009-02-09 Thread A B
Thank you very much, Jouni. Pyplot.close() seems to have done the
trick. I followed your advice and converted my code to use the OO
interface. But I'm not sure how I close the figure in OO ... Any
pointers? Thanks.

--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] basemap install problem for 64-Bit/x86_64 on os-x

2009-02-09 Thread Jeff Whitaker
Mike wrote:
> I needed to update my python interpreter to 64-bit recently on my  
> mac.  I all my needed modules updated fine, including matplotlib, but  
> basemap gives me trouble:
>
> Python 2.6.1 (r261:67515, Jan 29 2009, 15:27:04)
> [GCC 4.0.1 (Apple Inc. build 5465)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>  >>> import numpy
>  >>> import matplotlib
>  >>> from mpl_toolkits.basemap import Basemap
> Traceback (most recent call last):
>File "", line 1, in 
>File "/Library/Frameworks/Python64.framework/Versions/2.6/lib/ 
> python2.6/site-packages/mpl_toolkits/basemap/__init__.py", line 43, in  
> 
>  import _geoslib, netcdftime
> ImportError: dlopen(/Library/Frameworks/Python64.framework/Versions/ 
> 2.6/lib/python2.6/site-packages/_geoslib.so, 2): Symbol not found:  
> _GEOSArea
>Referenced from: /Library/Frameworks/Python64.framework/Versions/ 
> 2.6/lib/python2.6/site-packages/_geoslib.so
>Expected in: dynamic lookup
>  >>>
>
> Looking at the install of basemap closely I noticed some errors that  
> make me wonder whether the geos libraries need to be compiled as 64- 
> bit to work?
>   

Mike:  Yes, I suspect that is the problem.  Unfortunately, I've no idea 
how to fix that.

Even if you get beyond that though - I think you are going to run into 
problems with basemap/geos using python 2.6 and numpy 1.2.1.  I've been 
waiting for a numpy 1.3 release that fully supports python 2.6 before 
digging into this.

-Jeff
>   ld: warning in /usr/local/lib/libgeos_c.dylib, file is not of  
> required architecture
>   ld: warning in /usr/local/lib/libgeos.dylib, file is notld: warning  
> in /usr/local/lib/libgeos_c.dylib, file is not of require
> d architecture
>   ld: warning in /usr/local/lib/libgeos.dylib, file is not of required  
> architecture
>   of required architecture
>   ld: warning in /usr/local/lib/libgeos_c.dylib, file is not of  
> required architecture
>   ld: warning in /usr/local/lib/libgeos.dylib, file is not of required  
> architecture
>
> As always, any help is much appreciated.
>
> Mike
>
> P.S. Both matplotlib and basemap are from today's svn.
>
>
>
> --
> Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills and code to
> build responsive, highly engaging applications that combine the power of local
> resources and data with the reach of the web. Download the Adobe AIR SDK and
> Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
> ___
> Matplotlib-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>   


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


--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Memory leaks in a web application

2009-02-09 Thread Ryan May
On Mon, Feb 9, 2009 at 2:37 PM, A B  wrote:

> Thank you very much, Jouni. Pyplot.close() seems to have done the
> trick. I followed your advice and converted my code to use the OO
> interface. But I'm not sure how I close the figure in OO ... Any
> pointers? Thanks.


If you're using the full OO interface and creating a figure by making an
instance of Figure(), then you shouldn't need to close the figure by hand.
It should be deleted whenever you delete or replace your instance of
Figure.  (If I understand correctly.)

Ryan

-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Memory leaks in a web application

2009-02-09 Thread Jouni K . Seppänen
Ryan May  writes:

> On Mon, Feb 9, 2009 at 2:37 PM, A B  wrote:
>
> If you're using the full OO interface and creating a figure by making an
> instance of Figure(), then you shouldn't need to close the figure by hand.
> It should be deleted whenever you delete or replace your instance of
> Figure.  (If I understand correctly.)

Yes, in the OO interface there is no close() because matplotlib does not
retain any references to the figure object. Garbage collection will take
care of reclaiming memory once the user code has no more references to
the object either.

That said, there have been cases of memory leaks caused by circular
references among objects that have __del__ methods. I think all known
leaks have been fixed, but if I were deploying a long-lived application
that creates lots of figures, I would definitely want to watch its
memory usage in my exact use case.

-- 
Jouni K. Seppänen
http://www.iki.fi/jks


--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] set color of a single point or bar

2009-02-09 Thread C M
Is it possible to set (and unset) the color of a single point
on a line, or an individual bar in a bar chart?

Thanks,
Che

--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users