class_docstr: Interface for creating and using matplotlib subplots based on seaborn parameters.
  
  Parameters
  ----------
  subplot_spec : dict
      Keyword args for :meth:`matplotlib.figure.Figure.subplots`.
  facet_spec : dict
      Parameters that control subplot faceting.
  pair_spec : dict
      Parameters that control subplot pairing.
  data : PlotData
      Data used to define figure setup.
class_docstr_tok: ["Interface","for","creating","and","using","matplotlib","subplots","based","on","seaborn","parameters",".","Parameters","--","--","--","--","--","subplot_spec",":","dict","Keyword","args","for",":","meth",":","`","matplotlib.figure.Figure.subplots","`",".","facet_spec",":","dict","Parameters","that","control","subplot","faceting",".","pair_spec",":","dict","Parameters","that","control","subplot","pairing",".","data",":","PlotData","Data","used","to","define","figure","setup","."]
docstr: Parse faceting and pairing information to define figure structure.
docstr_tok: ["Parse","faceting","and","pairing","information","to","define","figure","structure","."]
code: def _determine_grid_dimensions(
      self, facet_spec: FacetSpec, pair_spec: PairSpec
  ) -> None:
      """Parse faceting and pairing information to define figure structure."""
      self.grid_dimensions: dict[str, list] = {}
      for dim, axis in zip(["col", "row"], ["x", "y"]):
          facet_vars = facet_spec.get("variables", {})
          if dim in facet_vars:
              self.grid_dimensions[dim] = facet_spec["structure"][dim]
          elif axis in pair_spec.get("structure", {}):
              self.grid_dimensions[dim] = [
                  None for _ in pair_spec.get("structure", {})[axis]
              ]
          else:
              self.grid_dimensions[dim] = [None]
  
          self.subplot_spec[f"n{dim}s"] = len(self.grid_dimensions[dim])
  
      if not pair_spec.get("cross", True):
          self.subplot_spec["nrows"] = 1
  
      self.n_subplots = (
          self.subplot_spec["ncols"] * self.subplot_spec["nrows"]
      )
  
file_path: seaborn/seaborn/_core/subplots.py
imports: from __future__ import annotations
  from collections.abc import Generator
  import numpy
  import matplotlib
  import matplotlib.pyplot
  from matplotlib.axes import Axes
  from matplotlib.figure import Figure
  from typing import TYPE_CHECKING
label_desc: Use image node_id 3 for calling the Subplots obj's underlying member method code with example usage: obj._determine_grid_dimensions(facet_spec, pair_spec) without return types