class_docstr: Bar plot
  
  {usage}
  
  Parameters
  ----------
  {common_parameters}
  width : float, default=None
      Bar width. If `None`{.py}, the width is set to
      `90%` of the resolution of the data.
  
  See Also
  --------
  plotnine.geoms.geom_histogram
code: def setup_data(self, data: pd.DataFrame) -> pd.DataFrame:
      if "width" not in data:
          if self.params["width"]:
              data["width"] = self.params["width"]
          else:
              data["width"] = resolution(data["x"], False) * 0.9
  
      bool_idx = data["y"] < 0
  
      data["ymin"] = 0.0
      data.loc[bool_idx, "ymin"] = data.loc[bool_idx, "y"]
  
      data["ymax"] = data["y"]
      data.loc[bool_idx, "ymax"] = 0.0
  
      data["xmin"] = data["x"] - data["width"] / 2
      data["xmax"] = data["x"] + data["width"] / 2
      del data["width"]
      return data
  
imports: from __future__ import annotations
  import typing
  from .._utils import resolution
  from ..doctools import document
  from .geom_rect import geom_rect
label_desc: Use image node_id 1 for calling the geom_bar obj's underlying member method code with example usage: obj.setup_data(data) and returns: data