Skip to content
Back to formatted view

Raw Message

Message-ID: <Xns9A574EB4C689BdNOTwinscomcast@80.91.229.13>
Date: 2008-03-04T12:44:11Z
From: David Winsemius
Subject: automatically save graphic

Richard Cotton <Richard.Cotton at hsl.gov.uk> wrote in
news:15824000.post at talk.nabble.com: 

> 
> mysimbaa wrote:
>> 
>> I write some code which produce a graphic
>> Now I try at the end to output it (bitmap or jpeg) like this way :
>> 
>> - pop up window asking me to choose a path where to save my picture
>> - choose name for this picture
>> 
> 
> Your message isn't very clear, so forgive me if I have
> misunderstood, but 1. You can save your pictures in the manner you
> described by clicking on the File menu in a graphics window, then
> 'Save As...', and choose bitmap or jpeg.
> 
> 2. If you want to save plots automatically, then do it in code:
> jpeg("foo.jpg")

I am wondering if:

jpeg(file=file.choose())   # ...accomplish mysimbaa's goals.

(There have been several messages in recent weeks that suggest PNG is a 
better format for lossless image storage of line and point graphics.)

> plot(1:100)
> dev.off()
> 

-- 
David Winsemius