[R] A contour plot question - vis.gam () function in "mgcv"
Ravi Varadhan
rvaradhan at jhmi.edu
Wed Apr 4 05:34:22 CEST 2012
Thank you, Peter. I don't know why I didn't think of this!
Also, thanks to Ilai.
Ravi
________________________________________
From: Peter Ehlers [ehlers at ucalgary.ca]
Sent: Tuesday, April 03, 2012 8:22 PM
To: ilai
Cc: Ravi Varadhan; r-help at r-project.org
Subject: Re: [R] A contour plot question - vis.gam () function in "mgcv"
On 2012-04-03 15:49, ilai wrote:
> Try to plot the points first followed by vis.gam(...,type='contour',
> color='bw', add=T) instead of vis.gam followed by points.
>
> HTH
Or, if vis.gam gives you default scales that you wish to preserve,
then just replot the contours over the points with
vis.gam(....., add = TRUE)
Peter Ehlers
>
>
> 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.
>>
>
> ______________________________________________
> 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