plot

Plotting functions.

multidms.plot.color_gradient_hex(start, end, n)

Get a list of colors linearly spanning a range.

Parameters:
  • start (str) – Starting color.

  • end (str) – Ending color.

  • n (int) – Number of colors in list.

Returns:

List of hex codes for colors spanning start to end.

Return type:

list

Example

>>> import multidms.plot as mplt
>>> mplt.color_gradient_hex('white', 'red', n=5)
['#ffffff', '#ffbfbf', '#ff8080', '#ff4040', '#ff0000']