[R] Labeling a plot's x-axis with 12 strings, vertically oriented.
Duncan Murdoch
murdoch at stats.uwo.ca
Wed May 21 21:11:26 CEST 2008
On 5/21/2008 2:56 PM, John wrote:
> 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.
plot(1:12, axes=F)
axis(1, at=1:12, labels=c('one','two','three','four','five','six',
'seven', 'eight', 'nine','ten','eleven','twelve'), las=2)
axis(2)
box()
You'll probably need bigger margins for your longer strings.
Duncan Murdoch
More information about the R-help
mailing list