Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.. plot::
:context: close-figs
>>> fig = probplot(data, plottype='qq', probax='x',
... problabel='Theoretical Quantiles',
... datalabel='Observed values', bestfit=True,
... line_kws=dict(linestyle='-', linewidth=2),
... scatter_kws=dict(marker='s', alpha=0.5))
"""
if dist is None:
dist = _minimal_norm
# check input values
fig, ax = validate.axes_object(ax)
probax = validate.axis_name(probax, 'probability axis')
problabel = validate.axis_label(problabel)
datalabel = validate.axis_label(datalabel)
# default values for symbology options
scatter_kws = validate.other_options(scatter_kws)
line_kws = validate.other_options(line_kws)
pp_kws = validate.other_options(pp_kws)
# check plottype
plottype = validate.axis_type(plottype)
# !-- kwarg that only seaborn should use --!
_color = fgkwargs.get('color', None)
if _color is not None:
scatter_kws['color'] = _color
----------
ax : matplotlib Axes
The Axes object that will be modified.
N : int
Maximum number of points for the series plotted on the Axes.
which : string
The axis whose ticklabels will be rotated. Valid values are 'x',
'y', or 'both'.
Returns
-------
None
"""
fig, ax = validate.axes_object(ax)
which = validate.axis_name(probax, 'probability axis')
if N <= 5:
minval = 10
elif N <= 10:
minval = 5
else:
minval = 10 ** (-1 * numpy.ceil(numpy.log10(N) - 2))
if which in ['x', 'both']:
ax.set_xlim(left=minval, right=100 - minval)
elif which in ['y', 'both']:
ax.set_ylim(bottom=minval, top=100 - minval)