Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when specifying cartopy projection settings #40

Closed
ResidentMario opened this issue Oct 4, 2016 · 4 comments
Closed

Error when specifying cartopy projection settings #40

ResidentMario opened this issue Oct 4, 2016 · 4 comments

Comments

@ResidentMario
Copy link

ResidentMario commented Oct 4, 2016

When projection settings are passed to cartopy inline with the geoviews settings shebang, multi-parameter setting specifications will fail to work correctly.

For instance, here's a minimum working example:

import holoviews as hv
import geoviews as gv
import geoviews.feature as gf
from cartopy import crs
hv.notebook_extension()
g = crs.Orthographic(central_longitude=-98, central_latitude=39)

%%opts Overlay [fig_size=250 projection=g]
gf.land * gf.ocean

Here's a minimum non-working example:

import holoviews as hv
import geoviews as gv
import geoviews.feature as gf
from cartopy import crs
hv.notebook_extension()

%%opts Overlay [fig_size=250 projection=crs.Orthographic(central_longitude=-98, central_latitude=39)]
gf.land * gf.ocean

The latter will raise a Warning that this combination of parameters has been ignored, and the resultant map will be centered on the default axis (0,0) instead of the desired one, (-98, 39).

@jbednar
Copy link
Member

jbednar commented Oct 4, 2016

Try taking out the space after "-98,". The opts magic parser is not as powerful as Python's.

@philippjfr
Copy link
Member

Yes, that's probably the answer.

Linked to holoviz/holoviews#270 and holoviz/holoviews#874

@philippjfr
Copy link
Member

We should investigate whether there is a simple fix for this. The parser can be a bit hairy to fiddle with but there may be something easy we can do.

@ResidentMario ResidentMario changed the title Error when specifying cartopy projection settings Error when specifying cartopy projection settings Oct 4, 2016
@philippjfr
Copy link
Member

Closing since this is a known issue in holoviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants