matplotlib

Module commands

source
Expand description

Commonly used plotting commands.

This module contains types representing many common plotting commands, implementing Matplotlib and sometimes MatplotlibOpts. Each can be instantiated using their constructor methods or using a corresponding function from this module for convenience, e.g.

let p1 = Plot::new([0.0, 1.0, 2.0], [0.0, 2.0, 4.0]);
let p2 =      plot([0.0, 1.0, 2.0], [0.0, 2.0, 4.0]);

assert_eq!(p1, p2);

Note: Several constructors take iterators of flat 3-, 4-, or 6-element tuples. This is inconvenient with respect to Iterator::zip, so this module also provides Associator and assoc to help with rearrangement.

Structs§

  • A horizontal line.
  • A line passing through two points.
  • A line passing through one point with a slope.
  • Some text placed in a plot via axes [0, 1] coordinates.
  • A vertical line.
  • A bar plot.
  • A horizontal bar plot.
  • Box(-and-whisker) plots for a number of data sets.
  • Set a label on a colorbar.
  • Set the plotting limits of the colorbar.
  • Set the values and labels for which ticks are placed on a colorbar.
  • Set the values for which ticks are placed on a colorbar.
  • Add a colorbar to the figure.
  • A contour plot for a (x, y, z) surface.
  • A filled contour plot for a (x, y, z) surface.
  • Default initialization of fig and ax plotting objects.
  • Default list of imports and library setup, not including rcParams.
  • Plot with error bars.
  • Plot with asymmetric error bars.
  • Some text placed in a figure via figure [0, 1] coordinates.
  • A filled area between two horizontal curves.
  • A filled area between two vertical curves.
  • Set the local variable ax to a different set of axes.
  • Set the local variable cbar to a different colorbar.
  • Set the local variable fig to a different figure.
  • Set the local variable im to a different colorbar.
  • Activate or modify the coordinate grid.
  • A histogram of a data set.
  • A histogram of two variables.
  • A 2D data set as an image.
  • Create and refocus to a set of axes inset to ax.
  • Set a label on a set of axes.
  • Place a legend on a set of axes.
  • Set the plotting limits of an axis.
  • A pie chart for a single data set.
  • A (x, y) plot.
  • A (x, y, z) plot.
  • Direct injection of arbitrary Python into the prelude.
  • A vector field plot.
  • A 3D vector field plot.
  • Direct injection of arbitrary Python.
  • Set the value of an RC parameter.
  • Set the scaling of an axis.
  • A (x, y) scatter plot.
  • A (x, y, z) scatter plot.
  • Set the title of the figure.
  • Set the X label of the figure.
  • Set the title of the figure.
  • A 3D surface plot.
  • Activate or deactivate TeX text.
  • Some text placed in a plot via data coordinates.
  • Set the values and labels for which ticks are placed on an axis.
  • Set the appearance of ticks, tick labels, and gridlines.
  • Set the values for which ticks are placed on an axis.
  • Adjust the padding between and around subplots.
  • Set the title of a set of axes.
  • A 3D surface plot using triangulation.
  • Set the view on a set of 3D axes.
  • Violin plots for a number of data sets.

Enums§

  • An axis of a Matplotlib Axes or Axes3D object.
  • Like Axis, but limited to X or Y and with the option of both.
  • An axis scaling.

Traits§

Functions§