original_docstring: 
      Produce a colormap from a list of discrete colors without interpolation.
      
docstring: Produce a colormap from a list of discrete colors without interpolation.
docstring_tokens: Produce a colormap from a list of discrete colors without interpolation .
code: def discretemap(colormap, hexclrs):
      """
      Produce a colormap from a list of discrete colors without interpolation.
      """
      clrs = to_rgba_array(hexclrs)
      clrs = np.vstack([clrs[0], clrs, clrs[-1]])
      cdict = {}
      for ki, key in enumerate(('red','green','blue')):
          cdict[key] = [ (i/(len(clrs)-2.), clrs[i, ki], clrs[i+1, ki]) for i in range(len(clrs)-1) ]
      return LinearSegmentedColormap(colormap, cdict)
code_tokens: def discretemap ( colormap , hexclrs ) : clrs = to_rgba_array ( hexclrs ) clrs = np . vstack ( [ clrs [ 0 ] , clrs , clrs [ - 1 ] ] ) cdict = { } for ki , key in enumerate ( ( 'red' , 'green' , 'blue' ) ) : cdict [ key ] = [ ( i / ( len ( clrs ) - 2. ) , clrs [ i , ki ] , clrs [ i + 1 , ki ] ) for i in range ( len ( clrs ) - 1 ) ] return LinearSegmentedColormap ( colormap , cdict )
short_docstring: Produce a colormap from a list of discrete colors without interpolation.
short_docstring_tokens: Produce a colormap from a list of discrete colors without interpolation .
comment: """
      Produce a colormap from a list of discrete colors without interpolation.
      """