Matshow

plot 09 matshow

Live figure — pick a tool, then zoom, pan, point-pick or annotate. Nothing is active until a tool is selected.

View this figure’s Vega export ↗ — the raw JSON spec, rendered live by a real Vega engine.

View this figure’s Vega-Lite export ↗ — the raw JSON spec(s), rendered live by a real Vega-Lite engine.

import numpy as np
import plotpress

rng = np.random.default_rng(0)
M = rng.standard_normal((12, 12))
M += np.eye(12) * 3                        # a bright diagonal to read the layout

fig, ax = plotpress.subplots()
im = ax.matshow(M, cmap="RdBu")
ax.set_title("matshow"); fig.colorbar(im, ax=ax)

Total running time of the script: (0 minutes 0.086 seconds)

Gallery generated by Sphinx-Gallery