Plot guides › Chart types

ECDF plot

An ECDF plots, for every value, the share of observations at or below it. It needs no bin width, shows every data point, and lets you read medians and percentiles straight off the chart.

Example ecdf plot made with matplotlib
Rendered from the code below, with example data.

When to use it

Ask for it in pltchat

Upload your file and type something like:

"ECDF of latency per server, horizontal line at the 90th percentile"

pltchat writes the loader and the plot for your columns, runs it in your browser and shows you the code.

The matplotlib code

Self-contained with example data; swap in pd.read_csv(...) or pd.read_excel(...) for your own file.

import numpy as np
import matplotlib.pyplot as plt

rng = np.random.default_rng(8)
servers = {"eu-1": rng.gamma(4, 40, 500), "us-1": rng.gamma(3, 45, 500)}

fig, ax = plt.subplots(figsize=(6.4, 4))
for name, vals in servers.items():
    ax.ecdf(vals, label=name)
ax.axhline(0.9, color="gray", ls="--", lw=1)
ax.text(5, 0.92, "90th percentile", color="gray")
ax.set_xlabel("Latency (ms)")
ax.set_ylabel("Fraction of requests ≤ x")
ax.legend(loc="lower right")
plt.tight_layout()
plt.show()

Make this with your data

Upload a CSV, Excel, JSON or Parquet file. Your first plot is always free.

Related plots