Message-ID: <Pine.GSO.4.10.10211260953230.10773-100000@fisher.stat.ucla.edu>
Date: 2002-11-26T17:59:17Z
From: Roger D. Peng
Subject: filled.contour and points
In-Reply-To: <200211261707.gAQH7PF4122788@odds.stat.purdue.edu>
In the help page for filled.contour() it says that you have insert code
which adds to the plot via the 'plot.axes'. For example,
> a <- matrix(0, 10, 10)
> x <- runif(10)
> y <- runif(10)
> filled.contour(a, plot.axes = points(x, y))
However, if you do this, you'll notice the axes are gone. You need to
include explicit calls to axis() to solve this problem:
> filled.contour(a, plot.axes = { points(x, y); axis(1); axis(2) })
You can put a lot of code in the 'plot.axes' argument (using text(),
points(), lines(), etc.) and make really nice plots.
-roger
_______________________________
UCLA Department of Statistics
rpeng at stat.ucla.edu
http://www.stat.ucla.edu/~rpeng
On Tue, 26 Nov 2002, Chong Gu wrote:
>
> I was trying to add points to filled.contour plots, but the
> points(...) function apparently uses a different coordinate system
> than the filled.contour(...) function; it appears that points(...)
> paints points where they would be if the contours were stretched over
> the whole plotting frame including the legend bar. Am I missing
> something or is it a "misalignment" in the code?
>
> BTW, I have no problem adding points to regular contour plots.
>
> Chong Gu
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._