Skip to content

RGL package surface plot

4 messages · ariklee, David Winsemius, Jeff Newmiller +1 more

#
I'm completely new at R... I have sinkhole survey data (lat, long, and
elevation) and have been trying to plot a rotatable 3d plot for several
hours... cannot get it right. Examples I see tend to be grid data (one
elevation value per grid cell); however, my data are more random (known
elevations at known (but random) x-y positions). Data format is tab
separated, i.e.:

lat       long       elev
34        43           2
36.8    32.54     6.2
...etc...

please help!

arik



--
View this message in context: http://r.789695.n4.nabble.com/RGL-package-surface-plot-tp4645642.html
Sent from the R help mailing list archive at Nabble.com.
#
On Oct 9, 2012, at 5:41 PM, ariklee wrote:

            
Sounds like you want to fit some sort of 2-D manifold best fit function to a set of points, but you have not provided enough information to construct a solution.
Cries of desperation are no substitute for complete data and problem description.
#
You should help us per the posting guide.... reproducible sample data, code you have tried that you thought would work, why you think it did not, output of sessionInfo function...

Note that you can learn a lot by doing this exercise, your problem may not be where you think it is (or where we might guess it is)

See http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.
ariklee <Eric.Krantz at respec.com> wrote:

            
#
You can use loess and predict.loess to generate a fitted 3d surface that can be plotted using contour() and similar.
  
However, given the environmental nature of your problem, you might also look at the geoR package, which implements kriging, one of the more comon fitting methods for environmental data. There's a discussion of using that for prediction of a grid and a subsequent (base graphics) 3-D plot at http://streaming.stat.iastate.edu/~stat506/notes/ordkrigeexamp.pdf


S Ellison
*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}