[R] plot points using vis.gam

Simon Wood s.wood at bath.ac.uk
Sun Aug 22 12:47:51 CEST 2010


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



More information about the R-help mailing list