On Wed, 23 Feb 2011 08:47 +0000, "Andrew Ross"
> On Tue, Feb 22, 2011 at 09:19:45AM +0100, J C Gonzalez wrote:
> > Hi.
> > I'm trying to use PLPlot to generate some world maps. I *must*
> > generate a JPEG file, but the jpeg device for the PLPlot version
> > installed in my system produces ugly results. I thought of using
> > device pngcairo (since png device looks also not good enough),
> > and then convert the resulting png file to jpeg. The problem I'm
> > facing is that I get a sort of fine grid in the image that I
> > plot.
> > It would be easier to understand if I say that I get the same
> > effect using device pngcairo with example 16 (shading). The
> > shade plot generated in this example shows a grid plotted over
> > the shading surface, that is not shown in jpeg/png/win/ps
> > devices. It seems to be an artifact related to the cairo family
> > of devices.
> > Does anybody know how to remove this grid?
> Is it a greyish looking grid? I have seen a similar effect when using
> some of the Linux tools to convert between different image formats. I
> believe it is due to transparency issues. I have never seen it with
> the plplot cairo devices so, as Alan says, my first guess would be a
> problem with your version of cairo. You could also try a different
> image viewer to see if that makes a difference. What viewer are you
Hi, Andrew, and Alan.
Yes, exactly that, a greyish looking. I have used several viewers, in
different systems (Linux, Windows, Mac OS X), and it is not a viewer
artifact, it is in the figure.
I must say that I'm stick to use a rather old plplot/cairo releases.
I'm using PLPlot 5.9.0, and I cannot change that (nor the cairo
version). I believe it is something already solved in newer versions.
The fact is that it is something that appears when plotting either a
shade or an image. And I got the same result when using the driver psc
(postscript color). So it could not be a cairo-related issue.
BTW, with the cairo family of devices, in the example 16, if I decrease
enough the number of rows and columns, the grey grid disappear.
I thought about solutions to my problem, but I do not know if they are
possible. The function plimage in fact plots as many filled polygons
(rectangles) as there are in the data grid provided as one argument.
Would it be possible to plot a single "pixel", with a given color, in
the figure? So, I could try to plot pixel by pixel (I'm not facing time
issues by the time being).
Another solution is to have a way to do exactly that, but using PLPlot
functions/internals: is it possible to dump as a whole an image in
memory (a matrix of NxM cells with the color for each pixel) in to a
And, finally, another (potential) way: could I create an image with a
given device, get the image somehow, and open a new device and continue
Last, but not least, and related to the previous question: are there any
examples of the mem device?
As I said, my problem does not appear (AFAIK) in the current releases of
PLPlot, so I would understand if you just say 'Sorry, that's not a
problem any more, update your system', but if you could help me to find
a way around it would be very much appreciated.
Thanks in advance,
J C Gonzalez
http://www.fastmail.fm - A fast, anti-spam email service.