Skip to main content

A simple library for plotting lines with color gradients

Project description

rainbowline

A simple library for plotting lines with color gradients in matplotlib.

Example plot

Usage

The function rainbow_line() has the following arguments:

  • x: the x values to plot
  • y: the y values to plot
  • c: the values to map to a color using the specified cmap. If not provided, the index of x or y will be used if possible.
  • cmap: (optional) colormap to apply to the c values. Defaults to 'jet'.
  • norm: (optional) normalization for c values. If not given, the min and max values of c will be used. One of the following:
    • matplotlib norm object.
    • float or int: in this case, values will be normalized to the range (0, norm)
    • tuple defining the min and max values to which to normalize
  • ax: (optional) matplotlib Axes object on which to plot
  • autoscale_view: whether to scale the axes to the extents of the plot. Default True.
  • **kwargs: (optional) kwargs which will be passed to matplotlib LineCollection constructor.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rainbowline-0.0.1.tar.gz (57.8 kB view hashes)

Uploaded Source

Built Distribution

rainbowline-0.0.1-py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page