[R] A contour plot question - vis.gam () function in "mgcv"

ilai keren at math.montana.edu
Wed Apr 4 00:49:00 CEST 2012


Try to plot the points first followed by vis.gam(...,type='contour',
color='bw', add=T) instead of vis.gam followed by points.

HTH


On Tue, Apr 3, 2012 at 2:48 PM, Ravi Varadhan <rvaradhan at jhmi.edu> wrote:
> Hi,
>
> Please see the attached contour plot (I am sorry about the big file).  This was created using the vis.gam() function in "mgcv" package.  However, my question is somewhat broader.
>
> In generating this figure, I first created the contours using vis.gam() and then I plotted the points.  These point are plotted on top of the contours so that some of the contour lines are only partially visible.  Is there a way to make the contour lines fully visible?  I cannot reverse the order and plot the points first and then call vis.gam().  Or, can I?  Are there other options?
>
> Thanks for any help or hints.
>
> Best,
> Ravi
>
>
> Ravi Varadhan, Ph.D.
> Assistant Professor
> The Center on Aging and Health
> Division of Geriatric Medicine & Gerontology
> Johns Hopkins University
> rvaradhan at jhmi.edu<mailto:rvaradhan at jhmi.edu>
> 410-502-2619
>
>
> ______________________________________________
> 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.
>



More information about the R-help mailing list