def plot_pr_curve(
    precision, recall, thresholds=None, label=None, backend="plotly", **kwargs
):
    """Plots a precision-recall (PR) curve.

    Args:
        precision: an array-like of precision values
        recall: an array-like of recall values
        thresholds (None): an array-like of decision thresholds
        label (None): a label for the curve
        backend ("plotly"): the plotting backend to use. Supported values are
            ``("plotly", "matplotlib")``
        **kwargs: keyword arguments for the backend plotting method:

            -   "plotly" backend: :meth:`fiftyone.core.plots.plotly.plot_pr_curve`
            -   "matplotlib" backend: :meth:`fiftyone.core.plots.matplotlib.plot_pr_curve`

    Returns:
        one of the following

        -   a :class:`fiftyone.core.plots.plotly.PlotlyNotebookPlot`, if you
            are working in a Jupyter notebook and the plotly backend is used
        -   a plotly or matplotlib figure, otherwise
    """
    backend = _parse_backend(backend)

    if backend == "matplotlib":
        from .matplotlib import plot_pr_curve as _plot_pr_curve

        if thresholds is not None:
            logger.warning(
                "Ignoring unsupported argument `thresholds` for the "
                "'matplotlib' backend"
            )
    else:
        from .plotly import plot_pr_curve as _plot_pr_curve

        kwargs.update(dict(thresholds=thresholds))

    return _plot_pr_curve(precision, recall, label=label, **kwargs)
Plots a precision-recall (PR) curve.

    Args:
        precision: an array-like of precision values
        recall: an array-like of recall values
        thresholds (None): an array-like of decision thresholds
        label (None): a label for the curve
        backend ("plotly"): the plotting backend to use. Supported values are
            ``("plotly", "matplotlib")``
        **kwargs: keyword arguments for the backend plotting method:

            -   "plotly" backend: :meth:`fiftyone.core.plots.plotly.plot_pr_curve`
            -   "matplotlib" backend: :meth:`fiftyone.core.plots.matplotlib.plot_pr_curve`

    Returns:
        one of the following

        -   a :class:`fiftyone.core.plots.plotly.PlotlyNotebookPlot`, if you
            are working in a Jupyter notebook and the plotly backend is used
        -   a plotly or matplotlib figure, otherwise
    
fiftyone/core/plots/base.py