On 2014-01-08 15:15-0800 phil rosenberg wrote:

> I've just tried to use plshade, but with transparency - I want to
plot transparent to black shading over the top of other shaded data.
Unfortunately I'm getting not very attractive horizontal and
vertical lines appearing at each of my x and y values. I guess these
are because when plshade fills each section it's generating a 1 pixel
overlap. This is using the wxWidgets driver. The lines appear in both
the graphics context and agg backends. I just thought I'd email the
list in case anyone had any suggestions for fixing this or knew if it
happens in the other drivers? Unfortunately though I think I might
have to just abandon this idea.

Hi Phil:

The plshade and plshades functions always have such linear artifacts
when creating a gradient because there is fairly coarse interpolation
going on with no knowledge of the underlying grid of pixels.  So I
suggest you use plgradient instead to apply a native linear
transparent gradient on top of another plot.  (See e.g.,
http://plplot.sourceforge.net/examples-data/demo30/x30.02.png, for
example of the sort of result that can be obtained for that case for
the pngcairo device.)

In contrast to the nice-looking cairo, qt, and svg device driver
results for page 2 of example 30, the corresponding wxwidgets device
results currently look quite bad (lots of vertical and horizontal
lines).  The reason is that device driver currently does not have a
native gradient method implemented so plgradient falls back to using
the plshades equivalent of a linear gradient which has all the linear
artifacts alluded to above.  So following the above advice to switch
to plgradient will require some additional modest development effort
on your part to get a good-looking result for the wxwidgets device
driver. You will need to modify that device driver (following what is
done for the cairo, qt, or svg device drivers) to provide native
linear gradient support based on the linear gradient capabilities
provided by the wxwidgets library (e.g., CreateLinearGradientBrush).
Making such a wxwidgets change has been on my (very) long-term agenda,
but I am not really that familiar with either the wxwidgets devices or
the wxwidgets library so I would be happy to turn over responsibility
for implementing this wxwidgets device driver change to you.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to