{
  "__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": "/scipy/stats/_distribution_infrastructure.py",
  "item_line": 3312,
  "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.00129, 0.     , 0.     , 0.00097, 0.00259, 0.00485, 0.00517,\n       0.01196, 0.01454, 0.03005, 0.03005, 0.03361, 0.04782, 0.0572 ,\n       0.07594, 0.09177, 0.11439, 0.13766, 0.14541, 0.16545, 0.17547,\n       0.19356, 0.20002, 0.21004, 0.19453, 0.19162, 0.1871 , 0.14638,\n       0.13798, 0.1299 , 0.10534, 0.10179, 0.07626, 0.05396, 0.04104,\n       0.03264, 0.02973, 0.01616, 0.01034, 0.00937, 0.00646, 0.0042 ,\n       0.00194, 0.00129, 0.00097, 0.00097, 0.00032, 0.00065, 0.00032,\n       0.00032]), array([-6.2457 , -5.93623, -5.62677, -5.31731, -5.00785, -4.69839,\n       -4.38893, -4.07947, -3.77   , -3.46054, -3.15108, -2.84162,\n       -2.53216, -2.2227 , -1.91323, -1.60377, -1.29431, -0.98485,\n       -0.67539, -0.36593, -0.05646,  0.253  ,  0.56246,  0.87192,\n        1.18138,  1.49084,  1.80031,  2.10977,  2.41923,  2.72869,\n        3.03815,  3.34761,  3.65707,  3.96654,  4.276  ,  4.58546,\n        4.89492,  5.20438,  5.51384,  5.82331,  6.13277,  6.44223,\n        6.75169,  7.06115,  7.37061,  7.68008,  7.98954,  8.299  ,\n        8.60846,  8.91792,  9.22738]), <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": "1.18.0",
          "kind": "assets",
          "path": "fig-336c307151e639f5.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": "1.18.0",
          "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": "1.18.0",
          "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"
  ]
}