How to control the dimension / size of a plot with ggplot2

前端 未结 2 449
没有蜡笔的小新
没有蜡笔的小新 2021-01-02 13:18

I am using ggplot2 (respectively qplot) to generate a report with Sweave. Now I need some help with the adjustment of the size of the plot. I use the following Sweave code t

2条回答
  •  自闭症患者
    2021-01-02 13:37

    The Sweave options width and height influence the dimensions of the PDF file but not the size of the figures in the document. Put something like

    \setkeys{Gin}{width=0.4\textwidth}
    

    after \begin{document} to get smaller plots.

    Source: Sweave manual, sec. 4.1.2

提交回复
热议问题