[R] three plots as one JEPG?
Marc Schwartz
marc_schwartz at me.com
Sat Dec 5 18:37:53 CET 2009
On Dec 5, 2009, at 11:34 AM, Marc Schwartz wrote:
> On Dec 5, 2009, at 11:21 AM, Walther, Alexander wrote:
>
>> Dear List,
>>
>>
>> i have a question concerning these device-related function (i.e.
>> pdf(),jpeg(), etc.). Currently, I plot three graphs, one below the
>> other
>> into a /single/ window by using par(). I would like to save this
>> figure
>> now as JPEG or PNG. By now, code looks as follows:
>>
>>
>> jepg(...)
>>
>> par(...)
>> plot(...)
>>
>> par(...)
>> plot(...)
>>
>> par(...)
>> plot(...)
>>
>> dev.off()
>>
>>
>> Unfortunaltely, I just get the last plot saved, the rest is
>> dismissed.
>> Does anyone have a solution for this problem?
>>
>> Cheers
>>
>> Alex
>
>
> In the sequence you have above, each time you call plot(), you are
> erasing the prior plot.
>
> What you want is:
>
> jpeg(...)
>
> par(mfrow = (3, 1))
Sorry, typo on that line. It should be:
par(mfrow = c(3, 1))
Marc
More information about the R-help
mailing list