class_docstr: Calibration curve (also known as reliability diagram) visualization.
  
  It is recommended to use
  :func:`~sklearn.calibration.CalibrationDisplay.from_estimator` or
  :func:`~sklearn.calibration.CalibrationDisplay.from_predictions`
  to create a `CalibrationDisplay`. All parameters are stored as attributes.
  
  Read more about calibration in the :ref:`User Guide <calibration>` and
  more about the scikit-learn visualization API in :ref:`visualizations`.
  
  .. versionadded:: 1.0
  
  Parameters
  ----------
  prob_true : ndarray of shape (n_bins,)
      The proportion of samples whose class is the positive class (fraction
      of positives), in each bin.
  
  prob_pred : ndarray of shape (n_bins,)
      The mean predicted probability in each bin.
  
  y_prob : ndarray of shape (n_samples,)
      Probability estimates for the positive class, for each sample.
  
  estimator_name : str, default=None
      Name of estimator. If None, the estimator name is not shown.
  
  pos_label : int, float, bool or str, default=None
      The positive class when computing the calibration curve.
      By default, `estimators.classes_[1]` is considered as the
      positive class.
  
      .. versionadded:: 1.1
  
  Attributes
  ----------
  line_ : matplotlib Artist
      Calibration curve.
  
  ax_ : matplotlib Axes
      Axes with calibration curve.
  
  figure_ : matplotlib Figure
      Figure containing the curve.
  
  See Also
  --------
  calibration_curve : Compute true and predicted probabilities for a
      calibration curve.
  CalibrationDisplay.from_predictions : Plot calibration curve using true
      and predicted labels.
  CalibrationDisplay.from_estimator : Plot calibration curve using an
      estimator and data.
  
  Examples
  --------
  >>> from sklearn.datasets import make_classification
  >>> from sklearn.model_selection import train_test_split
  >>> from sklearn.linear_model import LogisticRegression
  >>> from sklearn.calibration import calibration_curve, CalibrationDisplay
  >>> X, y = make_classification(random_state=0)
  >>> X_train, X_test, y_train, y_test = train_test_split(
  ...     X, y, random_state=0)
  >>> clf = LogisticRegression(random_state=0)
  >>> clf.fit(X_train, y_train)
  LogisticRegression(random_state=0)
  >>> y_prob = clf.predict_proba(X_test)[:, 1]
  >>> prob_true, prob_pred = calibration_curve(y_test, y_prob, n_bins=10)
  >>> disp = CalibrationDisplay(prob_true, prob_pred, y_prob)
  >>> disp.plot()
  <...>
docstr: Plot visualization.
  
  Extra keyword arguments will be passed to
  :func:`matplotlib.pyplot.plot`.
  
  Parameters
  ----------
  ax : Matplotlib Axes, default=None
      Axes object to plot on. If `None`, a new figure and axes is
      created.
  
  name : str, default=None
      Name for labeling curve. If `None`, use `estimator_name` if
      not `None`, otherwise no labeling is shown.
  
  ref_line : bool, default=True
      If `True`, plots a reference line representing a perfectly
      calibrated classifier.
  
  **kwargs : dict
      Keyword arguments to be passed to :func:`matplotlib.pyplot.plot`.
  
  Returns
  -------
  display : :class:`~sklearn.calibration.CalibrationDisplay`
      Object that stores computed values.
docstr_tok: ["Plot","visualization",".","Extra","keyword","arguments","will","be","passed","to",":","func",":","`","matplotlib.pyplot.plot","`",".","Parameters","--","--","--","--","--","ax",":","Matplotlib","Axes",",","default=None","Axes","object","to","plot","on",".","If","`","None","`",",","a","new","figure","and","axes","is","created",".","name",":","str",",","default=None","Name","for","labeling","curve",".","If","`","None","`",",","use","`","estimator_name","`","if","not","`","None","`",",","otherwise","no","labeling","is","shown",".","ref_line",":","bool",",","default=True","If","`","True","`",",","plots","a","reference","line","representing","a","perfectly","calibrated","classifier",".","*","*","kwargs",":","dict","Keyword","arguments","to","be","passed","to",":","func",":","`","matplotlib.pyplot.plot","`",".","Returns","--","--","--","-","display",":",":","class",":","`","~sklearn.calibration.CalibrationDisplay","`","Object","that","stores","computed","values","."]
code: def plot(self, *, ax=None, name=None, ref_line=True, **kwargs):
      """Plot visualization.
  
      Extra keyword arguments will be passed to
      :func:`matplotlib.pyplot.plot`.
  
      Parameters
      ----------
      ax : Matplotlib Axes, default=None
          Axes object to plot on. If `None`, a new figure and axes is
          created.
  
      name : str, default=None
          Name for labeling curve. If `None`, use `estimator_name` if
          not `None`, otherwise no labeling is shown.
  
      ref_line : bool, default=True
          If `True`, plots a reference line representing a perfectly
          calibrated classifier.
  
      **kwargs : dict
          Keyword arguments to be passed to :func:`matplotlib.pyplot.plot`.
  
      Returns
      -------
      display : :class:`~sklearn.calibration.CalibrationDisplay`
          Object that stores computed values.
      """
      self.ax_, self.figure_, name = self._validate_plot_params(
          ax=ax, name=name
      )
  
      info_pos_label = (
          f"(Positive class: {self.pos_label})"
          if self.pos_label is not None
          else ""
      )
  
      line_kwargs = {"marker": "s", "linestyle": "-"}
      if name is not None:
          line_kwargs["label"] = name
      line_kwargs.update(**kwargs)
  
      ref_line_label = "Perfectly calibrated"
      existing_ref_line = (
          ref_line_label in self.ax_.get_legend_handles_labels()[1]
      )
      if ref_line and not existing_ref_line:
          self.ax_.plot([0, 1], [0, 1], "k:", label=ref_line_label)
      self.line_ = self.ax_.plot(
          self.prob_pred, self.prob_true, **line_kwargs
      )[0]
  
      # We always have to show the legend for at least the reference line
      self.ax_.legend(loc="lower right")
  
      xlabel = f"Mean predicted probability {info_pos_label}"
      ylabel = f"Fraction of positives {info_pos_label}"
      self.ax_.set(xlabel=xlabel, ylabel=ylabel)
  
      return self
  
imports: import warnings
  from functools import partial
  from inspect import signature
  from math import log
  from numbers import Integral, Real
  import numpy
  from scipy.optimize import fmin_bfgs
  from scipy.special import expit, xlogy
  from sklearn.utils import Bunch
  from .base import BaseEstimator, ClassifierMixin, MetaEstimatorMixin, RegressorMixin, _fit_context, clone
  from .isotonic import IsotonicRegression
  from .model_selection import check_cv, cross_val_predict
  from .preprocessing import LabelEncoder, label_binarize
  from .svm import LinearSVC
  from .utils import _safe_indexing, column_or_1d, indexable
  from .utils._param_validation import HasMethods, Hidden, Interval, StrOptions, validate_params
  from .utils._plotting import _BinaryClassifierCurveDisplayMixin
  from .utils.metadata_routing import MetadataRouter, MethodMapping, _routing_enabled, process_routing
  from .utils.multiclass import check_classification_targets
  from .utils.parallel import Parallel, delayed
  from .utils.validation import _check_fit_params, _check_pos_label_consistency, _check_sample_weight, _num_samples, check_consistent_length, check_is_fitted
label_desc: Use image node_id 2 for calling the CalibrationDisplay obj's underlying member method code with example usage: obj.plot() and returns: self