(curve, pen=None, shadow_pen=None, symbol="+",
               symbol_size=3, name=None)
return PlotCurve(curve, item, hull_item)
Construct a `PlotCurve` for the given `ROCCurve`.

    :param ROCCurve curve:
        Source curve.

    The other parameters are passed to pg.PlotDataItem

    :rtype: PlotCurve
Construct a `PlotCurve` for the given `ROCCurve`.
Construct a PlotCurve for the given ROCCurve .
def plot_curve(curve, pen=None, shadow_pen=None, symbol="+",
               symbol_size=3, name=None):
    """
    Construct a `PlotCurve` for the given `ROCCurve`.

    :param ROCCurve curve:
        Source curve.

    The other parameters are passed to pg.PlotDataItem

    :rtype: PlotCurve
    """
    def extend_to_origin(points):
        "Extend ROCPoints to include coordinate origin if not already present"
        if points.tpr.size and (points.tpr[0] > 0 or points.fpr[0] > 0):
            points = ROCPoints(
                np.r_[0, points.fpr], np.r_[0, points.tpr],
                np.r_[points.thresholds[0] + 1, points.thresholds]
            )
        return points

    points = extend_to_origin(curve.points)
    item = pg.PlotCurveItem(
        points.fpr, points.tpr, pen=pen, shadowPen=shadow_pen,
        name=name, antialias=True
    )
    sp = pg.ScatterPlotItem(
        curve.points.fpr, curve.points.tpr, symbol=symbol,
        size=symbol_size, pen=shadow_pen,
        name=name
    )
    sp.setParentItem(item)

    hull = extend_to_origin(curve.hull)

    hull_item = pg.PlotDataItem(
        hull.fpr, hull.tpr, pen=pen, antialias=True
    )
    return PlotCurve(curve, item, hull_item)
def plot_curve ( curve , pen = None , shadow_pen = None , symbol = "+" , symbol_size = 3 , name = None ) : def extend_to_origin ( points ) : "Extend ROCPoints to include coordinate origin if not already present" if points . tpr . size and ( points . tpr [ 0 ] > 0 or points . fpr [ 0 ] > 0 ) : points = ROCPoints ( np . r_ [ 0 , points . fpr ] , np . r_ [ 0 , points . tpr ] , np . r_ [ points . thresholds [ 0 ] + 1 , points . thresholds ] ) return points points = extend_to_origin ( curve . points ) item = pg . PlotCurveItem ( points . fpr , points . tpr , pen = pen , shadowPen = shadow_pen , name = name , antialias = True ) sp = pg . ScatterPlotItem ( curve . points . fpr , curve . points . tpr , symbol = symbol , size = symbol_size , pen = shadow_pen , name = name ) sp . setParentItem ( item ) hull = extend_to_origin ( curve . hull ) hull_item = pg . PlotDataItem ( hull . fpr , hull . tpr , pen = pen , antialias = True ) return PlotCurve ( curve , item , hull_item )