[R] scatterplot3d and box3d

27 views
Skip to first unread message

xg...@genome.wustl.edu

unread,
Nov 19, 2012, 12:20:53 PM11/19/12
to r-h...@r-project.org
I created a 3d scatter plot and am trying to change the color of outer box
lines with box3d.

Anybody can help me to figure out how to do this?

My example is:

library(scatterplot3d)
x=seq(1:6)
y=seq(7:12)
z=x*2
scatterplot3d(x, y,z)

Thanks.

Xin

______________________________________________
R-h...@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.

Duncan Murdoch

unread,
Nov 19, 2012, 5:29:45 PM11/19/12
to xg...@genome.wustl.edu, r-h...@r-project.org
On 12-11-19 12:20 PM, xg...@genome.wustl.edu wrote:
> I created a 3d scatter plot and am trying to change the color of outer box
> lines with box3d.
>
> Anybody can help me to figure out how to do this?
>
> My example is:
>
> library(scatterplot3d)
> x=seq(1:6)
> y=seq(7:12)
> z=x*2
> scatterplot3d(x, y,z)

See ?scatterplot3d.

Duncan Murdoch

Ben Bolker

unread,
Nov 19, 2012, 5:34:03 PM11/19/12
to r-h...@stat.math.ethz.ch
<xgao <at> genome.wustl.edu> writes:

>
> I created a 3d scatter plot and am trying to change the color of outer box
> lines with box3d.
>
> Anybody can help me to figure out how to do this?
>
> My example is:
>
> library(scatterplot3d)
> x=seq(1:6)
> y=seq(7:12)
> z=x*2
> scatterplot3d(x, y,z)


This is not going to be possible in the narrow sense: box3d is
from the rgl package, which uses a completely different graphics
device/protocol. You can combine plot3d with box3d (or rgl.bbox)

By the way, seq(7:12) probably doesn't do what you think it does!

Uwe Ligges

unread,
Nov 20, 2012, 4:04:22 AM11/20/12
to Ben Bolker, r-h...@stat.math.ethz.ch


On 19.11.2012 23:34, Ben Bolker wrote:
> <xgao <at> genome.wustl.edu> writes:
>
>>
>> I created a 3d scatter plot and am trying to change the color of outer box
>> lines with box3d.
>>
>> Anybody can help me to figure out how to do this?
>>
>> My example is:
>>
>> library(scatterplot3d)
>> x=seq(1:6)
>> y=seq(7:12)
>> z=x*2
>> scatterplot3d(x, y,z)
>
>
> This is not going to be possible in the narrow sense: box3d is
> from the rgl package,

... but also returned as a function from a scatterplot3d call. Anyway,
it is irrelevant here and Duncan's answer to read the help page is
correct: several arguments about controlling colours of different parts
of the plot are documented.

Best,
Uwe Ligges
Reply all
Reply to author
Forward
0 new messages