Hello, I am trying to get a surface plot of a data set that looks like the following, 1 2 5.6 5 9 2.4 9 8 9.8 ... to (60,000 rows down) From my homework, the persp function only works with evenly spaced data points with the z data beeing in a matrix. my data is not in that format. the wireframe fxn gives me an error, no applicable method for "wireframe" the plot3d fxn I got working thanks to Scionforbai's help. However it does not represent the data like wireframe or persp would. Any help would be appreciated. thanks --------------------------------- [[alternative HTML version deleted]]
See 'akima' package. On 20/12/2007, Brad B <the13thday at yahoo.com> wrote:> Hello, > I am trying to get a surface plot of a data set that looks like the following, > 1 2 5.6 > 5 9 2.4 > 9 8 9.8 > ... to (60,000 rows down) > > From my homework, the persp function only works with evenly spaced data points with the z data beeing in a matrix. my data is not in that format. > the wireframe fxn gives me an error, > no applicable method for "wireframe" > the plot3d fxn I got working thanks to Scionforbai's help. However it does not represent the data like wireframe or persp would. > Any help would be appreciated. > 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. >-- Henrique Dallazuanna Curitiba-Paran?-Brasil 25? 25' 40" S 49? 16' 22" O
When using the wireframe function you need to create a 2D grid for your two X variables. Try the "expand.grid" function on your data, then run the wireframe on that result Brad B-2 wrote:> > Hello, > I am trying to get a surface plot of a data set that looks like the > following, > 1 2 5.6 > 5 9 2.4 > 9 8 9.8 > ... to (60,000 rows down) > > From my homework, the persp function only works with evenly spaced data > points with the z data beeing in a matrix. my data is not in that format. > the wireframe fxn gives me an error, > no applicable method for "wireframe" > the plot3d fxn I got working thanks to Scionforbai's help. However it > does not represent the data like wireframe or persp would. > Any help would be appreciated. > 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. > >-- View this message in context: http://www.nabble.com/plot3d%2C-wireframe%2C-persp-help-tp14436239p14437124.html Sent from the R help mailing list archive at Nabble.com.
Seemingly Similar Threads
- persp or wireframe 3D plot: how can I independently adjust linewidth of the 'surface' and framebox?
- 3D surface plot with wireframe or persp?
- adding planes/lines to 3d surface plots? (persp, wireframe)
- Layering multiple persp plots
- Add lines (contours) to lattice wireframe plot