class_docstr: A line mark drawn as an oriented segment for each datapoint.
  
  Examples
  --------
  .. include:: ../docstrings/objects.Dash.rst
class_docstr_tok: ["A","line","mark","drawn","as","an","oriented","segment","for","each","datapoint",".","Examples","--","--","--","--","..","include",":",":","..","\/docstrings\/objects.Dash.rst"]
code: def _setup_segments(self, data, orient):
      ori = ["x", "y"].index(orient)
      xys = data[["x", "y"]].to_numpy().astype(float)
      segments = np.stack([xys, xys], axis=1)
      segments[:, 0, ori] -= data["width"] / 2
      segments[:, 1, ori] += data["width"] / 2
      return segments
  
imports: from __future__ import annotations
  from dataclasses import dataclass
  from typing import ClassVar
  import numpy
  import matplotlib
  from seaborn._marks.base import Mark, Mappable, MappableFloat, MappableString, MappableColor, resolve_properties, resolve_color, document_properties
label_desc: Use image node_id 1 for calling the Dash obj's underlying member method code with example usage: obj._setup_segments(data, orient) and returns: segments