On Fri, Nov 14, 2008 at 7:59 PM, David Seery <[EMAIL PROTECTED]> wrote:
> I would like to produce contour plots in which the contours are filled
> with a solid colour. Although the documentation implies that this is
> not possible, I gather from reading the examples that it is achieved
> by calling plpsty(0). Unfortunately, subsequent calls to plshades
> produce weirdly segmented images, in which the solid fill is broken up
> with unwanted lines, like this:
>
> http://www.damtp.cam.ac.uk/user/djs61/figures.pdf

This is, at least in part, due to the fact the the plshade functions
in PLplot draw the filled contours as a series of polygons.  Depending
on the output device settings used and (in the case of SVG, PS and PDF
output) the viewer used, you may see gaps between these individual
polygons.  You can see this in the PNG output for example 21 on the
PLplot web site (see the middle image at the bottom of the page)::

http://plplot.sourceforge.net/examples.php?demo=21

Conversely, for example 16, anti-aliasing has been disabled for the
graphics in the plots and these lines do not show up for the PNG
output:

http://plplot.sourceforge.net/examples.php?demo=16

Vector-based file output (including your example PDF) does not exhibit
this trait if it is viewed from gv with anti-aliasing disabled.
Evince (the default PDF viewer in Ubuntu/Gnome) anti-aliases its
output and does show these inter-polygon lines.  I do not know if
these lines show up on a printed version of these PDFs.

I have seen this same issue in output from other plotting packages as
well.  One possible workaround is to plot the shaded regions as a
bitmap embedded in the PS/PDF/SVG output.  PLplot does not have
support for this directly at this time.  However, you can accomplish
this with extra effort using the extcairo driver and a few Cairo
tricks.  I can go in to how to do this in more detail if desired.

I hope this helps.

Hez

-- 
Hezekiah M. Carty
Graduate Research Assistant
University of Maryland
Department of Atmospheric and Oceanic Science

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Plplot-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-general

Reply via email to