I've noticed two problems with the postscript backend with today's svn. Running the basemap examples and saving to an eps or ps file: 1) dotted lines (the meridians and parallels on the basemap) show up as solid 2) line and text colors are wrong - if a contour plot is created, any lines or text that are then plotted after that show up with the same color as the end of the colormap (blue for a red-->blue colormap). I'll try to build a concise example that shows this later on today. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-124 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
Jeff Whitaker wrote: > > I've noticed two problems with the postscript backend with today's > svn. Running the basemap examples and saving to an eps or ps file: > > 1) dotted lines (the meridians and parallels on the basemap) show up > as solid > > 2) line and text colors are wrong - if a contour plot is created, any > lines or text that are then plotted after that show up with the same > color as the end of the colormap (blue for a red-->blue colormap). > > I'll try to build a concise example that shows this later on today. > > -Jeff > contourf_demo.py illustrates these problems - just run it and save the output to a postscript file. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-124 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
On Tuesday 21 March 2006 15:43, Jeff Whitaker wrote: > Jeff Whitaker wrote: > > I've noticed two problems with the postscript backend with today's > > svn. Running the basemap examples and saving to an eps or ps file: > > > > 1) dotted lines (the meridians and parallels on the basemap) show up > > as solid > > > > 2) line and text colors are wrong - if a contour plot is created, any > > lines or text that are then plotted after that show up with the same > > color as the end of the colormap (blue for a red-->blue colormap). > > > > I'll try to build a concise example that shows this later on today. > > > > -Jeff > > contourf_demo.py illustrates these problems - just run it and save the > output to a postscript file. This is fixed as of svn 2202. However, the transform is not being passed to draw_lines, and so the method works as if the old API were being used. Is this a bug? Shouldn't the transform be provided to draw_lines when using the new API?
Darren Dale wrote: > On Tuesday 21 March 2006 15:43, Jeff Whitaker wrote: > >> Jeff Whitaker wrote: >> >>> I've noticed two problems with the postscript backend with today's >>> svn. Running the basemap examples and saving to an eps or ps file: >>> >>> 1) dotted lines (the meridians and parallels on the basemap) show up >>> as solid >>> >>> 2) line and text colors are wrong - if a contour plot is created, any >>> lines or text that are then plotted after that show up with the same >>> color as the end of the colormap (blue for a red-->blue colormap). >>> >>> I'll try to build a concise example that shows this later on today. >>> >>> -Jeff >>> >> contourf_demo.py illustrates these problems - just run it and save the >> output to a postscript file. >> > > This is fixed as of svn 2202. > > Darren: contourf_demo.py still produces the same postscript output for me with svn 2202 (title shows up in red text and the dashed contours are munged). -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-124 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
On Tuesday 21 March 2006 17:25, Jeff Whitaker wrote: > Darren Dale wrote: > > On Tuesday 21 March 2006 15:43, Jeff Whitaker wrote: > >> Jeff Whitaker wrote: > >>> I've noticed two problems with the postscript backend with today's > >>> svn. Running the basemap examples and saving to an eps or ps file: > >>> > >>> 1) dotted lines (the meridians and parallels on the basemap) show up > >>> as solid > >>> > >>> 2) line and text colors are wrong - if a contour plot is created, any > >>> lines or text that are then plotted after that show up with the same > >>> color as the end of the colormap (blue for a red-->blue colormap). > >>> > >>> I'll try to build a concise example that shows this later on today. > >>> > >>> -Jeff > >> > >> contourf_demo.py illustrates these problems - just run it and save the > >> output to a postscript file. > > > > This is fixed as of svn 2202. > > Darren: > > contourf_demo.py still produces the same postscript output for me with > svn 2202 (title shows up in red text and the dashed contours are munged). It looks fine on my system.
>>>>> "Darren" == Darren Dale <dd...@co...> writes: Darren> However, the transform is not being passed to draw_lines, Darren> and so the method works as if the old API were being Darren> used. Is this a bug? Shouldn't the transform be provided Darren> to draw_lines when using the new API? Yes, it should be passed. I recommend removing the transform=None functionality to *require* the transform be passed. If it is not, then an exception will be raised and it will be easy to track down the errant call. JDH
On Tuesday 21 March 2006 18:25, you wrote: > >>>>> "Darren" == Darren Dale <dd...@co...> writes: > > Darren> However, the transform is not being passed to draw_lines, > Darren> and so the method works as if the old API were being > Darren> used. Is this a bug? Shouldn't the transform be provided > Darren> to draw_lines when using the new API? > > Yes, it should be passed. I recommend removing the transform=None > functionality to *require* the transform be passed. If it is not, > then an exception will be raised and it will be easy to track down the > errant call. I committed this change to svn. I'll leave it up to you whether to change it back for an actual release. Darren
Darren Dale wrote: > On Tuesday 21 March 2006 17:25, Jeff Whitaker wrote: > >> Darren Dale wrote: >> >>> On Tuesday 21 March 2006 15:43, Jeff Whitaker wrote: >>> >>>> Jeff Whitaker wrote: >>>> >>>>> I've noticed two problems with the postscript backend with today's >>>>> svn. Running the basemap examples and saving to an eps or ps file: >>>>> >>>>> 1) dotted lines (the meridians and parallels on the basemap) show up >>>>> as solid >>>>> >>>>> 2) line and text colors are wrong - if a contour plot is created, any >>>>> lines or text that are then plotted after that show up with the same >>>>> color as the end of the colormap (blue for a red-->blue colormap). >>>>> >>>>> I'll try to build a concise example that shows this later on today. >>>>> >>>>> -Jeff >>>>> >>>> contourf_demo.py illustrates these problems - just run it and save the >>>> output to a postscript file. >>>> >>> This is fixed as of svn 2202. >>> >> Darren: >> >> contourf_demo.py still produces the same postscript output for me with >> svn 2202 (title shows up in red text and the dashed contours are munged). >> > > It looks fine on my system. > You're right - my bad. I was looking at the old postscript file, the new one is indeed fine. Thanks Darren. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-124 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
On Tuesday 21 March 2006 18:25, John Hunter wrote: > >>>>> "Darren" == Darren Dale <dd...@co...> writes: > > Darren> However, the transform is not being passed to draw_lines, > Darren> and so the method works as if the old API were being > Darren> used. Is this a bug? Shouldn't the transform be provided > Darren> to draw_lines when using the new API? > > Yes, it should be passed. I recommend removing the transform=None > functionality to *require* the transform be passed. If it is not, > then an exception will be raised and it will be easy to track down the > errant call. The problem is in draw_line_collection, and it looks complicated.
>>>>> "Darren" == Darren Dale <dd...@co...> writes: Darren> The problem is in draw_line_collection, and it looks Darren> complicated. I wrote that mess :-) This is the baseclass method for backends that do not implement draw line collection. I will fix it for the new API. You may want to look over the draw_*_collection methods in backend bases and see if there are any significant performance boosts to be had by implementing them in backend_ps. If you need more distraction, that is :-) JDH
>>>>> "Darren" == Darren Dale <dd...@co...> writes: Darren> The problem is in draw_line_collection, and it looks Darren> complicated. OK, I just committed a "fix" for this problem. There is no elegant way to do it in backend bases because of the way collections use offsets and offset transforms. So I just hacked it up to do the transformations as before and pass an identity transform off to the backend in using the newstyle API. Another argument for implementing the methods in the backends....for a rainy day. JDH
On Tuesday 21 March 2006 19:10, John Hunter wrote: > >>>>> "Darren" == Darren Dale <dd...@co...> writes: > > Darren> The problem is in draw_line_collection, and it looks > Darren> complicated. > > OK, I just committed a "fix" for this problem. There is no elegant > way to do it in backend bases because of the way collections use > offsets and offset transforms. So I just hacked it up to do the > transformations as before and pass an identity transform off to the > backend in using the newstyle API. Another argument for implementing > the methods in the backends....for a rainy day. My implementation of draw_lines is not compatible with draw_line_collection. I'm masking draw_markers in CVS until I get the problem sorted out.
>>>>> "Darren" == Darren Dale <dd...@co...> writes: Darren> My implementation of draw_lines is not compatible with Darren> draw_line_collection. I'm masking draw_markers in CVS Darren> until I get the problem sorted out. I thought my backend_bases patch would fix this -- I'll take another look. JDH
On Wednesday 22 March 2006 2:38 pm, Darren Dale wrote: > On Tuesday 21 March 2006 19:10, John Hunter wrote: > > >>>>> "Darren" == Darren Dale <dd...@co...> writes: > > > > Darren> The problem is in draw_line_collection, and it looks > > Darren> complicated. > > > > OK, I just committed a "fix" for this problem. There is no elegant > > way to do it in backend bases because of the way collections use > > offsets and offset transforms. So I just hacked it up to do the > > transformations as before and pass an identity transform off to the > > backend in using the newstyle API. Another argument for implementing > > the methods in the backends....for a rainy day. > > My implementation of draw_lines is not compatible with > draw_line_collection. I'm masking draw_markers in CVS until I get the > problem sorted out. Game on! The new API is functional again in the postscript backend. All the bugs I am aware of have been cleared. I'm holding off on a note to the CHANGELOG until we go a few days without bug reports. Darren