Re: [R] scatterplot3d with categorical data

From: Uwe Ligges <ligges_at_statistik.tu-dortmund.de>
Date: Sat, 26 Jan 2008 18:29:25 +0100

hits=-2.6 tests=BAYES_00
X-USF-Spam-Flag: NO

Dear Geoff,

scatterplot3d was never intended to draw a plot for categorical data, but you can tweak it as follows:

Best,
Uwe

Geoff Russell wrote:
> 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
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Sat 26 Jan 2008 - 17:33:42 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 26 Jan 2008 - 18:30:08 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive