[Matplotlib-users] exporting with alpha channel, mathtext, contour labels

2006-06-19 Thread John Pye




Hi all,

Just created a a diagram as the overlay of a pcolor plot with a
labelled contour plot. I had a few issues:

  When exporting the following image, which is a pcolor plot with
alpha=0.15 and contours on top, I get no alpha channel in the resulting
output, regard of whether I export as EPS or SVG. Is exporting with
alpha channel not supported in those formats?
  
  In the titles, which are generated using mathtext strings, I
can't get spaces in the captions. I checked the manual.  Here is an
example of what I typed: pylab.xlabel(r"$\it{Mass flowrate,
}\rm{\dot{m} (kg/s)}$")
  
  A couple of misaligned contour labels (eg '27' in the below)
  

Any suggestions?

This is with the latest Matplotlib 0.87.3, Python 2.4, ubuntu 6.06.

Cheers
JP


-- 
John Pye
Department of Mechanical and Manufacturing Engineering
University of New South Wales, Sydney, Australia
http://pye.dyndns.org/



___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] exporting with alpha channel, mathtext, contour labels

2006-06-19 Thread Paul Barrett
On 6/19/06, John Pye <[EMAIL PROTECTED]> wrote:



  

  
Just created a a diagram as the overlay of a pcolor plot with a
labelled contour plot. I had a few issues:

  When exporting the following image, which is a pcolor plot with
alpha=0.15 and contours on top, I get no alpha channel in the resulting
output, regard of whether I export as EPS or SVG. Is exporting with
alpha channel not supported in those formats?Alpha blending is not supported in Postscript (i.e. EPS).  However, SVG can support it and it does appear to be implemented for the drawing of lines in the SVG backend.  Why it does not work, I can't say.
In the titles, which are generated using mathtext strings, I
can't get spaces in the captions. I checked the manual.  Here is an
example of what I typed: pylab.xlabel(r"$\it{Mass flowrate,
}\rm{\dot{m} (kg/s)}$")You will need to escape the spaces in TeX mode, i.e. '\ '
A couple of misaligned contour labels (eg '27' in the below)From understanding, this issue has always been problematical. A fair amount of time was spent on trying to get it right.  The developer(s) may be able to expand on this.

Any suggestions?

This is with the latest Matplotlib 0.87.3, Python 2.4, ubuntu 6.06.
Nice plot! -- Paul
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] exporting with alpha channel, mathtext, contour labels

2006-06-19 Thread Darren Dale
On Monday 19 June 2006 4:11 am, John Pye wrote:
>  Hi all,
>
>  Just created a a diagram as the overlay of a pcolor plot with a labelled
> contour plot. I had a few issues:
>
> When exporting the following image, which is a pcolor plot with alpha=0.15
> and contours on top, I get no alpha channel in the resulting output, regard
> of whether I export as EPS or SVG. Is exporting with alpha channel not
> supported in those formats?

Alpha should be supported in svg, but there is no support for alpha in 
postscript. This is a problem with postscript, not mpl.

Darren


___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] legend not in front

2006-06-19 Thread Ryan Krauss
Thanks John.  The latest svn works beautifully for me now.

No more svn updates for me until my thesis is submitted.

Ryan

On 6/18/06, John Hunter <[EMAIL PROTECTED]> wrote:
> > "Ryan" == Ryan Krauss <[EMAIL PROTECTED]> writes:
>
> Ryan> I just did a fresh svn checkout and my legends are no longer
> Ryan> in the front.  The following lines produce the attached
> Ryan> plot:
>
>
> Hey Ryan,
>
> Not sure how or why this bug crept in, but apparently legend was
> missing a zorder.  I just added a default zorder value, which fixes
> this problem.  Thanks for the report.
>
> JDH
>


___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] legend not in front

2006-06-19 Thread John Hunter
> "Ryan" == Ryan Krauss <[EMAIL PROTECTED]> writes:

Ryan> Thanks John.  The latest svn works beautifully for me now.
Ryan> No more svn updates for me until my thesis is submitted.

Uh huh, just like the man who says no more drinks for me until my
thesis is submitted.  You know you can't resist :-)

JDH


___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] exporting with alpha channel, mathtext, contour labels

2006-06-19 Thread John Hunter
> "John" == John Pye <[EMAIL PROTECTED]> writes:

John> issues: 1. When exporting the following image, which is a
John> pcolor plot with alpha=0.15 and contours on top, I get no
John> alpha channel in the resulting output, regard of whether I
John> export as EPS or SVG. Is exporting with alpha channel not
John> supported in those formats?  2. In the titles, which are


For some reason I did not get the sample image, but could you provide
some example code that replicates the alpha problem on the SVG
backend?  As others have noted, PS doesn't have an alpha channel so
there is nothing we can do there, but SVG *should* work.  Are you sure
it's not your SVG viewer?

JDH


___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] fill without label

2006-06-19 Thread aonghus
Hi,Does anyone know how to use the fill command without a label appearing in the legend box?I have something like this: plot(x, y, label = 'label1') fill(fx, fy) legend(loc = 'best')I thought this might work: fill(fx, fy, label = None)but I get this error instead: raise TypeError('text must be a string type')TypeError: text must be a string typeAny suggestions?thanks,a 
	
		Sneak preview the  all-new Yahoo.com. It's not radically different. Just radically better. 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] fill without label

2006-06-19 Thread John Hunter
> "aonghus" == aonghus  <[EMAIL PROTECTED]> writes:

aonghus> Hi, Does anyone know how to use the fill command without
aonghus> a label appearing in the legend box?

aonghus> Any suggestions?

>From the legend docstring

  if label is set to '_nolegend_', the item will not be shown in
  legend.


JDH


___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] fill without label

2006-06-19 Thread aonghus
thanks for the suggestion- that works as expected: fill(fx, fy, label = '_nolegend_')aJohn Hunter <[EMAIL PROTECTED]> wrote: > "aonghus" == aonghus  <[EMAIL PROTECTED]> writes:aonghus> Hi, Does anyone know how to use the fill command withoutaonghus> a label appearing in the legend box?aonghus> Any suggestions?From the legend docstring  if label is set to '_nolegend_', the item will not be shown in  legend.JDH 
		Ring'em or ping'em. Make  PC-to-phone calls as low as 1¢/min with Yahoo! Messenger with Voice.___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] exporting with alpha channel, mathtext, contour labels

2006-06-19 Thread John Pye
Hi John

Here's a test script that gives the wrongly exported SVG image. I'm 
viewing with EOG. When I edit to add "style="opacity:0.15"" it works 
fine, so there's no prob with EOG.

from pylab import *
import matplotlib.numerix.ma as ma
from matplotlib.colors import ListedColormap

A = flipud(array([[1,2,3,4,5],[1,3,4,5,6],[1,1,4,5,7]]))

M = where(A==1,1,0)

B = ma.array(A,mask=M)

C = ListedColormap(['r','#FF00FF','y','g','b','#00'])
x = [0,5,10,15,20]
y = [0,5,10]
X,Y = meshgrid(x,y)
X = ma.array(X,mask=B.mask())
Y = ma.array(Y,mask=B.mask())

figure()
pcolor(X,Y,B,alpha=0.15,shading='flat',cmap=C)
hold(True)
contour(x,y,B)
xlabel('something')
ylabel('else')

Cheers
JP

John Hunter wrote:
>> "John" == John Pye <[EMAIL PROTECTED]> writes:
>> 
>
> John> issues: 1. When exporting the following image, which is a
> John> pcolor plot with alpha=0.15 and contours on top, I get no
> John> alpha channel in the resulting output, regard of whether I
> John> export as EPS or SVG. Is exporting with alpha channel not
> John> supported in those formats?  2. In the titles, which are
>
>
> For some reason I did not get the sample image, but could you provide
> some example code that replicates the alpha problem on the SVG
> backend?  As others have noted, PS doesn't have an alpha channel so
> there is nothing we can do there, but SVG *should* work.  Are you sure
> it's not your SVG viewer?
>
> JDH
>
>
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>   

-- 
John Pye
Department of Mechanical and Manufacturing Engineering
University of New South Wales, Sydney, Australia
http://pye.dyndns.org/



___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] updated Ubuntu Dapper packages for numpy, matplotlib, and scipy online

2006-06-19 Thread Andrew Straw
I have updated the apt repository I maintain for Ubuntu's Dapper, which
now includes:

numpy
matplotlib
scipy

Each package is from a recent SVN checkout and should thus be regarded
as "bleeding edge". The repository has a new URL:
http://debs.astraw.com/dapper/ I intend to keep this repository online
for an extended duration. If you want to put this repository in your
sources list, you need to add the following lines to /etc/apt/sources.list::
 deb http://debs.astraw.com/ dapper/
 deb-src http://debs.astraw.com/ dapper/

I have not yet investigated the use of ATLAS in building or using the
numpy binaries, and if performance is critical for you, please evaluate
speed before using it. I intend to visit this issue, but I cannot say when.

The Debian source packages were generated using stdeb, [
http://stdeb.python-hosting.com/ ] a Python to Debian source package
conversion utility I wrote. stdeb does not build packages that follow
the Debian Python Policy, so the packages here may be slighly unusual
compared to Python packages in the official Debian or Ubuntu
repositiories. For example, example scripts do not get installed, and no
documentation is installed. Future releases of stdeb may resolve these
issues.

As always, feedback is very appreciated.

Cheers!
Andrew


___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] usetex: different fonts

2006-06-19 Thread Steve Schmerler
Ryan Krauss wrote:
> Sorry, I didn't scroll down low enough in the message to see the png
> you already attached.
> 
> Ryan
> 

The latest update (Darren's mail) makes the plots (exponents etc.) look
just cool. Thanks!

cheers,
steve

-- 
Random number generation is the art of producing pure gibberish as
quickly as possible.



___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users