_get_cmap(file_name, lut=None, reverse=False)[source]

Load a LinearSegmentedColormap from segmentdata dictionary saved as numpy compressed binary data.

  • file_name (str) – Name of colormap to load, same as filename in obspy/imaging/data. The type of colormap data is determined from the extension: .npz assumes the file contains colorbar segments (segmented colormap). ‘*.npy’ assumes the file contains a simple array of RGB values with size [ncolors, 3].

  • lut (int) – Specifies the number of discrete color values in the segmented colormap. Only used for segmented colormap None to use matplotlib default value (continuous colormap).

  • reverse (bool) – Whether to return the specified colormap reverted.

Return type: