Hello,

        sample1, sample2 and sample3 are vectors of numbers.  
        The boxplot works properly but beanplot gives the following error for 
following run:

>  boxplot(sample1, sample2, sample3, ylim = ylim, main = "boxplot", names = 
> 1:3) 
>  beanplot(sample1, sample2, sample3, ylim = ylim, main = "beanplot", col = 
> c("#CAB2D6", "#33A02C", "#B2DF8A"), border = "#CAB2D6", names=c("A","B","C"))

log="y" selected
Warning message:
In plot.window(xlim = c(0.5, 3.5), ylim = c(0, 100), log = "y") :
  nonfinite axis limits [GScale(-inf,2,2, .); log=1]

        I cannot duplicate the error and warning with the following set of 
commands:

>  par(mfrow = c(1, 2), mai = c(0.5, 0.5, 0.5, 0.1)) 
>  mu <- 2 
>  si <- 0.6 
>  c <- 500 
>  mu1 = 60
>  bimodal1 <- c(rnorm(100, 60, 10), rnorm(900, 30, 10)) 
>  bimodal2 <-c(rnorm(999, 60, 10), rnorm(1, 30, 10))  
>  bimodal3 <-c(rnorm(500, 60, 10), rnorm(500, 30, 10)) 
>  ylim <- c(0, 100) 
>  boxplot(bimodal1, bimodal2, bimodal3, ylim = ylim, main = "boxplot", names = 
> 1:3) 
>  beanplot(bimodal1, bimodal2, bimodal3, ylim = ylim, main = "beanplot", col = 
> c("#CAB2D6", "#33A02C", "#B2DF8A"), border = "#CAB2D6", names=c("A","B","C"))

Here, bimodal1, bimodal2 and bimodal3 are vectors with numbers with the same 
range of values as above for sample1,sample2 and sample3.

        Please let me know how to fix the error.

        Thank you very much,

        Paul

        
______________________________________________
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