Dear R users,

I still did not receive an answer to my question and went through the
archive with no luck.

So what does tiff(filename ="Rplot%03d.tif") mean ? Why the following code
does produce two files?



tiff(filename ="Rplot%03d.tif",width=24,height=20,units="cm",res=300,
pointsize=10, compression = "lzw")

plot(1)

mtext("Fig 1",side=3,line=4,adj=0.50,padj=2,col="black",cex=1)

plot(2)

mtext("Fig 2",side=3,line=4,adj=0.50,padj=2,col="black",cex=1)

plot(3)

mtext("Fig 3",side=3,line=4,adj=0.50,padj=2,col="black",cex=1)

dev.off()



Your help is appreciated,

John


On Fri, Apr 6, 2012 at 2:26 PM, John S <john.smithr75@gmail.com> wrote:

> Sorry forgot to mention that I am using windows 7 and R session info
>
> R version 2.15.0 (2012-03-30)
> Platform: i386-pc-mingw32/i386 (32-bit
>
> Thanks,
> John
>
>
>
> On Fri, Apr 6, 2012 at 2:17 PM, John S <john.smithr75@gmail.com> wrote:
>
>> Dear R experts,
>>
>> I am trying to save three plots using tiff graphics devices; however the
>> following code only produces two files (Rplot002.tif and Rplot003.tif)
>> showing figures 1 and 3. Here is a simplified ex code
>>
>>
>>
>> tiff(filename ="Rplot%03d.tif",width=24,height=20,units="cm",res=300,
>> pointsize=10, compression = "lzw")
>>
>> plot(1)
>>
>> mtext("Fig 1",side=3,line=4,adj=0.50,padj=2,col="black",cex=1)
>>
>> plot(2)
>>
>> mtext("Fig 2",side=3,line=4,adj=0.50,padj=2,col="black",cex=1)
>>
>> plot(3)
>>
>> mtext("Fig 3",side=3,line=4,adj=0.50,padj=2,col="black",cex=1)
>>
>> dev.off()
>>
>>
>>
>> Using pdf () produces the correct 3 figures but I want to use tiff images
>> .Any clues why this occurs?
>>
>> I am opening a tiff graphics device and writing plots to files in a loop
>> so I need to have a single call to tiff().
>>
>> Thanks,
>> John
>>
>>
>
>

	[[alternative HTML version deleted]]

