Kernel crashes with xarray and cartopy

Viewed 30

I am trying to plot a very basic map using xarray and cartopy, but my kernel keeps dying. I am unsure what is wrong here, and how to troubleshoot it.

import cartopy.crs as ccrs
import xarray as xr

air = xr.tutorial.open_dataset("air_temperature").air

p = air.isel(time=0).plot(
    subplot_kws=dict(projection=ccrs.Orthographic(-80, 35), facecolor="gray"),
    transform=ccrs.PlateCarree(),
)
p.axes.set_global()
p.axes.coastlines()

However, plotting without any cartopy function works well.

air.isel(time=0).plot()
Cartopy version: 0.18.0
Xarray version:  v2022.06.0
Jupyterlab version: 3.4.4
Python3 version: 3.8.10
0 Answers
Related