Re: [R] plot log scale, axis original scale
Hi Dean Sonneborn [EMAIL PROTECTED] napsal dne 10.04.2007 18:28:43: Petr, This is great! Thank you so much for responding. Could I get one more point clarified. My A values range from 1 to 35. I would really like to use something like AT=1 to 35 by 5 instead of AT=log(a). at=log(a) plots all the messy values. I'm hoping to get values like 1,5 10, 15...35. Is it possible to do it like this? You need not use your original vector for labeling. You can use any other sequence of numbers, e.g. a.lab - c(1,seq(5,35,5)) and use it for labeling. And beware of letters format AT is not at. Regards Petr Petr PIKAL wrote: Hi [EMAIL PROTECTED] 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@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. -- Dean Sonneborn, MS Programmer Analyst Department of Public Health Sciences University of California, Davis (530) 754-9516 (voice) (530) 752-3118 (fax) __ R-help@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.
Re: [R] plot log scale, axis original scale
Hi [EMAIL PROTECTED] 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@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. __ R-help@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.
[R] plot log scale, axis original scale
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) -- 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@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.
Re: [R] plot log scale, axis original scale
Dean Sonneborn wrote: 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) (tick needs to be TRUE or FALSE!) Try axis(2, at=log(a), label=a) Or, maybe, to avoid the 10 label disappearing: lbl - a; lbl[9] - NA; axis(2, at=log(a), label=lbl) __ R-help@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.