[R] Orientation of tickmarks labels in boxplot/plot

From: Michal Lijowski <michal_at_cvu.wustl.edu>
Date: Thu 03 Nov 2005 - 09:06:58 EST


Hi,

I have been trying draw tickmark labels along the y - axis perpendicular to the y axis while labels along the x - axis parallel to x axis while making box plot.

Here is my test dataset.

 TData
   ID Ratio

1   0 7.075
2   0 7.414
3   0 7.403
4   0 7.168
5   0 6.820
6   0 7.294
7   0 7.238
8   0 7.938
9   1 7.708
10  1 8.691
11  1 8.714
12  1 8.066
13  1 8.949
14  1 8.590
15  1 8.714
16  1 8.601

 boxplot(Ratio ~ ID, data=TData)

makes box plot with tickmark labels parallel to the y - axis. So I try

boxplot(Ratio ~ ID, data=TData, axes=FALSE) par(las=0)
axis(1)
and I get x - axis ranging from 0.5 to 2.5 (why?) and boxes at 1 and 2.
par(las=2)
axis(2)
box()
So, if I set tickmark labels parallel to y - axis somehow the x - axis range is not what I expect even if I use xlim = c(0.0, 3.0)
 in boxplot(Ratio ~ Id, data=TData, axes=FALSE, xlim=c(0.0, 3.0))  par(las=0)
 axis(1)

Plots are in the attachments in pdf format.

I appreciate any tips.

I am using R 2.2.0 (2005-10-06) on FC4.

Michal



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
Received on Thu Nov 03 09:25:43 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:54 EST