colorline

luminet.viz.colorline(ax, x, y, z, norm, cmap, linewidth=3, **kwargs)

Plot a line that changes color along the way.

Parameters:
  • ax (Axes) – Where to plot the line on

  • x (array-like) – x-coordinates (or angles in polar)

  • y (array-like) – y-coordinates (or radii in polar)

  • z (array-like) – color values.

  • norm (tuple) – Min and max of the colorscale.

  • cmap (str) – Name of the colormap.

  • linewidth (float) – width of the line.

  • kwargs (optional) – Additional keyword arguments to pass to matplotlib.collections.LineCollection.

Returns:

Axes – Axes with plotted line.