The probscale API

probscale API Reference

class probscale.probscale.ProbScale(axis, **kwargs)[source]

Bases: matplotlib.scale.ScaleBase

A probability scale for matplotlib Axes.


axis : a matplotlib axis artist

The axis whose scale will be set.

dist : scipy.stats probability distribution, optional

The distribution whose ppf/cdf methods should be used to compute the tick positions. By default, a minimal implimentation of the scipy.stats.norm class is used so that scipy is not a requirement.


The most basic use:

>>> from matplotlib import pyplot
>>> import probscale
>>> fig, ax = pyplot.subplots(figsize=(4, 7))
>>> ax.set_ylim(bottom=0.5, top=99.5)
>>> ax.set_yscale('prob')
name = 'prob'

Set the locators and formatters to specialized versions for log scaling.


Return a Transform instance appropriate for the given logarithm base.

limit_range_for_scale(vmin, vmax, minpos)[source]

Limit the domain to positive values.