[R] scatterplot3d

Uwe Ligges ligges at statistik.uni-dortmund.de
Thu Jun 20 09:29:16 CEST 2002

Marwan Khawaja wrote:
> Hello,
> I am trying to replicate example 4 in the package 'scatterplot3d':
> s3d.dat_data.frame(cols=as.vector(col(my.model4)),
>   rows=as.vector(row(my.model4)),
>   value=as.vector(my.model4))
> scatterplot3d(s3d.dat, type="h", lwd=5, pch=" ",
>   x.ticklabs=colnames(my.model4), y.ticklabs=rownames(my.model4),
>         main="Conditional probabilities, Model 3")
> Nice! but,
> 1) Not clear how to attach a vector of alphanumeric labels for rows and
> columns -- instead of the rownames.

What about 
 scatterplot3d(...., x.ticklabs = c("label 11", "label 12", ....), 
   y.ticklabs = c("label 21", label 22", ....))

See ?scatterplot3d.

> 2) What is the 'pch' option for producing vertical lines (for the values)
> exactly the size of the 'boxes'?

Well, 'pch' specifies the symbol/character for plotting points (as
mentioned in ?scatterplot3d), not anything regarding lines.
To obtain vertical lines, use   type = "h"  as  common for R graphics
(mentioned in ?scatterplot3d as well).
The width of the lines can be specified with the argument lwd (cf.

Uwe Ligges
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list