Re: [R] automatically jpeg output

2007-07-20 Thread Ding, Rebecca

Hi R users,

Thanks for the jpeg() function. I do find it. However when I used
par(mfrow=c(6,7)), which can put all my histograms in one page, R gave
me the error message:
Error in plot.new() : figure margins too large. The mfrow=c(6,7)statment
was fine in postscript("AYA_ELA.ps"). 

Is there a way to solve that problem?

Thanks.

-Original Message-
From: Benilton Carvalho [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 20, 2007 11:45 AM
To: Ding, Rebecca
Cc: R-help@stat.math.ethz.ch
Subject: Re: [R] automatically jpeg output

jpeg(...) ##if you have X11
bitmap(..., type="jpeg") ##otherwise

b

On Jul 20, 2007, at 11:34 AM, Ding, Rebecca wrote:

> Dear R users,
>
> I used R to draw many histograms and I would like to automatically 
> save them into a jpeg file. I tried the following code since I know 
> .ps file could be saved like this way:
>
> postscript("AYA_ELA.jpeg",horizontal=F,onefile=T)
> ..#some funtions inside here
> dev.off()
>
> There was a jpeg file, however, there were no pictures inside. Any 
> suggestion?
>
> Thanks.
>
> Rebecca

--
This e-mail and any files transmitted with it may contain privileged or 
confidential information.
It is solely for use by the individual for whom it is intended, even if 
addressed incorrectly.
If you received this e-mail in error, please notify the sender; do not 
disclose, copy, distribute,
or take any action in reliance on the contents of this information; and delete 
it from
your system. Any other use of this e-mail is prohibited.

Thank you for your compliance.

__
R-help@stat.math.ethz.ch 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.


Re: [R] automatically jpeg output

2007-07-20 Thread Ted Harding
On 20-Jul-07 15:34:00, Ding, Rebecca wrote:
> Dear R users,
> 
> I used R to draw many histograms and I would like to automatically save
> them into a jpeg file. I tried the following code since I know .ps file
> could be saved like this way:
> 
> postscript("AYA_ELA.jpeg",horizontal=F,onefile=T)
> ..#some funtions inside here
> dev.off()
> 
> There was a jpeg file, however, there is no pictures inside. Any
> suggestion? 
> 
> Thanks.
> 
> Rebecca

If your "some functions inside here" do draw histograms, then
there will indeed be pictures inside, but they will be in PostScript,
since that is what is created when you use the postscript() device.
The fact that you used ".jpeg" in the fileneam has nothing to
do with it -- it will simply store the output, as PostScript,
in the file whose name you give to it. It trusts you.

You would have seen the PostScript pictures if you had used a
PostScript viewer which reacts to the content of the files,
whereas presumably your system expects a file whose name ends
in ".jpeg" or ".jpg" to be a JPEG file; and therefore will
use the wrong interpreter and fail to recognise the picture
(as you have just proved).

If you want to create JPEG files in a similar way, use the
jpeg() function -- read ?jpeg for details.

Best wishes,
Ted.


E-Mail: (Ted Harding) <[EMAIL PROTECTED]>
Fax-to-email: +44 (0)870 094 0861
Date: 20-Jul-07   Time: 17:07:20
-- XFMail --

__
R-help@stat.math.ethz.ch 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.


Re: [R] automatically jpeg output

2007-07-20 Thread Benilton Carvalho
jpeg(...) ##if you have X11
bitmap(..., type="jpeg") ##otherwise

b

On Jul 20, 2007, at 11:34 AM, Ding, Rebecca wrote:

> Dear R users,
>
> I used R to draw many histograms and I would like to automatically  
> save
> them into a jpeg file. I tried the following code since I know .ps  
> file
> could be saved like this way:
>
> postscript("AYA_ELA.jpeg",horizontal=F,onefile=T)
> ..#some funtions inside here
> dev.off()
>
> There was a jpeg file, however, there is no pictures inside. Any
> suggestion?
>
> Thanks.
>
> Rebecca

__
R-help@stat.math.ethz.ch 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.


[R] automatically jpeg output

2007-07-20 Thread Ding, Rebecca
Dear R users,

I used R to draw many histograms and I would like to automatically save
them into a jpeg file. I tried the following code since I know .ps file
could be saved like this way:

postscript("AYA_ELA.jpeg",horizontal=F,onefile=T)
..#some funtions inside here
dev.off()

There was a jpeg file, however, there is no pictures inside. Any
suggestion? 

Thanks.

Rebecca 


--
This e-mail and any files transmitted with it may contain privileged or 
confidential information.
It is solely for use by the individual for whom it is intended, even if 
addressed incorrectly.
If you received this e-mail in error, please notify the sender; do not 
disclose, copy, distribute,
or take any action in reliance on the contents of this information; and delete 
it from
your system. Any other use of this e-mail is prohibited.

Thank you for your compliance.
--

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch 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.