[Matplotlib-users] matshow

2009-09-17 Thread Bala subramanian
Friends,

I have a matrix data and i used matshow() function to plot. The plot is
attached.

1) After plotting the data, i used xticks() function to change the x-axis
tick labels from x1 to x12 ( figure attached). Similarly I want to change
the y-axis tick labels into as A,B and C,  instead of 0,1,2 (in the attached
figure) but when i use yticks() function as below, it dosent happen, instead
it changes the plot.

yticks( arange(3), ('A','B','C'))

2) I used the colormap *cm.autumn* to create the plot. Suppose if i want to
generate the same plot with green,black, red combination, how should i
specify the colors in matshow.

Thanks in advance.
Bala
attachment: test.png--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] matplotlib 0.99.1rc1 available for testing

2009-09-17 Thread Werner F. Bruhin
Eric,

Eric Firing wrote:
 Werner,

 Instead, it looks to me like the best solution is the one you 
 provided at the very bottom of 
 http://www.py2exe.org/index.cgi/MatPlotLib.
 I am happy with what ever change is done as long as it also works for
 py2exe'd application.


 I have applied this fix to the branch and the trunk, so wxversion will 
 not be imported by py2exe'ed programs.
Great.

I will check it out on the next rc or release.

Werner



--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Latex characters don't show when I save to eps

2009-09-17 Thread Diaboflo

Hi all,
I got my administrator to update the python modules (matplotlib, scipy,
numpy) and now it works fine. Seems to be an already fixed bug.
Thanks to all for your help!
Flo
-- 
View this message in context: 
http://www.nabble.com/Latex-characters-don%27t-show-when-I-save-to-eps-tp25433829p25487259.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] DeprecationWarning

2009-09-17 Thread Nils Wagner
Hi all,

Is it possible to suppress the output of 
DeprecationWarning messages on the screen ?

Nils

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] DeprecationWarning

2009-09-17 Thread Jouni K . Seppänen
Nils Wagner nwag...@iam.uni-stuttgart.de writes:

 Is it possible to suppress the output of 
 DeprecationWarning messages on the screen ?

Run python with the -Wignore::DeprecationWarning option; see the manual
page for details.

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


--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] mplot3d bars3d demo

2009-09-17 Thread Michael Droettboom
The bug was fixed on the 0.99.x branch, not in 0.99.0 (which predates 
the fix).  The fix should, however, make it into the forthcoming 0.99.1 
release.

Cheers,
Mike

Nicolas Bigaouette wrote:
 I have reported that issue on the tracker at the end of July. You can 
 fin dit here:
 http://sourceforge.net/tracker/?func=detailatid=560720aid=2830483group_id=80706
  
 http://sourceforge.net/tracker/?func=detailatid=560720aid=2830483group_id=80706
  


 It's supposed to be fixed in 0.99... are you sure you are using it?

 I remember trying it just after the bug was closed with an svn version 
 and it was working. But then again I just tried it  (0.99.0) and I get 
 the bad behaviour... You seem not to be the only one! Maybe the issue 
 should be re-opened.


 2009/9/16 Sammy Yu temi...@gmail.com mailto:temi...@gmail.com

 Hi,
   I've been playing around with mplotlib's 3d charting functionality.
  I wanted to generate something similar to this example:
 
 http://matplotlib.sourceforge.net/plot_directive/mpl_examples/mplot3d/bars3d_demo.py

 However, the number on scales are off (see attached). It should
 look like this:
 http://matplotlib.sourceforge.net/_images/bars3d_demo.png

 I'm running matplotlib-0.99.0.  Is this a known issue?

 Thanks,
 Sammy

 
 --
 Come build with us! The BlackBerryreg; Developer Conference in SF, CA
 is the only developer event you need to attend this year.
 Jumpstart your
 developing skills, take BlackBerry mobile applications to market
 and stay
 ahead of the curve. Join us from November 9#45;12, 2009. Register
 now#33;
 http://p.sf.net/sfu/devconf
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 mailto:Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


 

 --
 Come build with us! The BlackBerryreg; Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay 
 ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
 http://p.sf.net/sfu/devconf
 

 ___
 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


--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Polar plots rendered incorrectly in SVG

2009-09-17 Thread Michael Droettboom
Thanks.  I think you're right, Jae-Joon.  I've committed a slightly 
simplified version of your patch on the 0.99 branch and trunk.

Mike

Jae-Joon Lee wrote:
 Thanks for reporting the problem.
 I can reproduce this error in the svn trunk.

 My diagnosis is that this is because the clip mask is not correctly
 set, i.e., the mask path is not properly flipped in the svg backend.
 I was able to solve this particular problem using the attached patch.
 But, i'm not sure if this patch is a general solution. So, I hope
 other developers step in.

 Bartosz, below is a workaround you may use meanwhile. Note that the
 workaround will give correct result only for svg backend.


 import matplotlib.pyplot as plt
 import numpy as np

 fig = plt.figure()
 ax = fig.add_axes([0.4, 0.4, 0.25, 0.25], polar=True)

 # modify the ax.patch transform to work around with svg backend bug
 import matplotlib.transforms as mtransforms
 flipped_transAxes = mtransforms.BboxTransformTo(ax.bbox) \
 + mtransforms.Affine2D().scale(1.0,
 -1.0).translate(0., 72*fig.get_figheight())

 ax.patch.set_transform(flipped_transAxes)
 ax.xaxis.set_clip_path(ax.patch)
 ax.yaxis.set_clip_path(ax.patch)


 theta1 = np.pi/4
 ax.plot([theta1, theta1], [0, 1], '-')

 plt.savefig('test_polar.svg')
 plt.savefig('test_polar.png')

 Regards,

 -JJ


 On Wed, Sep 16, 2009 at 2:56 PM, Bartosz Telenczuk
 b.telenc...@biologie.hu-berlin.de wrote:
   
 Dear all,

 I have a problem with exporting polar plots to SVG. When attached to
 axes which are not centered in the figure, the content (grids, data,
 etc.) seems not to be shifted correctly with the axes. However, when I
 plot it directly to the screen or export to PNG everything is fine.

 Here is an example reproducing this error:

 import matplotlib.pyplot as plt
 import numpy as np

 fig = plt.figure()
 ax = fig.add_axes([0.4, 0.4, 0.25, 0.25], polar=True)

 theta1 = np.pi/4
 ax.plot([theta1, theta1], [0, 1], '-')

 plt.savefig('test_polar.svg')
 plt.savefig('test_polar.png')
 plt.show()

 I was able to reproduce the problem it in matplotlib  0.99.0 (Backend:
 GTKAgg).


 Cheers,

 Bartosz


 --
 Come build with us! The BlackBerryreg; Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
 http://p.sf.net/sfu/devconf
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users

 
 

 --
 Come build with us! The BlackBerryreg; Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay 
 ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
 http://p.sf.net/sfu/devconf
 

 ___
 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


--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Simple pattern recognition

2009-09-17 Thread Gökhan Sever
On Wed, Sep 16, 2009 at 10:46 PM, Tony S Yu ton...@mit.edu wrote:


 On Sep 16, 2009, at 8:22 PM, Gökhan Sever wrote:

 Hello all,

 I want to be able to count predefined simple rectangle shapes on an image
 as shown like in this one:
 http://img7.imageshack.us/img7/2327/particles.png

 Which is in my case to count all the blue pixels (they are ice-snow flake
 shadows in reality) in one of the column.

 What is the way to automate this task, which library or technique should I
 study to tackle it.


 You should check out the ndimage subpackage in scipy.

 This tutorial should help you get started:
 http://docs.scipy.org/doc/scipy/reference/tutorial/ndimage.html
 The section on segmentation and labeling will be particularly useful for
 you.

 Best,
 -Tony

 http://docs.scipy.org/doc/scipy/reference/tutorial/ndimage.html


Right into the eye.

Segmentation is the process of separating objects of interest from the
background.

Once I finish this task, I should be able to count the occurrences of the
shadowed instances so that I would have an idea regarding to their sizes.



-- 
Gökhan
--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] saving an axes to draw in a different figure

2009-09-17 Thread jason-sage
I'm trying to draw the axes from one figure directly over the axes for 
another figure, in a sense, combining the two axes as two layers on one 
figure.

So, first I get an axes instance, ax.

import matplotlib.pyplot as plt
fig=plt.figure()
fig.add_subplot(111)
plt.plot(range(10), [i^2 for i in range(10)])
ax=fig.axes[0]
plt.savefig('test.png')


Okay, now I have the axes ax.  I want to draw ax directly on top of 
the following figure, and get a result that would be the same as if I 
had called the plot command above directly in the following code.  All 
I'm passed in my real code is the newax variable below, which is why I 
use newax.get_figure()).

fig=plt.figure()
newax=fig.add_subplot(111)
ax.set_figure(newax.get_figure())
newax.get_figure().add_axes(ax,label=newax)
plt.savefig('test2.png')

However, the result of test2.png is not very pretty and definitely not 
what I want.  The tick labels for the y-axis are all scrunched up, for 
example.

Can anyone help?

For those curious, what I'm doing is working on getting the Sage 
graphics code to be able to wrap and intelligently display matplotlib 
axes objects, so that a person could easily create a matplotlib axes, 
wrap it in the Sage graphics class, and then be able to manipulate it in 
Sage.  In order for this to work, it seems like I need to save the axes 
object I care about, and then when Sage composes it's final figure 
(using matplotlib), it passes me an AxesSubplot object.  I need to 
somehow take that subplot object and draw my saved axes on it in the 
most intelligent way possible.  In the code above, I try taking the 
given AxesSubplot object, getting the figure from that, and then just 
adding my saved axes to that figure.  Is there a better way to do this?

Thanks,

Jason

--
Jason Grout



--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Issues with PNG creation

2009-09-17 Thread Benjamin Welton
Hello All,

Iv run into a strange issue involving outputting a graph to a png 
format. Anytime i try to output a png file the python interpreter 
crashes.  However when using other formats (such as pdf or svg) there 
are no issues with the output. I am running python 2.5.4 x86 on Windows 
2008 Server x64 sp1. I have included the error information and some 
short examples of code that i am attempting to use to output the data to 
an image format below. Any help i could get with this would be great.

Thanks,
Ben

Works Fine
=
  import matplotlib   
  matplotlib.use(Agg)
  import pylab
  pylab.plot([0,1,2,3],[0,1,2,3])
[matplotlib.lines.Line2D object at 0x03228C10]
  pylab.savefig(test.svg)

Fails with crash error below
=
  import matplotlib
  matplotlib.use(Agg)
  import pylab
  pylab.plot([0,1,2,3],[0,1,2,3])
[matplotlib.lines.Line2D object at 0x03228C10]
  pylab.savefig(test.png) 
 
Problem signature:
  Problem Event Name:APPCRASH
  Application Name:python.exe
  Application Version:0.0.0.0
  Application Timestamp:4625bfee
  Fault Module Name:ntdll.dll
  Fault Module Version:6.0.6001.18000
  Fault Module Timestamp:4791a783
  Exception Code:c005
  Exception Offset:0003dbba
  OS Version:6.0.6001.2.1.0.272.7
  Locale ID:1033
  Additional Information 1:c11a
  Additional Information 2:18d232e4d8435ebf655f59efa077f117
  Additional Information 3:3cc0
  Additional Information 4:2bc86780a51643567bc39fde6d5f1f8a


--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] make.osx file

2009-09-17 Thread John Hunter
On Wed, Sep 16, 2009 at 5:07 PM, Thomas Robitaille
thomas.robitai...@gmail.com wrote:
 Hello,

 The make.osx file is now required (or at least recommended) to build
 matplotlib on MacOS X, but the file is absent from the 0.9.1 RC1
 tarfile. Is this an oversight, or is it deliberate?


This is fixed in the release branch and will make it into 0.99.1.
Thanks for the report

JDH

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Issues with PNG creation

2009-09-17 Thread John Hunter
On Thu, Sep 17, 2009 at 1:54 PM, Benjamin Welton
benjamin.r.wel...@wmich.edu wrote:
 Hello All,

    Iv run into a strange issue involving outputting a graph to a png
 format. Anytime i try to output a png file the python interpreter
 crashes.  However when using other formats (such as pdf or svg) there
 are no issues with the output. I am running python 2.5.4 x86 on Windows
 2008 Server x64 sp1. I have included the error information and some
 short examples of code that i am attempting to use to output the data to
 an image format below. Any help i could get with this would be great.


matplotlib version?  what installer did you use?  Did you do a clean install?

See

  
http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#obtaining-matplotlib-version
  
http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#report-a-problem
  
http://matplotlib.sourceforge.net/faq/installing_faq.html#cleanly-rebuild-and-reinstall-everything

JDH

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] tk_agg plotting error when using legend()

2009-09-17 Thread Adam Ginsburg
Hi, I'm running into the following error:


findfont: Matching
:family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=medium
to Bitstream Vera Sans (/usr/X11R6/lib/X11/fonts/TTF/Vera.ttf) with
score of 0.00
Found dvipng version 1.11
findfont: Matching
:family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=large
to Bitstream Vera Sans (/usr/X11R6/lib/X11/fonts/TTF/Vera.ttf) with
score of 0.00
Exception in Tkinter callback
Traceback (most recent call last):
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk/Tkinter.py,
line 1410, in __call__
return self.func(*args)
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backends/backend_tkagg.py,
line 212, in resize
self.show()
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backends/backend_tkagg.py,
line 215, in draw
FigureCanvasAgg.draw(self)
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backends/backend_agg.py,
line 388, in draw
self.figure.draw(self.renderer)
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/artist.py,
line 55, in draw_wrapper
draw(artist, renderer, *kl)
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/figure.py,
line 772, in draw
for a in self.axes: a.draw(renderer)
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/artist.py,
line 55, in draw_wrapper
draw(artist, renderer, *kl)
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/axes.py,
line 1760, in draw
a.draw(renderer)
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/artist.py,
line 55, in draw_wrapper
draw(artist, renderer, *kl)
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/legend.py,
line 389, in draw
self._legend_box.draw(renderer)
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/offsetbox.py,
line 240, in draw
c.draw(renderer)
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/offsetbox.py,
line 240, in draw
c.draw(renderer)
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/offsetbox.py,
line 240, in draw
c.draw(renderer)
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/offsetbox.py,
line 240, in draw
c.draw(renderer)
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/offsetbox.py,
line 504, in draw
c.draw(renderer)
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/artist.py,
line 55, in draw_wrapper
draw(artist, renderer, *kl)
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/lines.py,
line 530, in draw
drawFunc(renderer, gc, tpath, affine.frozen())
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/lines.py,
line 866, in _draw_lines
self._lineFunc(renderer, gc, path, trans)
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/lines.py,
line 917, in _draw_dashed
renderer.draw_path(gc, path, trans)
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backends/backend_agg.py,
line 117, in draw_path
self._renderer.draw_path(gc, path, transform, rgbFace)
TypeError: float() argument must be a string or a number
Exception in Tkinter callback
Traceback (most recent call last):
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk/Tkinter.py,
line 1410, in __call__
return self.func(*args)
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backends/backend_tkagg.py,
line 212, in resize
self.show()
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backends/backend_tkagg.py,
line 215, in draw
FigureCanvasAgg.draw(self)
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backends/backend_agg.py,
line 388, in draw
self.figure.draw(self.renderer)
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/artist.py,
line 55, in draw_wrapper
draw(artist, renderer, *kl)
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/figure.py,
line 772, in draw
for a in self.axes: a.draw(renderer)
  File 

Re: [Matplotlib-users] tk_agg plotting error when using legend()

2009-09-17 Thread Jae-Joon Lee
This turned out to be a bug in the legend code. This is now fixed in
the maint. branch and the trunk.

Adam,
Do you want these vertical lines show up in the legend?
If not, the easiest workaround is to use some garbage label which
starts with _, i.e.,

vlines(3e10/6000e-8,1e-7,1e-4,linestyle='--', label=_nolabel)

If you want, you may use axvline or plot instead, which creates a
Line2D instance (instead of LineCollection) which will work fine with
the legend.

Regards,

-JJ




On Thu, Sep 17, 2009 at 4:28 PM, Adam Ginsburg
adam.ginsb...@colorado.edu wrote:
 Hi, I'm running into the following error:


 findfont: Matching
 :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=medium
 to Bitstream Vera Sans (/usr/X11R6/lib/X11/fonts/TTF/Vera.ttf) with
 score of 0.00
 Found dvipng version 1.11
 findfont: Matching
 :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=large
 to Bitstream Vera Sans (/usr/X11R6/lib/X11/fonts/TTF/Vera.ttf) with
 score of 0.00
 Exception in Tkinter callback
 Traceback (most recent call last):
  File 
 /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk/Tkinter.py,
 line 1410, in __call__
    return self.func(*args)
  File 
 /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backends/backend_tkagg.py,
 line 212, in resize
    self.show()
  File 
 /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backends/backend_tkagg.py,
 line 215, in draw
    FigureCanvasAgg.draw(self)
  File 
 /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backends/backend_agg.py,
 line 388, in draw
    self.figure.draw(self.renderer)
  File 
 /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/artist.py,
 line 55, in draw_wrapper
    draw(artist, renderer, *kl)
  File 
 /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/figure.py,
 line 772, in draw
    for a in self.axes: a.draw(renderer)
  File 
 /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/artist.py,
 line 55, in draw_wrapper
    draw(artist, renderer, *kl)
  File 
 /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/axes.py,
 line 1760, in draw
    a.draw(renderer)
  File 
 /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/artist.py,
 line 55, in draw_wrapper
    draw(artist, renderer, *kl)
  File 
 /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/legend.py,
 line 389, in draw
    self._legend_box.draw(renderer)
  File 
 /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/offsetbox.py,
 line 240, in draw
    c.draw(renderer)
  File 
 /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/offsetbox.py,
 line 240, in draw
    c.draw(renderer)
  File 
 /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/offsetbox.py,
 line 240, in draw
    c.draw(renderer)
  File 
 /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/offsetbox.py,
 line 240, in draw
    c.draw(renderer)
  File 
 /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/offsetbox.py,
 line 504, in draw
    c.draw(renderer)
  File 
 /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/artist.py,
 line 55, in draw_wrapper
    draw(artist, renderer, *kl)
  File 
 /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/lines.py,
 line 530, in draw
    drawFunc(renderer, gc, tpath, affine.frozen())
  File 
 /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/lines.py,
 line 866, in _draw_lines
    self._lineFunc(renderer, gc, path, trans)
  File 
 /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/lines.py,
 line 917, in _draw_dashed
    renderer.draw_path(gc, path, trans)
  File 
 /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backends/backend_agg.py,
 line 117, in draw_path
    self._renderer.draw_path(gc, path, transform, rgbFace)
 TypeError: float() argument must be a string or a number
 Exception in Tkinter callback
 Traceback (most recent call last):
  File 
 /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk/Tkinter.py,
 line 1410, in __call__
    return self.func(*args)
  File 
 /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backends/backend_tkagg.py,
 line 212, in resize
    self.show()
  File 
 /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backends/backend_tkagg.py,
 line 215, in draw
    

[Matplotlib-users] axes3d material in matplotlib-0.99.0.win32-py2.5 missing?

2009-09-17 Thread Reckoner
unless I'm misunderstanding something, the website says that

matplotlib-0.99.0.win32-py2.5

should contain the axes3d material. It doesn't. Instead, it axes3d.py
contains the following:

raise NotImplementedError('axes3d is not supported in matplotlib-0.98.
 You may want to try the 0.91.x maintenance branch')

note that I am on a Windows machine and I'm not sure I can build
everything from the trunk.

thanks in advance.

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] axes3d material in matplotlib-0.99.0.win32-py2.5 missing?

2009-09-17 Thread John Hunter
On Thu, Sep 17, 2009 at 6:46 PM, Reckoner recko...@gmail.com wrote:
 unless I'm misunderstanding something, the website says that

 matplotlib-0.99.0.win32-py2.5

 should contain the axes3d material. It doesn't. Instead, it axes3d.py
 contains the following:

 raise NotImplementedError('axes3d is not supported in matplotlib-0.98.
  You may want to try the 0.91.x maintenance branch')

 note that I am on a Windows machine and I'm not sure I can build
 everything from the trunk.

It looks like you are having tow problems -- first, you apparently
installed a new matplotlib over an old matplotlib and so there are
some old files laying around. Blow away site-packages/matplotlib and
reinstall.  See

  
http://matplotlib.sourceforge.net/faq/installing_faq.html#cleanly-rebuild-and-reinstall-everything

Secondly, you need to be importing mplot3d from mpl_toolkits, it's new
location.  You appear to be importing it from matplotlib.axes3d, it's
old location which is now deprecated.  Eg see

http://matplotlib.sourceforge.net/mpl_toolkits/mplot3d/tutorial.html

Hope this helps,
JDH

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] axes3d material in matplotlib-0.99.0.win32-py2.5 missing?

2009-09-17 Thread Reckoner
thanks. does this mean that

http://www.scipy.org/Cookbook/Matplotlib/mplot3D

is out of date?

thanks



On Thu, Sep 17, 2009 at 6:22 PM, John Hunter jdh2...@gmail.com wrote:
 On Thu, Sep 17, 2009 at 6:46 PM, Reckoner recko...@gmail.com wrote:
 unless I'm misunderstanding something, the website says that

 matplotlib-0.99.0.win32-py2.5

 should contain the axes3d material. It doesn't. Instead, it axes3d.py
 contains the following:

 raise NotImplementedError('axes3d is not supported in matplotlib-0.98.
  You may want to try the 0.91.x maintenance branch')

 note that I am on a Windows machine and I'm not sure I can build
 everything from the trunk.

 It looks like you are having tow problems -- first, you apparently
 installed a new matplotlib over an old matplotlib and so there are
 some old files laying around. Blow away site-packages/matplotlib and
 reinstall.  See

  http://matplotlib.sourceforge.net/faq/installing_faq.html#cleanly-rebuild-and-reinstall-everything

 Secondly, you need to be importing mplot3d from mpl_toolkits, it's new
 location.  You appear to be importing it from matplotlib.axes3d, it's
 old location which is now deprecated.  Eg see

 http://matplotlib.sourceforge.net/mpl_toolkits/mplot3d/tutorial.html

 Hope this helps,
 JDH


--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] axes3d material in matplotlib-0.99.0.win32-py2.5 missing?

2009-09-17 Thread Eric Firing
Reckoner wrote:
 thanks. does this mean that
 
 http://www.scipy.org/Cookbook/Matplotlib/mplot3D
 
 is out of date?

Yes.

Eric

 
 thanks
 
 
 
 On Thu, Sep 17, 2009 at 6:22 PM, John Hunter jdh2...@gmail.com wrote:
 On Thu, Sep 17, 2009 at 6:46 PM, Reckoner recko...@gmail.com wrote:
 unless I'm misunderstanding something, the website says that

 matplotlib-0.99.0.win32-py2.5

 should contain the axes3d material. It doesn't. Instead, it axes3d.py
 contains the following:

 raise NotImplementedError('axes3d is not supported in matplotlib-0.98.
  You may want to try the 0.91.x maintenance branch')

 note that I am on a Windows machine and I'm not sure I can build
 everything from the trunk.
 It looks like you are having tow problems -- first, you apparently
 installed a new matplotlib over an old matplotlib and so there are
 some old files laying around. Blow away site-packages/matplotlib and
 reinstall.  See

  
 http://matplotlib.sourceforge.net/faq/installing_faq.html#cleanly-rebuild-and-reinstall-everything

 Secondly, you need to be importing mplot3d from mpl_toolkits, it's new
 location.  You appear to be importing it from matplotlib.axes3d, it's
 old location which is now deprecated.  Eg see

 http://matplotlib.sourceforge.net/mpl_toolkits/mplot3d/tutorial.html

 Hope this helps,
 JDH

 
 --
 Come build with us! The BlackBerryreg; Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay 
 ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
 http://p.sf.net/sfu/devconf
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] violin plots

2009-09-17 Thread Andrew Straw
Flávio Coelho has implemented Violin plots for MPL. Nice! He has a
question regarding its suitability for inclusion due to a dependency on
scipy for the gaussian_kde function.
http://pyinsci.blogspot.com/2009/09/violin-plot-with-matplotlib.html

Is there a place this could live in the MPL code base without requiring
scipy? Perhaps we should just include it as a demo. I note that
examples/pylab_examples/demo_agg_filter.py requires scipy, too.

Thanks Flávio for sharing -- I have occasionally wondered how my data
would look in a violin plot.

-Andrew

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users