[R] Orientation of tickmarks labels in boxplot/plot
Michal Lijowski
michal at cvu.wustl.edu
Wed Nov 2 23:06:58 CET 2005
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RPlot1.pdf
Type: application/pdf
Size: 3578 bytes
Desc: not available
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20051102/db2c5449/RPlot1.pdf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RPlot2.pdf
Type: application/pdf
Size: 2731 bytes
Desc: not available
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20051102/db2c5449/RPlot2.pdf
More information about the R-help
mailing list