I think it's the aspect ratio, which the Spatial plot method controls more
heavily than plot.default.

Does plot(S, xlim=c(3, 5), axes=TRUE, asp = 0) give what you were after?


On Fri, Mar 22, 2013 at 10:05 AM, Sebastian P. Luque <[email protected]>wrote:

> Hi,
>
> It seems as if xlim is interpreted strangely with SpatialPoints:
>
> example("SpatialPoints-class", ask=FALSE)
> plot(S, xlim=c(0, 5), axes=TRUE)
> plot(S, xlim=c(0, 6), axes=TRUE)
> plot(S, xlim=c(0, 7), axes=TRUE)
> plot(S, xlim=c(3, 5), axes=TRUE)
> # But ylim makes sense:
> plot(S, ylim=c(0, 5), axes=TRUE)
> plot(S, ylim=c(0, 3), axes=TRUE)
> plot(S, ylim=c(1, 4), axes=TRUE)
>
> R> sessionInfo()
> R version 2.15.3 (2013-03-01)
> Platform: x86_64-pc-linux-gnu (64-bit)
>
> locale:
>  [1] LC_CTYPE=en_CA.UTF-8       LC_NUMERIC=C
> LC_TIME=en_CA.UTF-8        LC_COLLATE=en_CA.UTF-8
> LC_MONETARY=en_CA.UTF-8    LC_MESSAGES=en_CA.UTF-8
>  [7] LC_PAPER=C                 LC_NAME=C                  LC_ADDRESS=C
>             LC_TELEPHONE=C             LC_MEASUREMENT=en_CA.UTF-8
> LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] sp_1.0-6            slmisc_1.0          latticeExtra_0.6-24
> RColorBrewer_1.0-5  lattice_0.20-14
>
> loaded via a namespace (and not attached):
> [1] compiler_2.15.3 grid_2.15.3     tools_2.15.3
>
>
> What is going on?
>
> Cheers,
>
> --
> Seb
>
> _______________________________________________
> R-sig-Geo mailing list
> [email protected]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



-- 
Michael Sumner
Hobart, Australia
e-mail: [email protected]

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to