Re: [R] Plotting device does not show all graphs

From: Sarah Goslee <sarah.goslee_at_gmail.com>
Date: Thu, 26 May 2011 11:47:14 -0400

Well, when I try to run your sample code, I get one figure and a bunch of error messages.

How about an actual executable example and the requested basic information on your OS, version of R, etc? That would make it a lot easier to offer useful suggestions (by which I mean possible).

> d=data.frame(age=rnorm(100,40,8),ht=rnorm(100,170,15))
>
> tiff(file=paste("test","%03d",".tif",sep=""))
>
> hist.data.frame(d)
Error: could not find function "hist.data.frame"
>
> datadensity(d)

Error: could not find function "datadensity"
>
> par(mfrow=c(1,2),mar=c(3,3,3,3))
>
> boxplot(d$age)
>
> hist(age)
Error in hist(age) : object 'age' not found
>
> dev.off()

null device

          1

I get a boxplot only.

Can you actually run this code without error messages? Even if you have loaded whatever library the missing plot functions came from, hist(age) is not going to create a plot, thus you would only ever get three files.

Sarah

On Thu, May 26, 2011 at 11:23 AM, John S <john.smithr75_at_gmail.com> wrote:
> Dear All,
>
> I am creating 4 plots (files) but I could see only 3. Here is a simple code
>
>  d=data.frame(age=rnorm(100,40,8),ht=rnorm(100,170,15))
>
> tiff(file=paste("test","%03d",".tif",sep=""))
>
> hist.data.frame(d)
>
> datadensity(d)
>
> par(mfrow=c(1,2),mar=c(3,3,3,3))
>
> boxplot(d$age)
>
> hist(age)
>
> dev.off()
>
>
>
> PDF works fine but png and tiff seems to miss the second graph. I must be
> missing something
> Thanks!!!

-- 
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 Thu 26 May 2011 - 15:49:02 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

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 Thu 26 May 2011 - 15:50:10 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