{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {
    "Notes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Raises": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Yields": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Methods": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Returns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "ax",
              "annotation": "`matplotlib.axes`",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Axes on which the plot was generated. The plot can be customized by manipulating this object."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Plot a function of the distribution."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Receives": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warnings": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Attributes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "x, y",
              "annotation": "str, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "String indicating the quantities to be used as the abscissa and ordinate (horizontal and vertical coordinates), respectively. Defaults are "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "'x'"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " (the domain of the random variable) and either "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "'pdf'"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " (the probability density function) (continuous) or "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "'pdf'"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " (the probability density function) (discrete). Valid values are: 'x', 'pdf', 'pmf', 'cdf', 'ccdf', 'icdf', 'iccdf', 'logpdf', 'logpmf', 'logcdf', 'logccdf', 'ilogcdf', 'ilogccdf'."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "t",
              "annotation": "3-tuple of (str, float, float), optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Tuple indicating the limits within which the quantities are plotted. The default is "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "('cdf', 0.0005, 0.9995)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " if the domain is infinite, indicating that the central 99.9% of the distribution is to be shown; otherwise, endpoints of the support are used where they are finite. Valid values are: 'x', 'cdf', 'ccdf', 'icdf', 'iccdf', 'logcdf', 'logccdf', 'ilogcdf', 'ilogccdf'."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "ax",
              "annotation": "`matplotlib.axes`, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Axes on which to generate the plot. If not provided, use the current axes."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Extended Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Convenience function for quick visualization of the distribution underlying the random variable."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Other Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    }
  },
  "_ordered_sections": [
    "Summary",
    "Extended Summary",
    "Parameters",
    "Attributes",
    "Methods",
    "Returns",
    "Yields",
    "Receives",
    "Other Parameters",
    "Raises",
    "Warns",
    "Warnings",
    "Notes"
  ],
  "item_file": "build-install/usr/lib/python3.14/site-packages/scipy/stats/_distribution_infrastructure.py",
  "item_line": 3316,
  "item_type": "function",
  "aliases": [
    "scipy.stats._distribution_infrastructure.UnivariateDistribution.plot"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "Instantiate a distribution with the desired parameters:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "import numpy as np\nimport matplotlib.pyplot as plt\nfrom scipy import stats\nX = stats.Normal(mu=1., sigma=2.)\n",
        "execution_status": "success",
        "out": ""
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nPlot the PDF over the central 99.9% of the distribution.\nCompare against a histogram of a random sample.\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "ax = X.plot()\nsample = X.sample(10000)\n",
        "execution_status": "success",
        "out": ""
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "ax.hist(sample, density=True, bins=50, alpha=0.5)\n",
        "execution_status": "failure",
        "out": "(array([0.00068, 0.     , 0.00169, 0.0044 , 0.00271, 0.00474, 0.00677,\n       0.01015, 0.01726, 0.02504, 0.03282, 0.03959, 0.04737, 0.05313,\n       0.08358, 0.10016, 0.1137 , 0.14009, 0.13908, 0.15498, 0.18138,\n       0.18036, 0.19288, 0.21082, 0.19491, 0.19051, 0.18239, 0.16852,\n       0.15295, 0.14009, 0.11404, 0.10727, 0.09001, 0.07174, 0.05719,\n       0.04128, 0.03452, 0.02369, 0.0247 , 0.01489, 0.00947, 0.00677,\n       0.00609, 0.00271, 0.00305, 0.00102, 0.00068, 0.00034, 0.00068,\n       0.00102]), array([-6.04789, -5.75237, -5.45685, -5.16133, -4.86581, -4.57029,\n       -4.27478, -3.97926, -3.68374, -3.38822, -3.0927 , -2.79718,\n       -2.50166, -2.20614, -1.91062, -1.6151 , -1.31958, -1.02406,\n       -0.72854, -0.43302, -0.1375 ,  0.15802,  0.45354,  0.74906,\n        1.04458,  1.3401 ,  1.63562,  1.93114,  2.22666,  2.52218,\n        2.8177 ,  3.11322,  3.40874,  3.70426,  3.99978,  4.29529,\n        4.59081,  4.88633,  5.18185,  5.47737,  5.77289,  6.06841,\n        6.36393,  6.65945,  6.95497,  7.25049,  7.54601,  7.84153,\n        8.13705,  8.43257,  8.72809]), <BarContainer object of 50 artists>)\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "plt.show()\n",
        "execution_status": "success",
        "out": ""
      },
      {
        "__type": "Figure",
        "__tag": 4024,
        "value": {
          "__type": "RefInfo",
          "__tag": 4000,
          "module": "scipy",
          "version": "2.0.0.dev0+git20260907.41eeb59",
          "kind": "assets",
          "path": "fig-d1dc4642d232427c.png"
        }
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nPlot ``logpdf(x)`` as a function of ``x`` in the left tail,\nwhere the log of the CDF is between -10 and ``np.log(0.5)``.\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "X.plot('x', 'logpdf', t=('logcdf', -10, np.log(0.5)))\n",
        "execution_status": "failure",
        "out": "<Axes: title={'center': 'Normal(mu=1.0, sigma=2.0)'}, xlabel='$x$', ylabel='$logpdf$'>\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "plt.show()\n",
        "execution_status": "success",
        "out": ""
      },
      {
        "__type": "Figure",
        "__tag": 4024,
        "value": {
          "__type": "RefInfo",
          "__tag": 4000,
          "module": "scipy",
          "version": "2.0.0.dev0+git20260907.41eeb59",
          "kind": "assets",
          "path": "fig-2f96df0e3d6f2e72.png"
        }
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nPlot the PDF of the normal distribution as a function of the\nCDF for various values of the scale parameter.\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "X = stats.Normal(mu=0., sigma=[0.5, 1., 2])\n",
        "execution_status": "success",
        "out": ""
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "X.plot('cdf', 'pdf')\n",
        "execution_status": "failure",
        "out": "<Axes: title={'center': 'Normal(mu=0.0, sigma=[0.5, 1.0, 2])'}, xlabel='$cdf$', ylabel='$pdf$'>\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "plt.show()\n",
        "execution_status": "success",
        "out": ""
      },
      {
        "__type": "Figure",
        "__tag": 4024,
        "value": {
          "__type": "RefInfo",
          "__tag": 4000,
          "module": "scipy",
          "version": "2.0.0.dev0+git20260907.41eeb59",
          "kind": "assets",
          "path": "fig-999e63843c09514e.png"
        }
      }
    ],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [],
  "signature": {
    "__type": "SignatureNode",
    "__tag": 4029,
    "kind": "function",
    "parameters": [
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "self",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "x",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "x"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "y",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "t",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "KEYWORD_ONLY",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "ax",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "KEYWORD_ONLY",
        "default": "None"
      }
    ],
    "return_annotation": {
      "__type": "Empty",
      "__tag": 4031
    },
    "target_name": "plot"
  },
  "references": null,
  "qa": "scipy.stats._distribution_infrastructure:UnivariateDistribution.plot",
  "arbitrary": [],
  "local_refs": [
    "ax",
    "t",
    "x",
    "y"
  ]
}