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

2009-09-16 Thread Diaboflo

Hi,
I have a strange problem with matplotlib: I use the greek character phi as a
label ($\phi$). When I display the diagram everything looks fine, only when
I save to an eps file, the phi dissappears (emplty space instead). Some
other characters (\mu, \Delta) don't have this problem. Does anyone have an
idea what the problem could be?
Cheers,
Diaboflo
-- 
View this message in context: 
http://www.nabble.com/Latex-characters-don%27t-show-when-I-save-to-eps-tp25433829p25433829.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Come build with us! The BlackBerry® 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-12, 2009. Register now!
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] loglog plot

2009-09-16 Thread redrum

Hi,

I have a few questions about the loglog plot :

1- Is there a way to a have axis format with real numbers rather than
numbers with exponent ?

2- I would like to have a grid not only for 10^2, 10^3, 10^4, 10^5 ... but
also for the minor axis ticks. is it possible ?

3- I use loglog to plot parallel lines. How can I have the function label
directly displaid next to the plotted straight lines ?

Thanks for your tips.


-- 
View this message in context: 
http://www.nabble.com/loglog-plot-tp25448633p25448633.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Come build with us! The BlackBerry® 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-12, 2009. Register now!
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] plotting traces scrollable window

2009-09-16 Thread S.Selvam
Hi all,

   Few days back i came to know about python-matplotlib module when looking
at segypy(seismic data processsing) python module.It uses pylab.plot(x,y...)
to plot traces.

But the issue is it plots the complete dataset in a single view.I would like
to have plots with decent intervel and have scorllbars.Is there anything do
be done with our matpplotlib functions ?

If it is irrelevant to matplotlib (rather something to be done with segypy
trace processing ) ,kindly ignore this mail / guide me in right way.


-- 
Yours,
S.Selvam
--
Come build with us! The BlackBerry® 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-12, 2009. Register now!
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-16 Thread Michael Droettboom
I can't reproduce this here, but your settings may be different than 
mine.  What rcParams have you specified in your matplotlibrc (in 
particular, is usetex on or off)?  What version of matplotlib?

Mike

Diaboflo wrote:
> Hi,
> I have a strange problem with matplotlib: I use the greek character phi as a
> label ($\phi$). When I display the diagram everything looks fine, only when
> I save to an eps file, the phi dissappears (emplty space instead). Some
> other characters (\mu, \Delta) don't have this problem. Does anyone have an
> idea what the problem could be?
> Cheers,
> Diaboflo
>   

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


--
Come build with us! The BlackBerry® 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-12, 2009. Register now!
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-16 Thread Diaboflo

The simplest case would be:

import pylab
pylab.plot([1,2])
pylab.xlabel("$\phi$")
pylab.savefig("fig.png")
pylab.savefig("fig.eps")

The png has the xlabel as phi, the xlabel in the eps file is just empty.

I use python 2.5, don't really know which version of matplotlib is installed
but it is not older than a year.

Here the latex part of matplotlibrc:

### LaTeX customizations. See
http://www.scipy.org/Wiki/Cookbook/Matplotlib/UsingTex
#text.usetex : False  # use latex for all text handling. The
following fonts
...
#text.latex.unicode : False # use "ucs" and "inputenc" LaTeX packages for
handling
...
#text.latex.preamble :  # IMPROPER USE OF THIS FEATURE WILL LEAD TO LATEX
FAILURES
...
#text.dvipnghack : False  # some versions of dvipng don't handle
...
#text.markup : 'plain'  # Affects how text, such as titles and
labels, are

Thanks for your answers so far.

Diaboflo


-- 
View this message in context: 
http://www.nabble.com/Latex-characters-don%27t-show-when-I-save-to-eps-tp25433829p25474537.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Come build with us! The BlackBerry® 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-12, 2009. Register now!
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] error locating backends module

2009-09-16 Thread Jeff Peery
Hello,
thank you for the respone. I am not working in such a file. I am experiencing 
strange behaviors when trying to import matplotlib. The error message 
"AttributeError: 'module' object has no attribute 'backends'" seems to appear 
depending upon how I import matplotlib. 
 
For example my wxApp is a simple frame holding a canvas and figure and a 
matplotlib toolbar. My canvas is a subclass of matplotlib's canvas and my 
figure is a subclass of matplotlib's Figure, my subclass modules are called 
myCanvas and myFigure. 
 
the wxApp module import as follows:
import matplotlib
import myCanvas
 
the myCanvas module imports as follows:
import matplotlib
import myFigure
 
the myFigure module imports as follows:
import matplotlib
matplotlib.use('WXAgg')
matplotlib.interactive(False)
matplotlib.backends.backend_wxagg._use_accelerator(True)
 
In this case the error occurs in the myFigure module where I call 
use_accelerator:
"myFigure.py", line 19, in  
matplotlib.backends.backend_wxagg._use_accelerator(True)
AttributeError: 'module' object has no attribute 'backends'"

If I comment out the call to use_accelerator, I get this message:
AttributeError: 'module' object has no attribute 'figure' and this occurs at 
the start of my subclass "class Figure(matplotlib.figure.Figure)"
 
Now everything works just great if in the wxApp module I do the following:
import matplotlib
from matplotlib.backends.backend_wxagg import NavigationToolbar2WxAgg
import myCanvas

 
I can wrestle my way through this so that it appears to work ok. However I 
would prefer to understand what is happending and code this properly. 
 
Also, 
(1) I am not sure whether I need to call matplotlib.use('WxAgg') or if it is 
implied when I import the WxAgg backend. 
(2) what is the accelerator
(3) do I need to call matplotlib.interactive(False) in each module using 
matplotlib?
 
thanks for the help!
Jeff

--- On Mon, 9/14/09, Damon McDougall  wrote:


From: Damon McDougall 
Subject: Re: [Matplotlib-users] error locating backends module
To: "Jeff Peery" 
Date: Monday, September 14, 2009, 3:16 PM


Hi Jeff,


You don't happen to be in the same directory as a folder called 'matplotlib' 
when trying to import matplotlib.backends, do you? If so, try moving to a 
different directory before invoking python and importing matplotlib.backends.







Regards,
--Damon


On 14 Sep 2009, at 22:52, Jeff Peery wrote:






hello,
I'm trying to import matplotlib.backends but I get a message indicating that 
matplotlib has no module 'backends'. So I looked to confirm that it was there 
and it is. I also checked if other modules where available (by importing them 
from the command line) and it appears that all the module are available but NOT 
any of the packages located in the matplotlib installation folder.
 
I just downloaded the latest matplotlib and installed it on a brand new 
machine that is running vista. I'm running python 2.6.
 
how do I fix this problem?
 
thanks,
Jeff
--
Come build with us! The BlackBerry® 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-12, 2009. Register now!
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 BlackBerry® 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-12, 2009. Register now!
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-16 Thread Darren Dale
On Wed, Sep 16, 2009 at 11:13 AM, Diaboflo  wrote:
>
> The simplest case would be:
>
> import pylab
> pylab.plot([1,2])
> pylab.xlabel("$\phi$")

Does this help:
pylab.xlabel(r"$\phi$")

> pylab.savefig("fig.png")
> pylab.savefig("fig.eps")
>
> The png has the xlabel as phi, the xlabel in the eps file is just empty.
>
> I use python 2.5, don't really know which version of matplotlib is installed
> but it is not older than a year.
>
> Here the latex part of matplotlibrc:
>
> ### LaTeX customizations. See
> http://www.scipy.org/Wiki/Cookbook/Matplotlib/UsingTex
> #text.usetex         : False  # use latex for all text handling. The
> following fonts
> ...
> #text.latex.unicode : False # use "ucs" and "inputenc" LaTeX packages for
> handling
> ...
> #text.latex.preamble :  # IMPROPER USE OF THIS FEATURE WILL LEAD TO LATEX
> FAILURES
> ...
> #text.dvipnghack     : False  # some versions of dvipng don't handle
> ...
> #text.markup         : 'plain'  # Affects how text, such as titles and
> labels, are
>
> Thanks for your answers so far.

--
Come build with us! The BlackBerry® 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-12, 2009. Register now!
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-16 Thread Diaboflo

Hi,
no, this gives the same result: Fine with $\Delta$ but not with $\phi$ :(
Flo


Darren Dale-3 wrote:
> 
> Does this help:
> pylab.xlabel(r"$\phi$")
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Latex-characters-don%27t-show-when-I-save-to-eps-tp25433829p25475329.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Come build with us! The BlackBerry® 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-12, 2009. Register now!
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-16 Thread Michael Droettboom
Can you send the output of

 >>> import matplotlib
 >>> matplotlib.__version__

It's possible this is a bug that has already been fixed in the 
development version, but I'd like to confirm that by running the same 
version that you have.

Mike

Diaboflo wrote:
> The simplest case would be:
>
> import pylab
> pylab.plot([1,2])
> pylab.xlabel("$\phi$")
> pylab.savefig("fig.png")
> pylab.savefig("fig.eps")
>
> The png has the xlabel as phi, the xlabel in the eps file is just empty.
>
> I use python 2.5, don't really know which version of matplotlib is installed
> but it is not older than a year.
>
> Here the latex part of matplotlibrc:
>
> ### LaTeX customizations. See
> http://www.scipy.org/Wiki/Cookbook/Matplotlib/UsingTex
> #text.usetex : False  # use latex for all text handling. The
> following fonts
> ...
> #text.latex.unicode : False # use "ucs" and "inputenc" LaTeX packages for
> handling
> ...
> #text.latex.preamble :  # IMPROPER USE OF THIS FEATURE WILL LEAD TO LATEX
> FAILURES
> ...
> #text.dvipnghack : False  # some versions of dvipng don't handle
> ...
> #text.markup : 'plain'  # Affects how text, such as titles and
> labels, are
>
> Thanks for your answers so far.
>
> Diaboflo
>
>
>   

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


--
Come build with us! The BlackBerry® 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-12, 2009. Register now!
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-16 Thread Diaboflo



Michael Droettboom-3 wrote:
> 
> Can you send the output of
> 
>  >>> import matplotlib
>  >>> matplotlib.__version__
> 
> It's possible this is a bug that has already been fixed in the 
> development version, but I'd like to confirm that by running the same 
> version that you have.
> 
> Mike
> 

Here you go:

>>> import matplotlib
>>> matplotlib.__version__
'0.91.2'
>>> 

Flo
-- 
View this message in context: 
http://www.nabble.com/Latex-characters-don%27t-show-when-I-save-to-eps-tp25433829p25475534.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Come build with us! The BlackBerry® 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-12, 2009. Register now!
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-16 Thread Michael Droettboom

Hmm...  0.91.2 works for me.  What platform are you on?

When you view the attached file, do you see the "phi" in the title 
area?  That can rule out a problem in your viewer.


If that works for you, can you send me the .eps file you generated?

Mike

Diaboflo wrote:


Michael Droettboom-3 wrote:
  

Can you send the output of

 >>> import matplotlib
 >>> matplotlib.__version__

It's possible this is a bug that has already been fixed in the 
development version, but I'd like to confirm that by running the same 
version that you have.


Mike




Here you go:

  

import matplotlib
matplotlib.__version__


'0.91.2'
  


Flo
  


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



test.eps
Description: PostScript document
--
Come build with us! The BlackBerry® 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-12, 2009. Register now!
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] plotting traces scrollable window

2009-09-16 Thread S.Selvam
On Wed, Sep 16, 2009 at 6:56 PM, S.Selvam  wrote:

> Hi all,
>
>Few days back i came to know about python-matplotlib module when looking
> at segypy(seismic data processsing) python module.It uses pylab.plot(x,y...)
> to plot traces.
>
> But the issue is it plots the complete dataset in a single view.I would
> like to have plots with decent intervel and have scorllbars.Is there
> anything do be done with our matpplotlib functions ?
>
> If it is irrelevant to matplotlib (rather something to be done with segypy
> trace processing ) ,kindly ignore this mail / guide me in right way.
>
>
> --
> Yours,
> S.Selvam
>

this is how the code looks,(a function in segypy module)

def wiggle(Data,SH,skipt=1,maxval=8,lwidth=.1):
"""
wiggle(Data,SH)
"""
import pylab
print "Hello"
t = range(SH['ns'])
for i in range(0,SH['ntraces'],skipt):
trace=Data[:,i]
trace[0]=0
trace[SH['ns']-1]=0
pylab.plot(i+trace/maxval,t,color='red',linewidth=1)
for a in range(len(trace)):
if (trace[a]<0):
trace[a]=0;
pylab.fill(i+Data[:,i]/maxval,t,'k',linewidth=0)
pylab.title(SH['filename'])
pylab.grid(True)
pylab.show()



-- 
Yours,
S.Selvam
--
Come build with us! The BlackBerry® 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-12, 2009. Register now!
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] loglog plot

2009-09-16 Thread Gökhan Sever
On Tue, Sep 15, 2009 at 1:24 AM, redrum  wrote:

>
> Hi,
>
> I have a few questions about the loglog plot :
>
> 1- Is there a way to a have axis format with real numbers rather than
> numbers with exponent ?
>
>
import matplotlib.pyplot as plt
ax1 = plt.gca()
ax1.yaxis.set_major_formatter(ticker.FormatStrFormatter("%.2f"))

You can check formatting options from
http://docs.python.org/library/stdtypes.html#string-formatting-operations




> 2- I would like to have a grid not only for 10^2, 10^3, 10^4, 10^5 ... but
> also for the minor axis ticks. is it possible ?
>

You can use plt.yticks() to get new ticks as well as grids. Do you know how
to make ticklabels like 5x10^2 etc...? This I couldn't figure yet.



> 3- I use loglog to plot parallel lines. How can I have the function label
> directly displaid next to the plotted straight lines ?
>
> Thanks for your tips.
>

plt.text and some fine-tuning?

-- 
Gökhan
--
Come build with us! The BlackBerry® 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-12, 2009. Register now!
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] Polar plots rendered incorrectly in SVG

2009-09-16 Thread Bartosz Telenczuk
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 BlackBerry® 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-12, 2009. Register now!
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] make.osx file

2009-09-16 Thread Thomas Robitaille
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?

Thanks,

Thomas

--
Come build with us! The BlackBerry® 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-12, 2009. Register now!
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-16 Thread Jae-Joon Lee
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
 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 BlackBerry® 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-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
diff --git a/lib/matplotlib/backends/backend_svg.py b/lib/matplotlib/backends/backend_svg.py
index 31765c8..72a9623 100644
--- a/lib/matplotlib/backends/backend_svg.py
+++ b/lib/matplotlib/backends/backend_svg.py
@@ -164,8 +164,9 @@ class RendererSVG(RendererBase):
 def _get_gc_clip_svg(self, gc):
 cliprect = gc.get_clip_rectangle()
 clippath, clippath_trans = gc.get_clip_path()
+trans_and_flip = self._make_flip_transform(clippath_trans)
 if clippath is not None:
-path_data = self._convert_path(clippath, clippath_trans)
+path_data = self._convert_path(clippath, trans_and_flip)
 path = '' % path_data
 elif cliprect is not None:
 x, y, w, h = cliprect.bounds
@@ -211,10 +212,14 @@ class RendererSVG(RendererBase):
 }
 
 def _make_flip_transform(self, transform):
-return (transform +
-Affine2D()
-.scale(1.0, -1.0)
-.translate(0.0, self.height))
+if transform is not None:
+return (transform +
+Affine2D()
+.scale(1.0, -1.0)
+.translate(0.0, self.height))
+else:
+return Affine2D().scale(1.0, -1.0).translate(0.0, self.height)
+
 
 def _convert_path(self, path, transform, clip=False):
 path_data = []
--
Come build with us! The BlackBerry® 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-12, 2009. Register now!
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-16 Thread Eric Firing
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.

Eric

--
Come build with us! The BlackBerry® 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-12, 2009. Register now!
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] Simple pattern recognition

2009-09-16 Thread Gökhan Sever
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.

Thanks.

-- 
Gökhan
--
Come build with us! The BlackBerry® 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-12, 2009. Register now!
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-16 Thread Tony S Yu


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

--
Come build with us! The BlackBerry® 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-12, 2009. Register now!
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-16 Thread Nicolas Bigaouette
I have reported that issue on the tracker at the end of July. You can fin
dit here:
http://sourceforge.net/tracker/?func=detail&atid=560720&aid=2830483&group_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 

> 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 BlackBerry® 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-12, 2009. Register now!
> 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 BlackBerry® 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-12, 2009. Register now!
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] matshow

2009-09-16 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
<>--
Come build with us! The BlackBerry® 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-12, 2009. Register now!
http://p.sf.net/sfu/devconf___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users