Re: Plot lines on contour
- From: David Winsemius <doe_snot@xxxxxxxxxxx>
- Date: Wed, 16 Aug 2006 07:36:46 -0500
David Winsemius <doe_snot@xxxxxxxxxxx> wrote in
news:Xns981ECF6F2EAF4dwtttttt@xxxxxxxxxxxxxx:
"Jie" <jetter.jz@xxxxxxxxx> wrote in
news:1155413814.365340.200490@xxxxxxxxxxxxxxxxxxxxxxxxxxx:
Sorry , that's R 2.2.1
Old Mac User wrote:
It would be nice if you told us what kind of software you are using.
Jie wrote:
Hello everyone,
I would like to make a line plot over a colour contour plot so
that I
can compare two quantities in one figure.
I simply typied the following commands:
> filled.contour(x,y,z)
> lines(x, l)
Since the filled.contour command automatically adds a colour
scale at
the right of the contour plot, the actual contour panel will be
smaller than the whole device panel. So the line which was
supposed to overlap with the contour exceeded the bounder of the
contour panel.
Does anybody know how to constrain the line in the contour
panel?
The online help for filled.contour() says this about the graphic and
its legend both of which are "plots":
Two separate coordinate systems are set up for these two plots,
but they are only used internally - once the function has
returned these coordinate systems are lost. If you want to
annotate the main contour plot, for example to add points, you
can specify graphics commands in the 'plot.axes' argument. An
example is given below.
You should look at the full output from ?contour.plot and the other
material it points to and see if they solve your problems. (In R
typing a "?" before a function name should result in a help page.) If
I am reading the example corectly, then you may get what you want by
trying:
filled.contour(x,y,z,
lines(x, l)
)
One can hope that the advice to look at the help text for the
filled.contour function was helpful, because my initial reading of it can
easily be seen as incomplete. The syntax should have been:
filled.contour(x,y,z,
plot.axes = {lines(x, l))
)
--
David Winsemius
.
- References:
- Plot lines on contour
- From: Jie
- Re: Plot lines on contour
- From: Old Mac User
- Re: Plot lines on contour
- From: Jie
- Re: Plot lines on contour
- From: David Winsemius
- Plot lines on contour
- Prev by Date: Re: Linear regression vs. vectors from principal components analysis
- Next by Date: reliability analysis
- Previous by thread: Re: Plot lines on contour
- Next by thread: Gini coefficient
- Index(es):
Relevant Pages
|