[R] Labeling a plot's x-axis with 12 strings, vertically oriented.
Greg Snow
Greg.Snow at imail.org
Wed May 21 21:03:01 CEST 2008
Here is one example:
> y <- rnorm(12)
> x <- 1:12
>
> par(mar=c(10, 4, 4, 1)+0.1)
> plot(x,y, xlab='', xaxt='n')
> axis(1, at=x, labels=month.name, las=2)
>
See help on par and axis for details.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
(801) 408-8111
> -----Original Message-----
> From: r-help-bounces at r-project.org
> [mailto:r-help-bounces at r-project.org] On Behalf Of John
> Sent: Wednesday, May 21, 2008 12:56 PM
> To: r-help at r-project.org
> Subject: [R] Labeling a plot's x-axis with 12 strings,
> vertically oriented.
>
> Hello,
>
> I really enjoy using R for my plotting. I have a modest plot,
> containing
> 24 data points, across 2 lines,12 points each. Ideally, the
> x-axis would be labeled with a series of strings, oriented
> vertically. Here is the R container holding the Search strings:
>
> > Search
> [1] Route To: NCENGR
> Status: Open
> CR Route To: NCENGR
> [3] Status: Cancel Route To: TEST1 Status: ENG REQ
> Route To: TDELLE
> [5] (*) Customer Name: * (*)
> Customer Name: S*IT*
> [7] (*) Customer Name: SMITH (*) Address:
> 1***
> [9] (*) Address: 1** S**** ST Route To:
> NCS
> [11] Route To: NCS From Date: 01/01/2000 Name:
> SMITH
> 12 Levels: (*) Address: 1** S**** ST (*) Address:
> 1*** ... Status: Open CR Route To: NCENGR
>
>
> Is there a function to define the x-axis, using the above 12
> strings as axis tick labels, from 1 - 12, vertically
> oriented? Any help would be appreciated, as my current work
> around is tedious, and not asthetically pleasing.
>
> Cheers,
>
> John
>
> ______________________________________________
> 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