Dear R-people I am struggling with disappearing legend box when using logarithmic axis in scatterplot.
Sample code: ############### library(car) #constructing data set x=rep(1:50, 2); ClassDummy=rep(1:2, each=50) ; y=5+ClassDummy+(rnorm(100,mean=(50/x),sd=(10/x))) mydata <- data.frame (cbind('x'=x, 'ClassDummy'=ClassDummy, 'y'=y)) mydata$Class<-rep(c('a', 'b'),each=50) # Plotting wiht regular axis scatterplot(y~x | Class, reg.line=FALSE, smooth=FALSE, labels=F, boxplots='xy', by.groups=FALSE, data=mydata ) #Plotting with logarithmic axes scatterplot(y~x | Class, reg.line=FALSE, log="xy", smooth=FALSE, labels=F, boxplots='xy', by.groups=FALSE, data=mydata ) ################### When using regular axis the legend box shows up. When using logarithmic axis the legend box does not show up. >From the R console i get the following error message: Warning message: In log(-0.0679588001734407, 10) : NaNs produced So; what is the problem here? How do I get the legend box when using logarithmic axis? System info: OS - Windows XP, R version 2.9.2, "car" package up to date by Sept. 14th 2009. Regards Helmer ______________________________________________ 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.