[R] Trellis margins settings so that they are like a base graphic with no figure region when printed to png file?
mark.heckmann at gmx.de
Fri Dec 12 19:30:48 CET 2008
I want to produce a very small png file (35 x 18 px) that contains a
histogram without a figure region or margins, only the pure heights.
In the base graphic this was easy:
png(filename = "hist.png", res = 72, width=35, height=18)
Now I want a grid graphics output as I need the graphic as an object.
I tried several trellis.par settings but I was not able to figure it out
Up to now it looks like this:
myHistogram <- histogram(rnorm(100), xlab="", ylab="",
This looks acceptable although I would like smaller margins, that is to say
no margins at all.
PROBLEM (2) now is, that when it is printed to the png file, the graphic
almost consist of margins only. The main part of the plot shrinks to some
I don't know how to change the settings, so I that I get the same as in the
Does anyone know?
More information about the R-help