class_docstr: Base class for all facets
  
  Parameters
  ----------
  scales :
      Whether `x` or `y` scales should be allowed (free)
      to vary according to the data on each of the panel.
  shrink :
      Whether to shrink the scales to the output of the
      statistics instead of the raw data. Default is `True`.
  labeller :
      How to label the facets. A string value if it should be
      one of `["label_value", "label_both", "label_context"]`{.py}.
  as_table :
      If `True`, the facets are laid out like a table with
      the highest values at the bottom-right. If `False`
      the facets are laid out like a plot with the highest
      value a the top-right
  drop :
      If `True`, all factor levels not used in the data
      will automatically be dropped. If `False`, all
      factor levels will be shown, regardless of whether
      or not they appear in the data.
  dir :
      Direction in which to layout the panels. `h` for
      horizontal and `v` for vertical.
class_docstr_tok: ["Base","class","for","all","facets","Parameters","--","--","--","--","--","scales",":","Whether","`","x","`","or","`","y","`","scales","should","be","allowed","(","free",")","to","vary","according","to","the","data","on","each","of","the","panel",".","shrink",":","Whether","to","shrink","the","scales","to","the","output","of","the","statistics","instead","of","the","raw","data",".","Default","is","`","True","`",".","labeller",":","How","to","label","the","facets",".","A","string","value","if","it","should","be","one","of","`","[","``","label_value","''",",","``","label_both","''",",","``","label_context","''","]","`","{",".py","}",".","as_table",":","If","`","True","`",",","the","facets","are","laid","out","like","a","table","with","the","highest","values","at","the","bottom-right",".","If","`","False","`","the","facets","are","laid","out","like","a","plot","with","the","highest","value","a","the","top-right","drop",":","If","`","True","`",",","all","factor","levels","not","used","in","the","data","will","automatically","be","dropped",".","If","`","False","`",",","all","factor","levels","will","be","shown",",","regardless","of","whether","or","not","they","appear","in","the","data",".","dir",":","Direction","in","which","to","layout","the","panels",".","`","h","`","for","horizontal","and","`","v","`","for","vertical","."]
docstr: Add limits, breaks and labels to the axes
  
  Parameters
  ----------
  panel_params :
      range information for the axes
  ax :
      Axes
docstr_tok: ["Add","limits",",","breaks","and","labels","to","the","axes","Parameters","--","--","--","--","--","panel_params",":","range","information","for","the","axes","ax",":","Axes"]
code: def set_limits_breaks_and_labels(
      self, panel_params: panel_view, ax: Axes
  ):
      """
      Add limits, breaks and labels to the axes
  
      Parameters
      ----------
      panel_params :
          range information for the axes
      ax :
          Axes
      """
      from .._mpl.ticker import MyFixedFormatter
  
      def _inf_to_none(
          t: tuple[float, float],
      ) -> tuple[float | None, float | None]:
          """
          Replace infinities with None
          """
          a = t[0] if np.isfinite(t[0]) else None
          b = t[1] if np.isfinite(t[1]) else None
          return (a, b)
  
      # limits
      ax.set_xlim(*_inf_to_none(panel_params.x.range))
      ax.set_ylim(*_inf_to_none(panel_params.y.range))
  
      if typing.TYPE_CHECKING:
          assert callable(ax.set_xticks)
          assert callable(ax.set_yticks)
  
      # breaks, labels
      ax.set_xticks(panel_params.x.breaks, panel_params.x.labels)
      ax.set_yticks(panel_params.y.breaks, panel_params.y.labels)
  
      # minor breaks
      ax.set_xticks(panel_params.x.minor_breaks, minor=True)
      ax.set_yticks(panel_params.y.minor_breaks, minor=True)
  
      # When you manually set the tick labels MPL changes the locator
      # so that it no longer reports the x & y positions
      # Fixes https://github.com/has2k1/plotnine/issues/187
      ax.xaxis.set_major_formatter(
          MyFixedFormatter(panel_params.x.labels)
      )
      ax.yaxis.set_major_formatter(
          MyFixedFormatter(panel_params.y.labels)
      )
  
      _property = self.theme.themeables.property
      margin = _property("axis_text_x", "margin")
      pad_x = margin.get_as("t", "pt")
  
      margin = _property("axis_text_y", "margin")
      pad_y = margin.get_as("r", "pt")
  
      ax.tick_params(axis="x", which="major", pad=pad_x)
      ax.tick_params(axis="y", which="major", pad=pad_y)
  
imports: from __future__ import annotations
  import itertools
  import types
  import typing
  from copy import copy, deepcopy
  import numpy
  import pandas
  import pandas.api.types
  from .._utils import cross_join, match
  from ..exceptions import PlotnineError
  from ..scales.scales import Scales
  from .strips import Strips
label_desc: Use image node_id 12 for calling the facet obj's underlying member method code with example usage: obj.set_limits_breaks_and_labels(panel_params, ax) and returns: a,  b