Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add default FacetGrid titles on initialization instead of after plotting #2705

Merged
merged 3 commits into from
Nov 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/releases/v0.12.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ A paper describing seaborn was published in the `Journal of Open Source Software
- Following `NEP29 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_, dropped support for Python 3.6 and bumped the minimally-supported versions of the library dependencies.

- Removed several previously-deprecated utility functions (`iqr`, `percentiles`, `pmf_hist`, and `sort_df`).

- FacetGrid subplot titles will no longer be reset when calling `FacetGrid.map()` or `FacetGrid.map_dataframe()` after `FacetGrid.set_titles()` (:pr:`2705`).
3 changes: 2 additions & 1 deletion seaborn/axisgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,9 @@ def __init__(

# --- Make the axes look good

self.set_titles()
self.tight_layout()

if despine:
self.despine()

Expand Down Expand Up @@ -806,7 +808,6 @@ def _facet_plot(self, func, ax, plot_args, plot_kwargs):
def _finalize_grid(self, axlabels):
"""Finalize the annotations and layout."""
self.set_axis_labels(*axlabels)
self.set_titles()
self.tight_layout()

def facet_axis(self, row_i, col_j, modify_state=True):
Expand Down