-
Notifications
You must be signed in to change notification settings - Fork 118
Open
Labels
Milestone
Description
This came up in a copilot review of #425 , but the way we're propagating the transform= parameter to vspan construction (and others) is maybe a little clumsy:
Lines 498 to 505 in fa55a92
| if base is None and height is None: | |
| # If neither are provided, we'll use axes coordinates to span the figure | |
| base, height = 0, 1 | |
| transform = ax.get_xaxis_transform() | |
| elif base is not None and height is not None: | |
| # If both are provided, we'll use data coordinates | |
| transform = None |
We could instead populate a second kwargs dict with transform (when base and height are None), or leave it empty (otherwise). This way transform can be supplied by the user and not be overridden by our transform inference.
I don't expect this will matter very much in practice, but it would be slightly cleaner to allow this behavior.
Reactions are currently unavailable