[R] 3-D-Plot
Uwe Ligges
ligges at statistik.tu-dortmund.de
Fri Apr 18 14:58:33 CEST 2008
Edwin Sendjaja wrote:
> Hi Uwe,
>
> I decided to use scatterplot3d, because it looks better.
> I have some questions:
>
> Is it possible to get 1 axis( for example: z-axis) not as numeric, but as
> character.
>
> Because I have date set like this:
>
> x=relative Time: 0,3 ms; 0,5ms, etc
> y=Delay:10 ms, 20 ms, etc
> z= Host: cnn.com, heise.de,etc
See ?scatterplot3d. You can use arguments x.ticklabs, y.ticklabs,
z.ticklabs in order top specify character strings.
> If no, can you tell me little how to modify the code to get this. Thank you.
>
> another question:
>
> How can I change the width line of the axis (x,y,z). The default line is for
> me too thin.
par(lwd=2) or more, for example.
First example from ?scatterplot3d but with some other labels on x axis
and thick lines:
z <- seq(-10, 10, 0.01)
x <- cos(z)
y <- sin(z)
par(lwd=3)
scatterplot3d(x, y, z, highlight.3d=TRUE, col.axis="blue",
col.grid="lightblue", main="scatterplot3d - 1", pch=20,
x.ticklabs=paste(seq(0.3, 1.1, by=0.2), "ms"),
xlab="relative Time")
Best wishes,
Uwe
>
> Thank you in advance,
>
>
> Edwin Sendjaja
>
> Am Donnerstag, 17. April 2008 14:43:39 schrieb Uwe Ligges:
>> Edwin Sendjaja wrote:
>>> Hi Uwe,
>>>
>>> Thanks for your answer.
>>>
>>> What is the different between rgl and scatterplot3d? I dont need a
>>> graphik like vulcano. I just need 3D-"dot"-plot.
>> Sure, rgl can do it as well.
>> Difference is that scatterplot3d is based on R's standard devices while
>> rgl is based on an OpenGL device. Hence rgl is much more flexible and
>> can rotate things and easily draws nice transparent forms, but
>> scatterplot3d is nice for printing to 2D in different formats at the end.
>>
>> Uwe
>>
>>> Am Donnerstag, 17. April 2008 09:03:17 schrieb Uwe Ligges:
>>>> Edwin Sendjaja wrote:
>>>>> Hello,
>>>>>
>>>>> I've got some problems. I hope someone can help me.
>>>>>
>>>>> First question:
>>>>> I am trying to get grid on scatterplot3d (from scatterplot3d package).
>>>>> It seems that scatterplot3d draw on grip on X and Z side. Is it
>>>>> possible to get Grid on the whole Box?
>>>> At least there is no build in function to do it.
>>>>
>>>>> Second question:
>>>>> Is it possible to use the standard package drawing 3d-plot(without
>>>>> scatterplot3d) ?because now I have already 2d-plot. I just want to add
>>>>> the z-axis.
>>>> See, for example, ?cloud in package "lattice", ?plot3d in package "rgl",
>>>>
>>>>> Third question:
>>>>> What is the best 3d-plot? it seems that scatterplot3 doesn't support
>>>>> anything( like turning the box vertically. I think, angle parameter
>>>>> just turn the box horisontally. I might wrong with this.
>>>> You are right.
>>>>
>>>> Best wishes,
>>>> Uwe
>>>>
>>>>> Thank a lot in advance
>>>>>
>>>>> Edwin
>>>>>
>>>>> ______________________________________________
>>>>> 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.
>>> ______________________________________________
>>> 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.
More information about the R-help
mailing list