Feature request: combine.extent and extent as argument to plot.Spatial
davidorme opened this issue · comments
If I'm creating a plot overlaying multiple Spatial objects, it is fiddly to ensure that all of them fall within the plot region (or I've missed something blindingly obvious).
One way this could be handled smoothly is to have a function combine.extents(sp, ...)
that generates an Extent
object that encloses all the Spatial objects passed in. If the Spatial plot method then had an extent
argument, that could be used to populate xlim
and ylim
from a combined extent. The extent
argument seems a useful way to use sp
objects to setup a plot anyway?
I've got a draft of combine.extents
and changing the plot method isn't hard - is this something you'd like a PR on?
Huh. I'm mixing my packages: extent is raster
... The same approach could work for combine.bbox
!