How to use the probscale.probscale._minimal_norm function in probscale

To help you get started, we’ve selected a few probscale examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github matplotlib / mpl-probscale / probscale / viz.py View on Github external
- intersept
          - yhat_lo (lower confidence interval of the estimated y-vals)
          - yhat_hi (upper confidence interval of the estimated y-vals)

    """

    fitprobs = validate.fit_argument(fitprobs, "fitprobs")
    fitlogs = validate.fit_argument(fitlogs, "fitlogs")

    # maybe set xhat to default values
    if xhat is None:
        xhat = copy.copy(x)

    # maybe set dist to default value
    if dist is None:
        dist = _minimal_norm

    # maybe compute ppf of x
    if fitprobs in ['x', 'both']:
        x = dist.ppf(x / 100.)
        xhat = dist.ppf(numpy.array(xhat) / 100.)

    # maybe compute ppf of y
    if fitprobs in ['y', 'both']:
        y = dist.ppf(y / 100.)

    # maybe compute log of x
    if fitlogs in ['x', 'both']:
        x = numpy.log(x)

    # maybe compute log of y
    if fitlogs in ['y', 'both']:
github matplotlib / mpl-probscale / probscale / probscale.py View on Github external
def __init__(self, axis, **kwargs):
        self.dist = kwargs.pop('dist', _minimal_norm)
        self.as_pct = kwargs.pop('as_pct', True)
        self.nonpos = kwargs.pop('nonpos', 'mask')
        self._transform = ProbTransform(self.dist, as_pct=self.as_pct)
github matplotlib / mpl-probscale / probscale / viz.py View on Github external
Quantile plot with the quantiles on the x-axis

    .. 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 --!