[R] scatterplot3d with categorical data
Geoff Russell
geoffrey.russell at gmail.com
Sat Jan 26 11:24:04 CET 2008
Dear users,
I'm trying to produce a 3d bar plot but the x and y dimensions have categorical
data -- so I only want 3 points on each axis. So I try:
require(scatterplot3d)
mymat<-data.frame(
x=c(1,1,1,2,2,2,3,3,3),
y=c(1,2,3,1,2,3,1,2,3),
z=c(1,2,3,4,5,6,7,8,9))
scatterplot3d(mymat,
type="h", lwd=5, pch=" ",
xlab="xlabel", ylab="ylabel", zlab="zlabel",
xlim=c(1,3), ylim=c(1,3),
lab=c(3,3),
x.ticklabs=c("Low","Medium","High"), y.ticklabs=c("Green","Blue","Black"),
main="My Bar Plot")
But I still get x ticks at 1, 1.5, 2, 2.5, 3 on both x and y axes. I
thought lab
controlled this (according to the documentation).
What am I doing wrong, or is there some restriction on the way the
function works?
Cheers,
Geoff Russell
More information about the R-help
mailing list