gruteser@colorado.edu
2003-Jul-30 23:36 UTC
[Rd] wrong axis scale when plotting on a filled.contour plot (PR#3596)
Full_Name: Marco Gruteser Version: 1.7.1 OS: Win XP Submission from: (NULL) (129.34.20.16) Let's generate a dummy filled.contour plot> x <- 1:10 > y <- 1:10 > z <- array(rep(0, times=100),dim=c(10,10)) > filled.contour(x,y,z)And try to add some points to it, e.g.> points(8,2) > points(6,2)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.
Uwe Ligges
2003-Jul-31 10:25 UTC
[Rd] wrong axis scale when plotting on a filled.contour plot (PR#3596)
gruteser@colorado.edu wrote:> Full_Name: Marco Gruteser > Version: 1.7.1 > OS: Win XP > Submission from: (NULL) (129.34.20.16) > > > Let's generate a dummy filled.contour plot > > >>x <- 1:10 >>y <- 1:10 >>z <- array(rep(0, times=100),dim=c(10,10)) >>filled.contour(x,y,z) > > > And try to add some points to it, e.g. > > >>points(8,2) >>points(6,2) > > > 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@stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-develThat'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. Uwe Ligges