-
Notifications
You must be signed in to change notification settings - Fork 445
Open
Labels
Area: PlotsPertains to producing plotsPertains to producing plotsType: EnhancementEnhancement to existing functionalityEnhancement to existing functionality
Description
What should we add?
The following code is a great way to eat through all of your system's memory and then some as Matplotlib attempts to draw trillions of triangles:
import xarray as xr
from metpy.cbook import get_test_data
from metpy.plots import BarbPlot, MapPanel, PanelContainer
data = xr.open_dataset(get_test_data('narr_example.nc')).squeeze()
bp = BarbPlot()
bp.data = data
bp.field = ['u_wind', 'v_wind']
bp.level = 500
bp.scale = 1e14
mp = MapPanel()
mp.layout = (1, 1, 1)
mp.layers = ['coastline', 'borders', 'states']
mp.plots = [bp]
pc = PanelContainer()
pc.size = (10, 8)
pc.panels = [mp]
pc.show()(This report is inspired by true events.)
My feature request is that the declarative interface raise an error when the magnitudes are so high that the number of pennants drawn would exceed some reasonable threshold, rather than attempt to create the plot and hang the computer.
Reference
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area: PlotsPertains to producing plotsPertains to producing plotsType: EnhancementEnhancement to existing functionalityEnhancement to existing functionality