diff --git a/seaborn/_core/plot.py b/seaborn/_core/plot.py index c4d3cea6e9..8e8c855c19 100644 --- a/seaborn/_core/plot.py +++ b/seaborn/_core/plot.py @@ -459,7 +459,7 @@ def _setup_figure(self, pyplot: bool = False) -> None: ) # --- Figure initialization - figure_kws = {"figsize": getattr(self, "_figsize", None)} # TODO + figure_kws = {"figsize": getattr(self, "_figsize", None)} # TODO fix this hack self._figure = subplots.init_figure(pyplot, figure_kws) # --- Assignment of scales @@ -491,8 +491,8 @@ def _setup_figure(self, pyplot: bool = False) -> None: ax.set(**{ # TODO Should we make it possible to use only one x/y label for # all rows/columns in a faceted plot? Maybe using sub{axis}label, - # although the alignments of the labels from taht method leaves - # something to be desired. + # although the alignments of the labels from that method leaves + # something to be desired (in terms of how it defines 'centered'). f"{axis}label": setup_data.names.get(axis_key) }) @@ -794,7 +794,11 @@ def generate_splits() -> Generator: def _repr_png_(self) -> bytes: - # TODO better to do this through a Jupyter hook? + # TODO better to do this through a Jupyter hook? e.g. + # ipy = IPython.core.formatters.get_ipython() + # fmt = ipy.display_formatter.formatters["text/html"] + # fmt.for_type(Plot, ...) + # TODO Would like to allow for svg too ... how to configure? # TODO perhaps have self.show() flip a switch to disable this, so that diff --git a/seaborn/_core/subplots.py b/seaborn/_core/subplots.py index de2508ce94..bb5aab0acc 100644 --- a/seaborn/_core/subplots.py +++ b/seaborn/_core/subplots.py @@ -162,6 +162,7 @@ def init_figure(self, pyplot: bool, figure_kws: dict | None = None) -> Figure: # Get i, j coordinates for each Axes object # Note that i, j are with respect to faceting/pairing, # not the subplot grid itself, (which only matters in the case of wrapping). + iter_axs: np.ndenumerate | zip if not self.pair_spec.get("cartesian", True): indices = np.arange(self.n_subplots) iter_axs = zip(zip(indices, indices), axs.flat)