Skip to content
Back to formatted view

Raw Message

Message-ID: <74A033446D9543189F02A3C08C94EC71@TCPC000>
Date: 2009-04-07T14:39:15Z
From: Mark Heckmann
Subject: change default output size when using Sweave

I am trying to create a graphic output in Sweave but I do not want it to be
standard size. I want the whole graphic to be 80mm of height only, just like
the viewport below.

<<fig=TRUE, echo=TRUE>>=
   pushViewport(viewport(height = unit(80, "mm")))    
   grid.rect()
   grid.text("I want this viewport to be the whole output size")
   popViewport()
@

How can I make the graphic smaller (80mm of height) without having the white
margins at the top and bottom?

A lot of thanks in advance,
Mark