Quoting Duncan Murdoch <[email protected]>:

[email protected] wrote:
I have just started using the package 'rgl' to explore my data as a 3D scatterplot.

It's a great tool. But I would like to be able to save some graph views and it appears the only format available is 'png' and it doesn't look that nice. It is excellent to work with on screen and explore/play, but when it comes to producing a good quality graphic I'm a bit disappointed.

So the questions I have are:

1) is there a way to render the graph in the RGL device as a high quality graphic?


You can use rgl.postscript for various other formats, but you may find
the bitmap output is better.  In particular, shading is not always done
correctly.

Duncan Murdoch


Hi Duncan,

thanks for that.
Stupidly I hadn't realised only part of the manual had printed so I was missing a lot of interesting options, not only this one but others to animate views.

The type of plots I'm producing are similar to these:

library(rgl)
m<-matrix(rnorm(900),ncol=3)
plot3d(m,col=rainbow(6),type="s",size=0.8)

I tried rgl.postscript to save to pdf, as it's become my default format when I want smooth plots using standard R graphics X11() It looks smoother, but I get some "artifacts" in that the edges and colouring of a number of spheres are rough, or incompletely coloured (imagine a small scratch on a photograph)

using 'rgl.snapshot' to output a bitmap (png) with small spheres it doesn't look that great. The default squares look fine 'though.

I guess I'll just play with these limitations. I was just wondering if there was a simple way to get significantly better results.
But I'm not complaining! :) the 'rgl' package is pretty impressive!

Thank you.

Jose de las Heras






--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

______________________________________________
[email protected] 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.

Reply via email to