23 · multiboxplot¶
series.multiboxplot draws one box per group — for comparing distributions side by side.
Setup — inline plots and the path to the bundled Lisbon DEM.
In [1]:
Copied!
%matplotlib inline
from pathlib import Path
# Locate the bundled Lisbon DEM from the repo root (works from docs/ or the repo root).
ROOT = Path.cwd()
while not (ROOT / "examples" / "data" / "LisbonElevation.tif").exists() and ROOT != ROOT.parent:
ROOT = ROOT.parent
DEM = str(ROOT / "examples" / "data" / "LisbonElevation.tif")
import numpy as np
import matplotlib.pyplot as plt
from digitalearth.static.charts import series
rng = np.random.default_rng(0)
%matplotlib inline
from pathlib import Path
# Locate the bundled Lisbon DEM from the repo root (works from docs/ or the repo root).
ROOT = Path.cwd()
while not (ROOT / "examples" / "data" / "LisbonElevation.tif").exists() and ROOT != ROOT.parent:
ROOT = ROOT.parent
DEM = str(ROOT / "examples" / "data" / "LisbonElevation.tif")
import numpy as np
import matplotlib.pyplot as plt
from digitalearth.static.charts import series
rng = np.random.default_rng(0)
One box per group.
In [2]:
Copied!
groups = [rng.normal(m, 1, 200) for m in range(5)]
fig, ax = plt.subplots(figsize=(8, 4))
series.multiboxplot(groups, ax=ax)
ax.set_title('multiboxplot')
fig;
groups = [rng.normal(m, 1, 200) for m in range(5)]
fig, ax = plt.subplots(figsize=(8, 4))
series.multiboxplot(groups, ax=ax)
ax.set_title('multiboxplot')
fig;