{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# ecdf(x)\nCompute and plot the empirical cumulative distribution function of x.\n\nSee `~matplotlib.axes.Axes.ecdf`.\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import matplotlib.pyplot as plt\nimport numpy as np\n\nplt.style.use('_mpl-gallery')\n\n# make data\nnp.random.seed(1)\nx = 4 + np.random.normal(0, 1.5, 200)\n\n# plot:\nfig, ax = plt.subplots()\nax.ecdf(x)\nplt.show()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.2" } }, "nbformat": 4, "nbformat_minor": 0 }