I have a density plot that I want to save in an eps file.
My density plot is something like
setEPS()
postscript("myfile.eps")
plot(density(rnorm(1000)))
dev.off()
just with my data and a little bit more complex (changing labels and margins, more lines on top of it, etc).
My problem is that I get an annoying, horizontal thin gray line on top of my density plot at y = 0, and I'd like to get rid of it.
When plotting directly to the X device I don't get this horizontal gray line, but in postscript I always do.
I've tried using dev.copy2eps
and also cairo_ps()
instead of postscript()
, but I still get the grey line.
I've also tried using different (and random) data, with a very simple plot like the code block above, and still get the grey line in the postscript.
Does anyone know how to get rid of this line?