Setting extents on Feature

Hi,

I found this https://github.com/holoviz/geoviews/issues/141 talking about extents.
It seems in this issue that this code should work :

import geoviews.feature as gf
extents = (144.0, -45.0, 149.0, -40.0)
gf.coastline.clone(extents=extents)

When plotted this gives me ridiculous extents (really small like 2.500e-4). If I zoom out the plot is practically fine (it is upside down).

Versions :
geoviews 1.8.1
bokeh 2.0.1
holoviews 1.13.2

Thanks

Ok, sorry for the noise, I was using

opts.defaults(opts.Feature(apply_ranges=False))

So i had to remove it.
I hope the topic will still be useful for others

However it seems that setting extents on several features doesn’t work

panelMap = gf.coastline.clone(extents=extents) * gf.ocean.clone(extents=extents)

I would avoid using extents and use xlim/ylim options instead. Eventually I would like to deprecate extents.

1 Like

Thanks, setting xlim and ylim worked