Re: [Matplotlib-users] printing quality
Peter I. Hansen wrote: > On Nov 30, 2007 4:58 PM, Michael Droettboom <[EMAIL PROTECTED]> wrote: >> Peter I. Hansen wrote: >>> Hi >>> >>> I'm typestting some graphs including a few axvspan's with eg. a >>> facecolor='0.6' . This looks very nice if I output a PNG, but when I >>> inculde this in my TeX document the axis labels dosn't scale. Then I >>> try to go the postscript way, and the the labels scale nicely but the >>> colored fields of axvspan prints as a coarse raster color. >> I assume you mean that the axvspan prints as a solid color, rather than >> semi-transparent (alpha-blended). That is an unfortunate limitation of >> the Postscript format -- it can not handle transparency. > > Yes, I'm using a solid color. > >>> Is there a best way of optimizing print quality? >> Each of the output formats has a number of different limitations -- it >> depends a lot on what you're rendering and where you need it to go. >> >> You could try saving as a PDF, and then using pdftex to generate your >> document, if that's an option for you. > > Unfortunately, saving directly as PDF does not work on my (Debian) > system. It gives a "NotImplementedError". I'm using version 0.90.1, > and maybe this will change for 0.91 . Can you please send the full traceback that accompanies this error? PDF should be working is general, but perhaps you are running into a specific feature of the PDF backend that is not working, and there may be a workaround (or 0.91 may work)... Cheers, Mike -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Contouring
José Gómez-Dans wrote: > Hi, > I have written a quick'n'dirty image segmentation algorithm. It seems to work > fine. However, I am interested in getting contours of the segments > (essentially, (x,y) pairs of the edges of each segment). I can plot the > contours with MPL (pylab.contour()), but I'd like to have the locations of > the edges, so that I can actually do something with them. > > Does anyone have any hints on how to go on about this? cs = contour(Z) for lev, col in zip(cs.levels, cs.collections): s = col._segments s will be a list of numpy arrays, each containing the (x,y) vertices defining a contour line at level lev. This illustrates a shortcoming of the contour and/or LineCollection code; to get what I think you want, you have to use a private attribute, _segments. It should be part of the public API. After some other changes and reorganizations in mpl have settled down, I will fix this. Feel free to send me a reminder in a month. Eric - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] printing quality
Peter I. Hansen wrote: > Hi > > I'm typestting some graphs including a few axvspan's with eg. a > facecolor='0.6' . This looks very nice if I output a PNG, but when I > inculde this in my TeX document the axis labels dosn't scale. Then I > try to go the postscript way, and the the labels scale nicely but the > colored fields of axvspan prints as a coarse raster color. I assume you mean that the axvspan prints as a solid color, rather than semi-transparent (alpha-blended). That is an unfortunate limitation of the Postscript format -- it can not handle transparency. > Is there a best way of optimizing print quality? Each of the output formats has a number of different limitations -- it depends a lot on what you're rendering and where you need it to go. You could try saving as a PDF, and then using pdftex to generate your document, if that's an option for you. Cheers, Mike -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] printing quality
Hi I'm typestting some graphs including a few axvspan's with eg. a facecolor='0.6' . This looks very nice if I output a PNG, but when I inculde this in my TeX document the axis labels dosn't scale. Then I try to go the postscript way, and the the labels scale nicely but the colored fields of axvspan prints as a coarse raster color. Is there a best way of optimizing print quality? -Peter - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Contouring
Hi, I have written a quick'n'dirty image segmentation algorithm. It seems to work fine. However, I am interested in getting contours of the segments (essentially, (x,y) pairs of the edges of each segment). I can plot the contours with MPL (pylab.contour()), but I'd like to have the locations of the edges, so that I can actually do something with them. Does anyone have any hints on how to go on about this? Thanks! Jose - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] printing quality
On Nov 30, 2007 4:58 PM, Michael Droettboom <[EMAIL PROTECTED]> wrote: > Peter I. Hansen wrote: > > Hi > > > > I'm typestting some graphs including a few axvspan's with eg. a > > facecolor='0.6' . This looks very nice if I output a PNG, but when I > > inculde this in my TeX document the axis labels dosn't scale. Then I > > try to go the postscript way, and the the labels scale nicely but the > > colored fields of axvspan prints as a coarse raster color. > > I assume you mean that the axvspan prints as a solid color, rather than > semi-transparent (alpha-blended). That is an unfortunate limitation of > the Postscript format -- it can not handle transparency. Yes, I'm using a solid color. > > Is there a best way of optimizing print quality? > > Each of the output formats has a number of different limitations -- it > depends a lot on what you're rendering and where you need it to go. > > You could try saving as a PDF, and then using pdftex to generate your > document, if that's an option for you. Unfortunately, saving directly as PDF does not work on my (Debian) system. It gives a "NotImplementedError". I'm using version 0.90.1, and maybe this will change for 0.91 . - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users