[R] plot points using vis.gam

David Winsemius dwinsemius at comcast.net
Mon Aug 23 04:13:19 CEST 2010


I typically annotate contourplots in the manner suggested. I agree that doing
it with a persp() plot would be more difficult but it's really quite
straightforward with either base or lattice graphics.

-- 
David

Simon Wood-4 wrote:
> 
> There is no easy way to do this. It might be possible to customize
> vis.gam, to 
> be able to do this by using the same trick that allows you to add elements
> to 
> a 3D plot with `persp' (see help file for persp), but it would be quite a
> bit 
> of coding, I guess.
> 
> On Thursday 05 August 2010 15:19, mra wrote:
>> Hello,
>> I'm trying to illustrate the relationships between various trait and
>> environment data gathered from a number of sites. I've created a GAM to
>> do
>> this: gam1=gam(trait~s(env1)+s(env2)+te(env1,env2)) and I know how to
>> create a 3D plot using vis.gam.  I want to be able to show points on the
>> 3D
>> plot indicating the sites that the data came from. I can do this on a 2D
>> plot when there is one term, e.g. gam2=gam(trait~s(env1)) but cannot
>> figure
>> it out for the 3D plot.
>>
>> Any help would be much appreciated
>>
>> Monica
> 
> -- 
>> Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK
>> +44 1225 386603  www.maths.bath.ac.uk/~sw283
> 
> ______________________________________________
> 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://r.789695.n4.nabble.com/plot-points-using-vis-gam-tp2314926p2334546.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list