Problem solved..

My bad. No prb with cdplot or graphics-part. The problem was the a<-list.. 
command which resulted in all three levels of bar$h.r in a[[1]]. Skipping the 
list function sorted it out.


par(mfrow=c(2,2))
a<-levels(bar$h.r)[c(1,3,6)]
print(a)
lapply(a,function(x){
        a<-subset(bar,h.r==x)
        with(a, cdplot(wh~Age,ylab=x))
        #plot.new()
                })

Regards,

//M



On 8. sep. 2010, at 03.37, David Winsemius wrote:

> 
> On Sep 7, 2010, at 8:02 PM, moleps wrote:
> 
>> Dear all,
>> 
>> I´m trying to create multiple graphs on the same page, but they are all 
>> stacked on top of each other.
>> 
>> My code:
>> 
>> 
>> par(mfrow=c(2,2))
>> a<-list(levels(bar$h.r)[c(1,3,6)])
>> print(a)
>> 
>> lapply(a,function(x){
>>      a<-subset(bar,h.r==x)
>>      with(a, cdplot(wh~Age,ylab=x))
>>      #plot.new()
>>              })
>> 
>> The plot.new command doesnt help...
>> 
>> Any ideas??
> 
> ?layout  # assuming that the undescribed plotting function is base graphics. 
> Some plotting functions are hard coded and are able to defeat the usual 
> formatting options.
> 
> -- 
> David Winsemius, MD
> West Hartford, CT
> 

______________________________________________
R-help@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.

Reply via email to