Pyteomics documentation v2.1.5

pylab_aux - auxiliary functions for plotting with pylab

Contents   ::   Combined examples  »

pylab_aux - auxiliary functions for plotting with pylab

This module serves as a collection of useful routines for data plotting with matplotlib.

Data plotting

plot_line() - plot a line.

scatter_trend() - plot a scatter plot with a regression line.

plot_function_3d() - plot a 3D graph of a function of two variables.

plot_function_contour() - plot a contour graph of a function of two variables.

See also


pyteomics.pylab_aux.plot_function_3d(x, y, function, **kwargs)[source]

Plot values of a function of two variables in 3D.

More on 3D plotting in pylab:

http://www.scipy.org/Cookbook/Matplotlib/mplot3D

Parameters :

x, y : array_like of float

The plotting range.

function : function

The function to plot.

plot_type : {‘surface’, ‘wireframe’, ‘scatter’, ‘contour’, ‘contourf’}

The type of a plot, see scipy cookbook for examples. The default value is ‘surface’.

num_contours : int

The number of contours to plot, 50 by default.

xlabel, ylabel, zlabel : str, optional

The axes labels. Empty by default.

title : str, optional

The title. Empty by default.

pyteomics.pylab_aux.plot_function_contour(x, y, function, **kwargs)[source]

Make a contour plot of a function of two variables.

Parameters :

x, y : array_like of float

The positions of the nodes of a plotting grid.

function : function

The function to plot.

filling : bool

Fill contours if True (default).

num_contours : int

The number of contours to plot, 50 by default.

xlabel, ylabel : str, optional

The axes labels. Empty by default.

title : str, optional

The title. Empty by default.

pyteomics.pylab_aux.plot_line(a, b, **kwargs)[source]

Plot a line y = a * x + b.

Parameters :

a, b : float

The slope and intercept of the line.

pyteomics.pylab_aux.scatter_trend(x, y, **kwargs)[source]

Make a scatter plot with a linear regression.

Parameters :

x, y : array_like of float

plot_trend : bool, optional

If True then plot a trendline. True by default.

plot_sigmas : bool, optional

If True then plot confidence intervals of the linear fit. False by default.

title : str, optional

The title. Empty by default.

xlabel, ylabel : str, optional

The axes labels. Empty by default.

alpha : float, optional

Transparency of points. 1.0 by default

alpha_legend : float, optional

Legend box transparency. 1.0 by default

Contents   ::   Combined examples  »