Allow Plot.label to control title(s) #2934
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Following on #2919 to support titles. It expands the API in a few ways:
title=
parameter allows setting directly a title for a single-axes plottitle=
parameter also can be passed a function that operates on the auto-titles in a faceting contextcol=
orrow=
parameters accept a string that adds a prefix to facet titles:Note two relevant changes from the way titles work in
FacetGrid
:{col} | {row}
, corresponding to the change in the order of positional arguments (column faceting is more useful than row faceting so it should be prioritized)I would like to add, and probably default to "margin titles" for the row variable, but that isn't implemented yet.
The combination of the faceting variables is not currently customizable with a template akin to what
FacetGrid.set_titles
accepts, but you can customize a single dimension:I see some potential for
title
vscol
/row
to be a little confusing so may revisit this during the experimental phase."Suptitles" and captions are likely in scope for this method too, but I don't want to commit to them yet because the interaction with matplotlib autolayouts is trickier.