[Rd] Could we make filled.contour() more suitable for PDF viewers?
@purd|e@@ @end|ng |rom gm@||@com
Fri Mar 15 22:43:43 CET 2019
Note that I sent this to r-devel, yesterday.
However, it didn't appear on the mailing list.
So, I'm resending it.
Today, I plotted the following:
> filled.contour (,,z, color.palette=terrain.colors)
It looked OK, in R.
However, when I created a PDF document, the plot (and other similar plots)
had grid (and other) lines in it, that shouldn't be there.
Note that this problem is more obvious with terrain.colors than cm.colors,
which is the default.
I found this in the help file for the pdf() function:
"the problem is much more likely to be in your viewer than in R... apparent
grids on image plots (turn off graphics anti-aliasing in your viewer if you
Later, I found (in Acrobat Reader XI) the following option:
Edit > Preferences... > Page Display > Smooth line art
I unticked this option and it corrected the problem.
In principle, this is a problem with the PDF viewer, and not R.
However, it would be better if filled.contour() didn't have this result.
And I've decided not to use filled.contour() because of this.
Note that filled.contour() calls .filled.contour(), which calls:
+ .External.graphics(C_filledcontour, x, y, z, levels, col)
Also note that I had a similar plot with a similar problem.
It contained the following line:
+ polygon (xsub, ysub, border=NA, col=colstr)
But the problem was corrected after changing it to:
+ polygon (xsub, ysub, border=colstr, col=colstr)
I'm assuming that an equally simple change to C_filledcontour, could
correct the problem above.
[[alternative HTML version deleted]]
More information about the R-devel