Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/asv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
dependencies:
- python=3.11
- cartopy
- cartopy<0.26 # cartopy 0.26.0 breaks some geoviews plots; see issue #1780.
- dask
- datashader
- geoviews
Expand Down
2 changes: 1 addition & 1 deletion ci/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dependencies:
- hvplot
- holoviews
- geoviews
- cartopy
- cartopy<0.26 # cartopy 0.26.0 breaks some geoviews plots; see issue #1780.
- pandas
- geocat-datafiles
- spatialpandas
Expand Down
2 changes: 1 addition & 1 deletion ci/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
- nodefaults
dependencies:
- antimeridian
- cartopy
- cartopy<0.26 # cartopy 0.26.0 breaks some geoviews plots; see issue #1780.
- dask
- datashader
- geoviews
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,11 @@ geo = [
"spatialpandas",
]
viz = [
"cartopy",
"cartopy<0.26", # cartopy 0.26.0 breaks some geoviews plots; see issue #1780.
# (cartopy pin intentionally here but not in "geo" extras because geoviews is only in "viz".)
"datashader",
"matplotlib<3.11", # matplotlib 3.11.0 breaks some plots but <3.11 is fine; see issue #1542.
"geoviews",
"geoviews", # no version pin; newer should support any cartopy; see holoviz/geoviews#884.
"holoviews",
"hvplot",
]
Expand Down
19 changes: 14 additions & 5 deletions test/test_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,18 @@ def __init__(self, params):

def test_plot_topology_with_explicit_projection(gridpath):
"""`plot.edges` with an explicit projection exercises the central-longitude
lookup that regressed under cartopy 0.26."""
import cartopy.crs as ccrs

lookup that regressed under cartopy 0.26.
Regression test for issue #1780.
"""
uxgrid = ux.open_grid(gridpath("mpas", "QU", "oQU480.231010.nc"))
uxgrid.plot.edges(backend="matplotlib", projection=ccrs.PlateCarree())
uxgrid.plot.edges(backend="matplotlib", projection=ccrs.Robinson())
plot0 = uxgrid.plot.edges(backend="matplotlib", projection=ccrs.PlateCarree())
plot1 = uxgrid.plot.edges(backend="matplotlib", projection=ccrs.Robinson())
plot2 = uxgrid.plot.edges(backend="matplotlib", projection=ccrs.Orthographic())

# the crash associated with issue #1780 only occurs when actually trying to render,
# and only for some projections, but definitely for at least one of the above,
# so, try to render all three of them.
renderer = hv.renderer("matplotlib")
renderer.get_plot(plot0)
renderer.get_plot(plot1)
renderer.get_plot(plot2)
Loading