Resizing plots saved as png from ggplot in RStudio

401 views
Skip to first unread message

Wacek Kusnierczyk

unread,
Aug 31, 2013, 11:19:04 AM8/31/13
to ggp...@googlegroups.com
Hello,

I am using RStudio (excellent!) to produce HTML reports, including plots generated with ggplot (excellent!).  I need to reuse the png figure files in a separate slide presentation.  By default, the plots are square. 

The plots shown in the RStudio plot tab are automatically resized.  How do I modify the shape and size of plots exported by ggplot?

Best,
Wacek

Doug Mitarotonda

unread,
Sep 1, 2013, 11:49:08 AM9/1/13
to Wacek Kusnierczyk, ggp...@googlegroups.com
See the width and height arguments to ggsave:



--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
 
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2
 
---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Georg Fritsch

unread,
Sep 1, 2013, 12:32:53 PM9/1/13
to Wacek Kusnierczyk, ggp...@googlegroups.com
Hi Wacek

In RStudio, directly in the 'Plots' Tab, you've got the dropdown menu 'Export' with 'Save plot as Image'
In the subsequently opening separate window you can, among other things, directly set width & height.

cheers
Georg
Reply all
Reply to author
Forward
0 new messages