Re: [R] x-axis in filled.contour

From: Greg Snow <Greg.Snow_at_intermountainmail.org>
Date: Fri 19 Jan 2007 - 16:51:30 GMT


The filled.contour function first plots the contour plot, then the legend to the side. The plotting parameters that are in effect after the call are based on the legend, not the original plot, so the coordinate system apears to be messed up. One way around this is to use the plot.axis argument to do your annotation, look at the example in ?filled.contour that is labelled # Annotating a filled contour plot

Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow@intermountainmail.org
(801) 408-8111
 
 


> -----Original Message-----
> From: r-help-bounces@stat.math.ethz.ch
> [mailto:r-help-bounces@stat.math.ethz.ch] On Behalf Of Thomas Steiner
> Sent: Friday, January 19, 2007 8:56 AM
> To: r-help@stat.math.ethz.ch
> Subject: [R] x-axis in filled.contour
>
> The filled.contour function gives me some strange output.
> What did I do wrong?
>
> x=seq(0,1,length=10)
> y=seq(0,1,length=10)
> z=array(rnorm(100),dim=c(10,10))
> filled.contour(x,y,z)
> lines(0.4,0.8,type="p")
> abline(v=0.4,lty="dashed")
>
> the x-cooridnate of the line and the point is 0.4, but it's
> slightly above. This problem just appears with
> "filled.contour", so I guess there is a problem with the key
> on the right.
> I use 2.4.0 under unbuntu
> Thomas
>
> ______________________________________________
> R-help@stat.math.ethz.ch 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@stat.math.ethz.ch 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.
Received on Sat Jan 20 03:57:06 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 19 Jan 2007 - 17:30:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.