reducing bounding box with ggsave

1,393 views
Skip to first unread message

thomas

unread,
Oct 10, 2010, 3:41:14 PM10/10/10
to ggplot2
Hi,

I am using ggsave to save a pdf/eps to a file (to be later used in
latex). i specify the exact height and width.
everything works as suspected except that the bounding box does not
seem to get reduced when width/height is reduced.

p <- ggplot(...) + ....
ggsave(q,filename="f1.eps",width=3, height=2)
ggsave(q,filename="f1.pdf",width=3, height=2)

Both suffer from the same box, can be seen in the screenshot.
http://is.gd/fViNq (goes to imageshack)

Apologies for the yellow filled rectangles but I can't show the
content of the chart.

Now I am wondering if there is some option to reduce the white space
around (top/left/right/bottom) the chart (to the left of the y-axis,
below "F1", to the right of the legend)? I would really like to
tighten it up.

thank you,
Thomas

Erik Iverson

unread,
Oct 10, 2010, 5:30:30 PM10/10/10
to ggp...@googlegroups.com

thomas

unread,
Oct 11, 2010, 11:03:44 AM10/11/10
to ggplot2
Indeed it does, thank you.

Thomas
Reply all
Reply to author
Forward
0 new messages