class_docstr: Base class for axis helper.
  
  Subclasses should define the methods listed below.  The *axes*
  argument will be the ``.axes`` attribute of the caller artist. ::
  
      # Construct the spine.
  
      def get_line_transform(self, axes):
          return transform
  
      def get_line(self, axes):
          return path
  
      # Construct the label.
  
      def get_axislabel_transform(self, axes):
          return transform
  
      def get_axislabel_pos_angle(self, axes):
          return (x, y), angle
  
      # Construct the ticks.
  
      def get_tick_transform(self, axes):
          return transform
  
      def get_tick_iterators(self, axes):
          # A pair of iterables (one for major ticks, one for minor ticks)
          # that yield (tick_position, tick_angle, tick_label).
          return iter_major, iter_minor
class_docstr_tok: ["Base","class","for","axis","helper",".","Subclasses","should","define","the","methods","listed","below",".","The","*","axes","*","argument","will","be","the","``",".axes","``","attribute","of","the","caller","artist",".",":",":","#","Construct","the","spine",".","def","get_line_transform","(","self",",","axes",")",":","return","transform","def","get_line","(","self",",","axes",")",":","return","path","#","Construct","the","label",".","def","get_axislabel_transform","(","self",",","axes",")",":","return","transform","def","get_axislabel_pos_angle","(","self",",","axes",")",":","return","(","x",",","y",")",",","angle","#","Construct","the","ticks",".","def","get_tick_transform","(","self",",","axes",")",":","return","transform","def","get_tick_iterators","(","self",",","axes",")",":","#","A","pair","of","iterables","(","one","for","major","ticks",",","one","for","minor","ticks",")","#","that","yield","(","tick_position",",","tick_angle",",","tick_label",")",".","return","iter_major",",","iter_minor"]
docstr: Create a (*values.shape, 2)-shape array representing (x, y) pairs.
  
  The other coordinate is filled with the constant *const*.
  
  Example::
  
      >>> self.nth_coord = 0
      >>> self._to_xy([1, 2, 3], const=0)
      array([[1, 0],
             [2, 0],
             [3, 0]])
docstr_tok: ["Create","a","(","*","values.shape",",","2",")","-shape","array","representing","(","x",",","y",")","pairs",".","The","other","coordinate","is","filled","with","the","constant","*","const","*",".","Example",":",":",">",">",">","self.nth_coord","=","0",">",">",">","self._to_xy","(","[","1",",","2",",","3","]",",","const=0",")","array","(","[","[","1",",","0","]",",","[","2",",","0","]",",","[","3",",","0","]","]",")"]
code: def _to_xy(self, values, const):
      """
      Create a (*values.shape, 2)-shape array representing (x, y) pairs.
  
      The other coordinate is filled with the constant *const*.
  
      Example::
  
          >>> self.nth_coord = 0
          >>> self._to_xy([1, 2, 3], const=0)
          array([[1, 0],
                 [2, 0],
                 [3, 0]])
      """
      if self.nth_coord == 0:
          return np.stack(np.broadcast_arrays(values, const), axis=-1)
      elif self.nth_coord == 1:
          return np.stack(np.broadcast_arrays(const, values), axis=-1)
      else:
          raise ValueError("Unexpected nth_coord")
  
imports: import numpy
  import matplotlib
  from matplotlib import _api
  import matplotlib.axes
  from matplotlib.path import Path
  from mpl_toolkits.axes_grid1 import mpl_axes
  from .axisline_style import AxislineStyle
  from .axis_artist import AxisArtist, GridlinesCollection
label_desc: Use image node_id 4 for calling the _AxisArtistHelperBase obj's underlying member method code with example usage: obj._to_xy(values, const) and returns: np, np