-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Description
Bug summary
By creating GeoAxes with pyplot.axes() and using .set_extent() or plt.show() i run into a segmentation error.
Code for reproduction
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
print(f'backend used: {plt.get_backend()}')
ax = plt.axes(projection=projection=ccrs.NorthPolarStereo(central_longitude=10.0))
ax.set_extent([6.2, 14.6, 47.1, 55])
# following code also crashes with a segmentation fault:
fig, ax = plt.subplots(subplot_kw=dict(projection=ccrs.NorthPolarStereo(central_longitude=10.0)))
ax.coastlines()
plt.show()
Actual outcome
backend used: TkAgg
Segmentation fault (core dumped)
Expected outcome
no segmentation fault.
Additional information
Im using additionally
cartopy: 0.21.1
shapely: 2.1.1
it makes no difference if i use 'tkagg' or 'agg' as backend. I also testes shapely 1.8 and matplotlib 3.10.5 but noticed no changes in that behavior.
On another system (Ubuntu server minimized) with no GUI these scripts work as expected.
Operating system
Ubuntu 5.15.0-151-generic #161-Ubuntu
Matplotlib Version
3.7.1
Matplotlib Backend
tkagg
Python version
3.10.12
Jupyter version
No response
Installation
pip
Metadata
Metadata
Assignees
Labels
No labels