Re: [R] Equal vertical spaced labels on plot with log="y"
Daniel Brewer wrote: > Hello, > > I have a series of labels that I want to place on a plot with a log > scale y axis. I want these labels to be equally spaced vertically as > seen on the plot. > > I have been trying this: > > ylab <- 160 - log2(1:length(labels)) > > but that does not seem to work (where 160 is basically the top of the plot). > Hi Daniel, The method I use is to get the "real" coordinates on the plot: xylim<-par("usr") turn off the log transformation: par(ylog=FALSE) say I have three labels that I want to space: ypos<-xylim[3]+(xylim[4]-xylim[3])*c(0.2,0.5,0.8) text(xpos,ypos,c("first","second","third")) # turn the y log transformation on again if necessary par(ylog=TRUE) I assume you can work out xpos for yourself. Jim __ 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.
[R] Equal vertical spaced labels on plot with log="y"
Hello, I have a series of labels that I want to place on a plot with a log scale y axis. I want these labels to be equally spaced vertically as seen on the plot. I have been trying this: ylab <- 160 - log2(1:length(labels)) but that does not seem to work (where 160 is basically the top of the plot). Any ideas? Thanks -- ** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Email: [EMAIL PROTECTED] ** The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. This e-mail message is confidential and for use by the a...{{dropped:2}} __ 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.