docs: def get_dict(cmap, N=256):
      '''Change from rgb to dictionary that LinearSegmentedColormap expects.
      Code from https://mycarta.wordpress.com/2014/04/25/convert-color-palettes-to-python-matplotlib-colormaps/
      and http://nbviewer.ipython.org/github/kwinkunks/notebooks/blob/master/Matteo_colourmaps.ipynb
      '''
  
      x = np.linspace(0, 1, N)  # position of sample n - ranges from 0 to 1
  
      rgb = cmap(x)
  
      # flip colormap to follow matplotlib standard
      if rgb[0, :].sum() < rgb[-1, :].sum():
          rgb = np.flipud(rgb)
  
      b3 = rgb[:, 2]  # value of blue at sample n
      b2 = rgb[:, 2]  # value of blue at sample n
  
      # Setting up columns for tuples
      g3 = rgb[:, 1]
      g2 = rgb[:, 1]
  
      r3 = rgb[:, 0]
      r2 = rgb[:, 0]
  
      # Creating tuples
      R = list(zip(x, r2, r3))
      G = list(zip(x, g2, g3))
      B = list(zip(x, b2, b3))
  
      # Creating dictionary
      k = ['red', 'green', 'blue']
      LinearL = dict(zip(k, [R, G, B]))
  
      return LinearL