class_docstr: Cartesian coordinate system
  
  Parameters
  ----------
  xlim : tuple[float, float], default=None
      Limits for x axis. If None, then they are automatically computed.
  ylim : tuple[float, float], default=None
      Limits for y axis. If None, then they are automatically computed.
  expand : bool, default=True
      If `True`, expand the coordinate axes by some factor. If `False`,
      use the limits from the data.
class_docstr_tok: ["Cartesian","coordinate","system","Parameters","--","--","--","--","--","xlim",":","tuple","[","float",",","float","]",",","default=None","Limits","for","x","axis",".","If","None",",","then","they","are","automatically","computed",".","ylim",":","tuple","[","float",",","float","]",",","default=None","Limits","for","y","axis",".","If","None",",","then","they","are","automatically","computed",".","expand",":","bool",",","default=True","If","`","True","`",",","expand","the","coordinate","axes","by","some","factor",".","If","`","False","`",",","use","the","limits","from","the","data","."]
docstr: Compute the range and break information for the panel
docstr_tok: ["Compute","the","range","and","break","information","for","the","panel"]
code: def setup_panel_params(
      self, scale_x: Scale, scale_y: Scale
  ) -> panel_view:
      """
      Compute the range and break information for the panel
      """
      from mizani.transforms import identity_trans
  
      def get_scale_view(
          scale: Scale, coord_limits: TupleFloat2
      ) -> scale_view:
          expansion = scale.default_expansion(expand=self.expand)
          ranges = scale.expand_limits(
              scale.limits, expansion, coord_limits, identity_trans
          )
          sv = scale.view(limits=coord_limits, range=ranges.range)
          return sv
  
      out = panel_view(
          x=get_scale_view(scale_x, self.limits.x),
          y=get_scale_view(scale_y, self.limits.y),
      )
      return out
  
file_path: plotnine/plotnine/coords/coord_cartesian.py
imports: from __future__ import annotations
  import typing
  from types import SimpleNamespace
  from ..iapi import panel_view
  from ..positions.position import transform_position
  from .coord import coord, dist_euclidean
label_desc: Use image node_id 3 for calling the coord_cartesian obj's underlying member method code with example usage: obj.setup_panel_params(scale_x, scale_y) and returns: out, sv