Re: [Matplotlib-users] Latex problems...

2006-07-10 Thread Darren Dale
Pieter Dumon wrote:
 Could the bug I submitted some time ago be related to this ? (1502970
 at http://sourceforge.net/tracker/?group_id=80706atid=560720)

 For example, this fails for me (it does work without xpdf and doing
 ps2pdf afterwards):
 My poppler/xpdf installation should be allright

 import matplotlib
 matplotlib.use('PS')
 import pylab

 pylab.rc('text',usetex=True)
 pylab.rc('ps',usedistiller='xpdf')
 pylab.figure()
 pylab.plot((1,2,3),(4,5,6))
 pylab.savefig(test)
 pylab.show()

 ---
 Summary:
 matplotlib-0.87.3 with xpdf renders empty PS
 upraded to matplotlib-0.87-3/numpy-0.9.8.

 When setting ps.usedistiller to xpdf, I get an empty (blank) ps image.
 Without xpdf, I get a proper ps. This did work with 0.87-2/numpy-0.9.6
 (The Pdf backend works, but not with mathttext.)
   
Please set your verbose level to debug-annoying in your rc settings and 
post the output. Also post your platform info, along with version info 
for xpdf, and ghostscript. I havent had any problems with xpdf.



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Latex problems...

2006-07-10 Thread Pieter Dumon

On 7/10/06, Darren Dale [EMAIL PROTECTED] wrote:

Pieter Dumon wrote:
 For example, this fails for me (it does work without xpdf and doing
 ps2pdf afterwards):



 import matplotlib
 matplotlib.use('PS')
 import pylab

 pylab.rc('text',usetex=True)
 pylab.rc('ps',usedistiller='xpdf')
 pylab.figure()
 pylab.plot((1,2,3),(4,5,6))
 pylab.savefig(test)
 pylab.show()

 When setting ps.usedistiller to xpdf, I get an empty (blank) ps image.
 Without xpdf, I get a proper ps. This did work with 0.87-2/numpy-0.9.6
 (The Pdf backend works, but not with mathttext.)

Please set your verbose level to debug-annoying in your rc settings and
post the output. Also post your platform info, along with version info
for xpdf, and ghostscript. I havent had any problems with xpdf.


The debug output is in attachment. I don't see any errors, except for
the latex warning (but the problem is the same without usetex=True,
apparently)

ESP Ghostscript 815.02 (2006-04-19)
xpdf version 3.01
poppler-0.5.3

System is a quite standard Gentoo Linux (x86), but with gcc-4.1.1
2.6.16-gentoo-r9 #1 PREEMPT Tue Jun 6 10:38:13 CEST 2006 i686 Mobile
Intel(R) Pentium(R) 4 - M CPU 2.00GHz GNU/Linux

Pieter


debug.log
Description: Binary data

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Latex problems...

2006-07-10 Thread Pieter Dumon

Sorry, forgot the actual PS file, which contains the actual error. Here it is


On 7/10/06, Pieter Dumon [EMAIL PROTECTED] wrote:

On 7/10/06, Darren Dale [EMAIL PROTECTED] wrote:
 Pieter Dumon wrote:
  For example, this fails for me (it does work without xpdf and doing
  ps2pdf afterwards):

  import matplotlib
  matplotlib.use('PS')
  import pylab
 
  pylab.rc('text',usetex=True)
  pylab.rc('ps',usedistiller='xpdf')
  pylab.figure()
  pylab.plot((1,2,3),(4,5,6))
  pylab.savefig(test)
  pylab.show()
 
  When setting ps.usedistiller to xpdf, I get an empty (blank) ps image.
  Without xpdf, I get a proper ps. This did work with 0.87-2/numpy-0.9.6
  (The Pdf backend works, but not with mathttext.)
 
 Please set your verbose level to debug-annoying in your rc settings and
 post the output. Also post your platform info, along with version info
 for xpdf, and ghostscript. I havent had any problems with xpdf.

The debug output is in attachment. I don't see any errors, except for
the latex warning (but the problem is the same without usetex=True,
apparently)

ESP Ghostscript 815.02 (2006-04-19)
xpdf version 3.01
poppler-0.5.3

System is a quite standard Gentoo Linux (x86), but with gcc-4.1.1
2.6.16-gentoo-r9 #1 PREEMPT Tue Jun 6 10:38:13 CEST 2006 i686 Mobile
Intel(R) Pentium(R) 4 - M CPU 2.00GHz GNU/Linux

Pieter





test.ps
Description: PostScript document

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Latex problems...

2006-07-10 Thread Darren Dale
This is a known bug in ESP Ghostscript, not matplotlib. ESP version 8.15.02 
broke xpdf's pdftops program. I posted a bug report to the ESP website, and 
it has been fixed in their sources, but they havent made a new release since 
that time. Your options are either to drop back to ESP version 7.07 or use 
gpl or afpl ghostscript.

Darren


On Monday 10 July 2006 08:58, Pieter Dumon wrote:
 Sorry, forgot the actual PS file, which contains the actual error. Here it
 is

 On 7/10/06, Pieter Dumon [EMAIL PROTECTED] wrote:
  On 7/10/06, Darren Dale [EMAIL PROTECTED] wrote:
   Pieter Dumon wrote:
For example, this fails for me (it does work without xpdf and doing
ps2pdf afterwards):
   
import matplotlib
matplotlib.use('PS')
import pylab
   
pylab.rc('text',usetex=True)
pylab.rc('ps',usedistiller='xpdf')
pylab.figure()
pylab.plot((1,2,3),(4,5,6))
pylab.savefig(test)
pylab.show()
   
When setting ps.usedistiller to xpdf, I get an empty (blank) ps
image. Without xpdf, I get a proper ps. This did work with
0.87-2/numpy-0.9.6 (The Pdf backend works, but not with mathttext.)
  
   Please set your verbose level to debug-annoying in your rc settings and
   post the output. Also post your platform info, along with version info
   for xpdf, and ghostscript. I havent had any problems with xpdf.
 
  The debug output is in attachment. I don't see any errors, except for
  the latex warning (but the problem is the same without usetex=True,
  apparently)
 
  ESP Ghostscript 815.02 (2006-04-19)
  xpdf version 3.01
  poppler-0.5.3
 
  System is a quite standard Gentoo Linux (x86), but with gcc-4.1.1
  2.6.16-gentoo-r9 #1 PREEMPT Tue Jun 6 10:38:13 CEST 2006 i686 Mobile
  Intel(R) Pentium(R) 4 - M CPU 2.00GHz GNU/Linux
 
  Pieter

-- 
Darren S. Dale, Ph.D.
Cornell High Energy Synchrotron Source
Cornell University
200L Wilson Lab
Rt. 366  Pine Tree Road
Ithaca, NY 14853

[EMAIL PROTECTED]
office: (607) 255-9894
fax: (607) 255-9001


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Colorbar

2006-07-10 Thread Mark Johnson
I'm trying to draw a contour plot in a Tk gui with an accompanying colorbar.
The gui allows changing which contour is drawn.  Some of the contours use a
different set of levels, so I'd like to update the colorbar whenever the
levels change.  I don't need an automatic update -- what I'd like is to
manually specify a new set of tick locations.  What is the best way to do
that?  Thanks much,

Mark Johnson
Central College
Pella, IA



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Latex problems...

2006-07-10 Thread Fernando Perez
On 7/10/06, Darren Dale [EMAIL PROTECTED] wrote:
 Hi Fernando,

 I tried opening your example of a bad eps file produced with the xpdf option,
 and it looks identical to the good example you sent. (I opened it with both
 ggv, and gv.)

My mistake, sorry: gv (on both my Fedora 3 and my ubuntu dapper
machines) shows the xpdf one on a whole page, so that confused me.
But you are right: they have the same bounding box, so once embedded
in a latex document, they both show up just fine.

There are some differences in the PS header for both, and that's
probably what causes the difference in gv behavior which I mistook for
a bbox error.

Sorry for the noise: it looks like everything is in good shape now.

Many thanks for all this work!  I am just in the middle of finishing
up a paper where I needed all of this, so your timing could not be
better.

Cheers,

f


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Latex problems...

2006-07-10 Thread Darren Dale
On Monday 10 July 2006 14:08, Fernando Perez wrote:
 On 7/10/06, Darren Dale [EMAIL PROTECTED] wrote:
  Hi Fernando,
 
  I tried opening your example of a bad eps file produced with the xpdf
  option, and it looks identical to the good example you sent. (I opened it
  with both ggv, and gv.)

 My mistake, sorry: gv (on both my Fedora 3 and my ubuntu dapper
 machines) shows the xpdf one on a whole page, so that confused me.
 But you are right: they have the same bounding box, so once embedded
 in a latex document, they both show up just fine.

 There are some differences in the PS header for both, and that's
 probably what causes the difference in gv behavior which I mistook for
 a bbox error.

 Sorry for the noise: it looks like everything is in good shape now.

 Many thanks for all this work!  I am just in the middle of finishing
 up a paper where I needed all of this, so your timing could not be
 better.

I'm glad we got it all straightened out. Thanks for finding that bug before 
version 0.88 was released.


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] [matplotlib-devel] backends

2006-07-10 Thread Christopher Barker
John Hunter wrote:
 Christopher == Christopher Barker [EMAIL PROTECTED] writes:
 Christopher Just as a note, if you have Cairo, you have PS, PDF,
 Christopher SVG, raster, and, indeed, native draw-to-the-screen
 Christopher functionality.
 
 Last I checked if I recall correctly, about a year ago, the PS backend
 merely dumped a raster image and didn't do real vector graphics.  Has
 this changed?

There has been a LOT of work on Cairo in the last year, including the PS 
back-end. I'm just a lurker at this point, so I don't know how robust it 
is, but it supports vector operations for at least the common stuff. 
Here's part of a note posted in April to the mailing list:


Is the output using image fallbacks in a case where you think it
shouldn't, (that is, your drawing doesn't have any fancy
translucence or something else that PostScript can't support
natively). In particular, I want to know if cairo is now using
fallbacks for something that was handled natively by the cairo 1.0
series.


Which implies to me that it's working, and getting better.

My main thought about Cairo is that there is little point in duplicating 
the effort that the Cairo devs are doing, even if it doesn't support a 
feature or two that is needed. It's better to contribute to Cairo.

That is, unless, you are allergic to C (which I am mildly) or you have 
good reason to think that the whole framework of Cairo is inadequate.

-Chris





-- 
Christopher Barker, Ph.D.
Oceanographer

NOAA/ORR/HAZMAT (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

[EMAIL PROTECTED]


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Improved dashing for black and white plots?

2006-07-10 Thread Fernando Perez
Hi all,

this is somewhat of a half-feature request, half-question.  I just
went through a rather unpleasant exercise in trying to get a line plot
with about 8 traces generated for black and white printing.  As it
turns out, mpl seems to only have 4 line styles ('-', '--', '-.',
':'), which isn't really a whole lot (compare this to gnuplot's
extensive dashing support).  One can combine dashing with markers, but
the results aren't really very pretty (the relationship in spacing
between the dashing and the markers causes this, since the markers are
right at the data points while the dashing is whatever it is).

Mpl's color support is outstanding, but I need these figures in b/w
for a paper that will have no color figures, and I'm wondering what
others have resorted to in similar situations.

Additionally, I'd like to suggest having a b/w mode, where mpl's
auto-selection of different colors for successive line plots becomes a
rotation of dashing modes.  Gnuplot's EPS backend has exactly this
feature, and it's absolutely fantastic: if color is on, it
auto-selects amongst many colors, but if color is off, it
automatically switches to contrasting dashing modes.  This more or
less ensures that you can get the same plot made, either in color or
b/w, with nearly zero effort and still have distinguishable traces.
It's really nice to be able to generate a color version of the figures
for a talk and a b/w one for a paper, without hours of manual tweaks.

Anyway, I hacked an ugly-but-functional solution on my own, so this
message is mostly to put the issue on the radar, though I /am/
interested in solutions others may have.

Cheers,

f


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] EPS fails to open in Adobe Illustrator

2006-07-10 Thread Darren Dale
Hi Andrew,

On Monday 10 July 2006 8:19 pm, Andrew Straw wrote:
 Where should I start trying to debug an issue where Adobe Illustrator CS
 for Windows is unable to open my EPS file generated by matplotlib? When
 attempting to open the file, a a dialog pops up that says, The
 operation cannot complete because of an unknown error. So much for
 informative error messages. Ghostview 3.6.1 can read the file just fine,
 and Acrobat Distiller 7.0 for windows can also convert it to a PDF just
 fine. FWIW, I'm using matplotlib.rc('ps',usedistiller=None), but I get
 similar problems setting usedistiller='xpdf'.

 I'm basically an EPS file newbie, so don't be afraid to give me the
 equivalent of did you make sure the power switch is turned on.

I have a feeling its a problem with the font handling. I cant open a file in 
inkscape either, the image looks fine but the fonts are missing. Try setting 
ps.usedistiller = ghostscript. That converts the file to low-level 
postscript, which CS should definitely be able to open. It worked for 
inkscape, at least.

Darren


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Improved dashing for black and white plots?

2006-07-10 Thread John Hunter
 Fernando == Fernando Perez [EMAIL PROTECTED] writes:

Fernando Hi all, this is somewhat of a half-feature request,
Fernando half-question.  I just went through a rather unpleasant
Fernando exercise in trying to get a line plot with about 8
Fernando traces generated for black and white printing.  As it
Fernando turns out, mpl seems to only have 4 line styles ('-',
Fernando '--', '-.', ':'), which isn't really a whole lot
Fernando (compare this to gnuplot's extensive dashing support).

Are you aware of the dashes property, which allows you to set the
exact dash pattern you want.  It's an arbitrary length sequence of
alternating ink-on, ink-off, in points

# 5 points on, 2 off, 10 on, 5 off)
plot(arange(20), '--', dashes=[5,2,10,5])

Fernando Additionally, I'd like to suggest having a b/w mode,
Fernando where mpl's auto-selection of different colors for
Fernando successive line plots becomes a rotation of dashing
Fernando modes.  Gnuplot's EPS backend has exactly this feature,

This seems like a good idea -- if you define a nice sequence of dashes
you want to cycle through, I'll build the rest of the infrastructure
and make a figure property like iscolor.

JDH


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] EPS fails to open in Adobe Illustrator

2006-07-10 Thread Andrew Straw
Darren Dale wrote:
 Hi Andrew,

 On Monday 10 July 2006 8:19 pm, Andrew Straw wrote:
   
 Where should I start trying to debug an issue where Adobe Illustrator CS
 for Windows is unable to open my EPS file generated by matplotlib? When
 attempting to open the file, a a dialog pops up that says, The
 operation cannot complete because of an unknown error. So much for
 informative error messages. Ghostview 3.6.1 can read the file just fine,
 and Acrobat Distiller 7.0 for windows can also convert it to a PDF just
 fine. FWIW, I'm using matplotlib.rc('ps',usedistiller=None), but I get
 similar problems setting usedistiller='xpdf'.

 I'm basically an EPS file newbie, so don't be afraid to give me the
 equivalent of did you make sure the power switch is turned on.
 

 I have a feeling its a problem with the font handling. I cant open a file in 
 inkscape either, the image looks fine but the fonts are missing. Try setting 
 ps.usedistiller = ghostscript. That converts the file to low-level 
 postscript, which CS should definitely be able to open. It worked for 
 inkscape, at least.
   
Hi Darren,

Hmm, that didn't do it. Simple plots (like simple_plot.py) work with no
distiller step, so it must be something about my more complex plot.
Unfortunately, it's a rather complex menagerie of code that produces the
plot so I'm afraid that if I want to narrow this down, it'll be rather
painful and slow going. I might just stick with the
MPL-EPS-Distiller-PDF-Illustrator toolchain, which seems to work for
the moment.


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users