Hesen Peng wrote:
>
>
> Thanks a lot for reminding me of this. The original code is too
> complicated and stems from several other objects. So I guess this
> simplified code may help:
>
> a <- rnorm(100)
> class(a) <- "foo"
>
> plot.foo <- function(data){
> ## opar<-par()
> par(mfcol=c(1,
To get what you want with the basic graphics, you probably want
something like this (tuned to you data):
a <- rnorm(100)
class(a) <- "foo"
plot.foo <- function(data){
## opar<-par()
#-- par(mfcol=c(1,2))
hist(data)
boxplot(data)
## par(mfcol=c(1,1))
}
par(mfcol=c(4,2))
plot(a)
plot(a)
plot
Hi,
Thanks a lot for reminding me of this. The original code is too
complicated and stems from several other objects. So I guess this
simplified code may help:
a <- rnorm(100)
class(a) <- "foo"
plot.foo <- function(data){
## opar<-par()
par(mfcol=c(1,2))
hist(data)
boxplot(data)
## par(m
Hesen Peng-2 wrote:
>
> I created a plot function which used par(mfcol=c(2,1)) so that I could
> have two plots together using just one command.
>
> For exampe:
>
> plot.foo <- function(data){
> par(mfcol=c(2,1))
> hist(data)
> plot(data)
> }
>
> Later I wanted to show 4 of these foo objec
Hi all,
I created a plot function which used par(mfcol=c(2,1)) so that I could
have two plots together using just one command.
For exampe:
plot.foo <- function(data){
par(mfcol=c(2,1))
hist(data)
plot(data)
}
Later I wanted to show 4 of these foo objects in the same picture. So
I used par(mf
5 matches
Mail list logo