title: How to interpret the documentation on LinearSegmentedColormap
body: <p>I got this example code using LinearSegmentedColormap that I cannot understand.</p>
  <p><code>type(cmap)</code> gives <code>matplotlib.colors.LinearSegmentedColormap</code></p>
  <p><code>cmap.__dict__</code> gives</p>
  <pre><code> 'name': 'jet',
   'N': 256,
   '_rgba_bad': (0.0, 0.0, 0.0, 0.0),
   '_rgba_under': None,
   '_rgba_over': None,
   '_i_under': 256,
   '_i_over': 257,
   '_i_bad': 258,
   '_isinit': False,
   'colorbar_extend': False,
   '_segmentdata': {'red': ((0.0, 0, 0),
     (0.35, 0, 0),
     (0.66, 1, 1),
     (0.89, 1, 1),
     (1, 0.5, 0.5)),
    'green': ((0.0, 0, 0),
     (0.125, 0, 0),
     (0.375, 1, 1),
     (0.64, 1, 1),
     (0.91, 0, 0),
     (1, 0, 0)),
    'blue': ((0.0, 0.5, 0.5),
     (0.11, 1, 1),
     (0.34, 1, 1),
     (0.65, 0, 0),
     (1, 0, 0))},
   '_gamma': 1.0}
  </code></pre>
  <p>while <code>LinearSegmentedColormap.__dict__</code> gives</p>
  <pre><code>              '__doc__': '\n    Colormap objects based on lookup tables using linear segments.\n\n    The lookup table is generated using linear interpolation for each\n    primary color, with the 0-1 domain divided into any number of\n    segments.\n    ',
                '__init__': &lt;function matplotlib.colors.LinearSegmentedColormap.__init__(self, name, segmentdata, N=256, gamma=1.0)&gt;,
                '_init': &lt;function matplotlib.colors.LinearSegmentedColormap._init(self)&gt;,
                'set_gamma': &lt;function matplotlib.colors.LinearSegmentedColormap.set_gamma(self, gamma)&gt;,
                'from_list': &lt;staticmethod at 0x1bc1ae2b5c0&gt;,
                '_resample': &lt;function matplotlib.colors.LinearSegmentedColormap._resample(self, lutsize)&gt;,
                'reversed': &lt;function matplotlib.colors.LinearSegmentedColormap.reversed(self, name=None)&gt;})
  </code></pre>
  <p>Isn't <code>cmap</code> an instance of <code>LinearSegmentedColormap</code>? And in such case why does it's attributes and functions not correspond to the ones in the class <code>LinearSegmentedColormap</code>?</p>
  <p>The other question is what is happening when the line:</p>
  <pre><code>colors = cmap(np.arange(cmap.N))
  </code></pre>
  <p>is run? I suppose one of the class methods are being run but which? And is it possible form the documentation of <code>LinearSegmentedColormap</code> to figure out what is happening?</p>
  <pre><code>from matplotlib.colors import LinearSegmentedColormap  
  import matplotlib as plt  
  import numpy as np  
  
  cmap = plt.cm.get_cmap('jet')  
  type(cmap)  
  cmap.**__dict__**  
  colors = cmap(np.arange(cmap.N))  
  
  LinearSegmentedColormap.__dict__ 
  </code></pre>