Skip to content

Commit

Permalink
Remove central_longitude for Robinson projection plots
Browse files Browse the repository at this point in the history
  • Loading branch information
schlunma committed Oct 22, 2024
1 parent c4b8d02 commit a608767
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
13 changes: 3 additions & 10 deletions esmvaltool/diag_scripts/monitor/multi_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,7 @@
:mod:`cartopy.crs`. Keyword arguments can be specified using the option
``projection_kwargs``.
projection_kwargs: dict, optional
Optional keyword arguments for the projection given by ``projection``. For
the default projection ``Robinson``, the default keyword arguments
``central_longitude: 10`` are used.
Optional keyword arguments for the projection given by ``projection``.
pyplot_kwargs: dict, optional
Optional calls to functions of :mod:`matplotlib.pyplot`. Dictionary keys
are functions of :mod:`matplotlib.pyplot`. Dictionary values are used as
Expand Down Expand Up @@ -739,13 +737,8 @@ def __init__(self, config):
self.plots[plot_type]['plot_kwargs_bias'].setdefault(
'norm', 'centered'
)
if 'projection' not in self.plots[plot_type]:
self.plots[plot_type].setdefault('projection', 'Robinson')
self.plots[plot_type].setdefault(
'projection_kwargs', {'central_longitude': 10}
)
else:
self.plots[plot_type].setdefault('projection_kwargs', {})
self.plots[plot_type].setdefault('projection', 'Robinson')
self.plots[plot_type].setdefault('projection_kwargs', {})
self.plots[plot_type].setdefault('pyplot_kwargs', {})
self.plots[plot_type].setdefault('rasterize', True)
self.plots[plot_type].setdefault('show_stats', True)
Expand Down
4 changes: 2 additions & 2 deletions esmvaltool/diag_scripts/shared/plot/_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def global_contourf(cube,
if cbar_range is not None:
levels = np.linspace(*cbar_range)
kwargs['levels'] = levels
axes = plt.axes(projection=ccrs.Robinson(central_longitude=10))
axes = plt.axes(projection=ccrs.Robinson())
plt.sca(axes)
map_plot = iris.plot.contourf(cube, **kwargs)

Expand Down Expand Up @@ -309,7 +309,7 @@ def global_pcolormesh(cube,
kwargs['cmap'] = cmap

# Create plot
axes = plt.axes(projection=ccrs.Robinson(central_longitude=10))
axes = plt.axes(projection=ccrs.Robinson())
plt.sca(axes)
map_plot = iris.plot.pcolormesh(cube, **kwargs)

Expand Down

0 comments on commit a608767

Please sign in to comment.