[R] Put short string labels vertically near tick marks on bottom axis

arun smartpink111 at yahoo.com
Wed May 14 19:32:19 CEST 2014



Hi,

May be this helps:
num <- gsub("[[:alpha:]]+","",horLabels)##from your previous post
Chr <- gsub("[0-9.]+","",horLabels)
 horLabelsNew <- parse(text=paste("{}","^", num,"*",Chr,sep=""))
plot(horData, verData,xaxt='n',xlim= horAxisLims)
axis(1,tick=TRUE,at= horTicLocs,labels=rep("",length(horLabels)))
library(plotrix)
staxlab(1,at=horTicLocs,labels=horLabelsNew,srt=90,adj=c(1,0))
A.K.


On Wednesday, May 14, 2014 10:10 AM, Hurr <hill0093 at umn.edu> wrote:
I want to split the long label strings by 
separating out the alphabetical unit part and 
put the number to the left (above) the unit.
I will have the separation done by my other 
program if necessary. Then I would need to 
put some strings not at tick marks.
Or is there a way to do that (semi) automatically in 
the graphics of R?
Hurr



--
View this message in context: http://r.789695.n4.nabble.com/Put-short-string-labels-vertically-near-tick-marks-on-bottom-axis-tp4690452p4690528.html

Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help at 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.



More information about the R-help mailing list