[R] plot log scale, axis original scale

Petr PIKAL petr.pikal at precheza.cz
Tue Apr 10 11:14:29 CEST 2007


Hi

r-help-bounces at stat.math.ethz.ch napsal dne 09.04.2007 22:10:22:

> I want to produce some boxplots and plot the logged values but have the 
> axis scale in the original, not-logged scale. It seeming like I have the 

> first few steps but I'm having trouble with the last. Here's what I'm 
> doing (which I got for the documentation for boxplot and axis). How do I 

> get the ticks to be labeled 2,5, and 9 of the original scale?
> a<-c(1,2,3,4,5,6,7,8,9,10)
> bcat<-c(1,1,1,2,2,2,2,3,3,3)
> boxplot(log(a)~bcat, yaxt="n")
> axis(2, tick=a)

Is
axis(2, at=log(a), labels=a)

what you want?

Regards
Petr


> 
> -- 
> Dean Sonneborn, MS
> Programmer Analyst
> Department of Public Health Sciences
> University of California, Davis
> (530) 754-9516 (voice)
> (530) 752-3118 (fax)
> 
> 
>    [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch 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.



More information about the R-help mailing list