[R] rgl 'how-to's
murdoch.duncan at gmail.com
Thu Sep 8 11:57:55 CEST 2011
On 11-09-07 6:07 PM, Dale Coons wrote:
> Doing a visual graphic and trying to make it "pretty"
> Here's simple chart to play with:
> dotframe plot3d(dotframe$x,dotframe$y,dotframe$z, radius=3,
> axes=FALSE, box=FALSE, xlab='',ylab='',zlab='')
> text3d(x=7,y=0,z=0, text="hello, world",adj = 0.5, color="blue") #adds a
> label at one of the points
> My questions:
> 1) is there a way to label the points (spheres in this case) so that the
> label 'stays on top'? other than text3d(), which adds labels, but they
> are hidden when the graph is rotated?
Yes, but it's not trivial. You need to write your own mouse handler,
that erases the old labels, rotates the data, and replots the labels
afterwards. This would be quite feasible with a small number of labels,
but maybe not if you have too many: the delays for replotting would be
> 2) can a bitmap, say, of a company or university be inserted into the
> title area?
I think so, by plotting a "sprite" with the bitmap as a "texture". See
> 3) can a bitmap be used as the marker for a point?
That also sounds like a sprite.
> Thanks in advance for help-I learn a lot from others questions and
> appreciate direction (even if it's RTFM!)
> R-help at r-project.org mailing list
> 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