arctichoke.plot.diverging_cmap ============================== .. py:module:: arctichoke.plot.diverging_cmap Functions --------- .. autoapisummary:: arctichoke.plot.diverging_cmap.make_diverging_cmap Module Contents --------------- .. py:function:: make_diverging_cmap(cmin: (int, float), cmax: (int, float), cmid: (int, float) = 0, ncolors: int = 256, verbose: bool = False, **kwargs) Create a diverging colormap where the selected middle value is always white. Make a custom diverging blue-white-red colormap with the given maximum and mininmum values, adjusted such that the selected middle value is white and the shorter end is cut off in color if the two ranges on either side of the middle value are uneven to preserve visual value perception. :param cmin: The minimum value for the colormap. :type cmin: `int`, `float` :param cmax: The maximum value for the colormap. :type cmax: `int`, `float` :param cmid: The middle value at which the colormap should be white. Default is `0`. :type cmid: `int`, `float`, optional :param ncolors: The number of colors to use in the colormap. Default is `256`. :type ncolors: `int`, optional :param verbose: Whether to verbosely output information as the function executes. Default is `False`. :type verbose: `bool`, optional :param \*\*kwargs: Keyword arguments to pass to `bokeh.palettes.diverging_palette()`. :returns: **diverging_cmap** -- The colors of the diverging colormap with a length of `ncolors`. :rtype: `tuple` .. rubric:: Examples >>> from arctichoke.plot.diverging_cmap import make_diverging_cmap