You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follows #291. Adding "highlight" shading behind groups of subplots is the most obvious "subfigure" feature not reproducible with the existing proplot API.
We could implement this by adding keyword arguments to format -- ax.format(highlight=True) adds a patch behind the subplot, subplot_grid[sel1, sel2].format(highlight=True) adds a patch behind the subplots in the selection. Then we can add rc['highlight.color'], rc['highlight.edgecolor'], rc['highlight.linewidth'], and rc['highlight.alpha'] as rc settings to style the patch. Like other rc settings, these can also be passed as keywords to format -- e.g. ax.format(highlight=True, highlightcolor='red').
The extent of the background patch would be determined automatically based on the gridspec (this is the primary advantage of adding this feature rather than leaving users work with mpatches.Rectangle). When "tight layout" is active we can update the background patch based on the tight bounding box, then "padding" the background patch with one half the tight layout padding. When it's inactive we can emit a warning and simply pad halfway between the gridspec spaces/most of the way to the figure border. The padding could also be manually configurable with some other keywords.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Follows #291. Adding "highlight" shading behind groups of subplots is the most obvious "subfigure" feature not reproducible with the existing proplot API.
We could implement this by adding keyword arguments to
format
--ax.format(highlight=True)
adds a patch behind the subplot,subplot_grid[sel1, sel2].format(highlight=True)
adds a patch behind the subplots in the selection. Then we can addrc['highlight.color']
,rc['highlight.edgecolor']
,rc['highlight.linewidth']
, andrc['highlight.alpha']
as rc settings to style the patch. Like other rc settings, these can also be passed as keywords toformat
-- e.g.ax.format(highlight=True, highlightcolor='red')
.The extent of the background patch would be determined automatically based on the gridspec (this is the primary advantage of adding this feature rather than leaving users work with
mpatches.Rectangle
). When "tight layout" is active we can update the background patch based on the tight bounding box, then "padding" the background patch with one half the tight layout padding. When it's inactive we can emit a warning and simply pad halfway between the gridspec spaces/most of the way to the figure border. The padding could also be manually configurable with some other keywords.The text was updated successfully, but these errors were encountered: