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.
When to use it
- You compare distributions and want to avoid bin choices.
- You need percentiles, e.g. "90% of requests finish under 300 ms".
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()
Upload a CSV, Excel, JSON or Parquet file. Your first plot is always free.