[Rd] wrong axis scale when plotting on a filled.contour plot
ligges at statistik.uni-dortmund.de
Thu Jul 31 11:26:18 MEST 2003
gruteser at colorado.edu wrote:
> Full_Name: Marco Gruteser
> Version: 1.7.1
> OS: Win XP
> Submission from: (NULL) (22.214.171.124)
> Let's generate a dummy filled.contour plot
>>x <- 1:10
>>y <- 1:10
>>z <- array(rep(0, times=100),dim=c(10,10))
> And try to add some points to it, e.g.
> The points show up misaligned with the axis
> somewhere at 9.9,2 and 7.5,2
> It appears that the "z value legend" on the right
> may have distorted the axis.
> R-devel at stat.math.ethz.ch mailing list
That's not a bug! It's documented, as well as it's solution. See
?filled.contour, Section "Note":
"The ouput produced by filled.contour is actually a combination of two
plots; one is the filled contour and one is the legend. 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."
Please check those examples as well.
More information about the R-devel