I have data on a regular grid in the format: x y z data. I would like to be able to plot them in 3d kind of like a volume or a mesh with colors. Is that possible in R and how? Thanks [[alternative HTML version deleted]]
On 2/20/2009 10:50 AM, kapo coulibaly wrote:> I have data on a regular grid in the format: x y z data. I would like to > be able to plot them in 3d kind of like a volume or a mesh with colors. Is > that possible in R and how?There are lots of ways, depending on what you want the plot to look like. One is library(rgl) plot3d(x, y, z, col=color) (assuming you also have a variable indicating the color to plot). Duncan Murdoch
You can try rgl package. It utilizes OpenGL library. Or, check the CRAN to find other gtk based package ----- Original Message ----- From: "kapo coulibaly" <kmcoulib at gmail.com> To: <r-help at r-project.org> Sent: Friday, February 20, 2009 11:50 PM Subject: [R] 3D or 4D plot I have data on a regular grid in the format: x y z data. I would like to be able to plot them in 3d kind of like a volume or a mesh with colors. Is that possible in R and how? Thanks [[alternative HTML version deleted]] ______________________________________________ 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.
kapo coulibaly <kmcoulib at gmail.com> wrote:> I have data on a regular grid in the format: x y z data. I would like to > be able to plot them in 3d kind of like a volume or a mesh with colors. Is > that possible in R and how? >I've posted code for a 4-D plot here: http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=90 It seems to be quite close to what you're looking for. Mike -- Mike Prager, NOAA, Beaufort, NC * Opinions expressed are personal and not represented otherwise. * Any use of tradenames does not constitute a NOAA endorsement.