Re: [R] odfWeave: in multi-page plots only last page appears in document

From: Sarah Goslee <sarah.goslee_at_gmail.com>
Date: Mon, 14 Apr 2008 14:32:04 -0400

If you ran that code outside ODFWeave, you'd only get one plot, so why would you expect to get more within ODFWeave?

for (i in 1:3) {
> plot(1,1, main=paste('Plot',i))
> }

You need to add some sort of par() command, or use layout(), to create a single plot that contains all three of the plots created by the loop.

par(mfrow=c(2,2))
for (i in 1:3) {

    plot(1,1, main=paste('Plot',i))
}
for example.

Or, if you want ODFWeave to handle placement, then you need to break that into three separate plots.

Sarah

On Mon, Apr 14, 2008 at 2:20 PM, Tobias Sing <tobias.sing_at_gmail.com> wrote:
> Dear all,
>
> Max, first of all, many thanks for providing the odfWeave package.
>
> My problem: Whenever I have multiple plots in one single chunk of my
> ODF file, only the last plot gets shown. The problem can be reproduced
> with this toy example (to be used in an ODF file together with
> odfWeave -- I'm using the newest version 0.7.3):
>
> <<plot1, echo=FALSE, fig=TRUE>>=
> for (i in 1:3) {
> plot(1,1, main=paste('Plot',i))
> }
> @
>

-- 
Sarah Goslee
http://www.functionaldiversity.org

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Mon 14 Apr 2008 - 18:36:39 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 14 Apr 2008 - 23:30:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive