class_docstr: Dodge overlaps and place objects side-by-side
  
  This is an enhanced version of
  [](`~plotnine.positions.position_dodge`) that can deal
  with rectangular overlaps that do not share a lower x border.
  
  Parameters
  ----------
  width :
      Dodging width, when different to the width of the
      individual elements. This is useful when you want
      to align narrow geoms with wider geoms
  preserve :
      Should dodging preserve the total width of all elements
      at a position, or the width of a single element?
  padding :
      Padding between elements at the same position.
      Elements are shrunk by this proportion to allow space
      between them.
  reverse :
      Reverse the default ordering of the groups. This is
      useful if you're rotating both the plot and legend.
class_docstr_tok: ["Dodge","overlaps","and","place","objects","side-by-side","This","is","an","enhanced","version","of","[","]","(","`","~plotnine.positions.position_dodge","`",")","that","can","deal","with","rectangular","overlaps","that","do","not","share","a","lower","x","border",".","Parameters","--","--","--","--","--","width",":","Dodging","width",",","when","different","to","the","width","of","the","individual","elements",".","This","is","useful","when","you","want","to","align","narrow","geoms","with","wider","geoms","preserve",":","Should","dodging","preserve","the","total","width","of","all","elements","at","a","position",",","or","the","width","of","a","single","element","?","padding",":","Padding","between","elements","at","the","same","position",".","Elements","are","shrunk","by","this","proportion","to","allow","space","between","them",".","reverse",":","Reverse","the","default","ordering","of","the","groups",".","This","is","useful","if","you","'re","rotating","both","the","plot","and","legend","."]
code: def compute_panel(cls, data, scales, params):
      return cls.collide2(data, params=params)
  
file_path: plotnine/plotnine/positions/position_dodge2.py
imports: from __future__ import annotations
  import typing
  from copy import copy
  import numpy
  import pandas
  from .._utils import groupby_apply, pivot_apply
  from ..exceptions import PlotnineError
  from .position_dodge import position_dodge
label_desc: Use image node_id 3 for calling the position_dodge2 obj's underlying member method code with example usage: obj.compute_panel(cls, data, scales, params) and returns: cls