-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
Description
This actually occurs for other plot types as well.
Version: cfplot 3.4.0; python 3.12
Observed behavior:
- Orthographic contour plot crashes when cf-plot tries to render the map title
- If the title is removed, the plot renders successfully
Expected behavior:
- Orthographic contour plots should render with a title
- At minimum, _map_title should not crash if a projection-specific title anchor has not been computed
Minimal failing scenario:
- Projection: ortho
- Default GUI-style settings:
- [lat_0 = 0.0]
- [lon_0 = 0.0
- Render a contour plot with a non-empty title
Probable root cause:
_map_title() appears to compute xpt, ypt only for some projections, then unconditionally uses them in the non-dims branch.
From the installed 3.4.0 source, the title-anchor coordinates are assigned for cases such as:
- npstere
- spstere
- lcc
but later the code does:
else:
halign = "center"
plotvars.mymap.text(
xpt,
ypt,
title,
...
)For ortho, xpt/ypt do not appear to be initialized before this branch is reached.
Reactions are currently unavailable