[R] 3d barplot in rgl
stubben
stubben at lanl.gov
Tue Sep 25 20:34:33 CEST 2007
Is there anyway to plot a matrix using a 3d bar plot. Something like
bar3 in matlab?
The example in demo hist3d does a 3d barplot for binned data, but has
anyone tried something for a simple matrix with spaces betwen bars
and axis labels using matrix dimnames or 1,2,3?
stages<-letters[1:3]
A<-matrix(c(
0.21, 0.21,0.03,
0.55, 0.58, 0.09,
1.30, 1.35, 0.22), nrow=3, byrow=TRUE, dimnames=list(stages,stages) )
## I can get a surface plot, but that's about it.
persp3d(A, col="red", alpha=0.7,
xlab="fate", ylab="stage", zlab="Sensitivity", box=FALSE)
Thanks,
Chris Stubben
--
-------------------
Los Alamos National Lab
BioScience Division
MS M888
Los Alamos, NM 87545
More information about the R-help
mailing list