Heatmap with text in each cell with matplotlib’s pyplot
You need to add all the text by calling axes.text(), here is an example: import numpy as np import matplotlib.pyplot as plt title = “ROC’s AUC” xlabel= “Timeshift” ylabel=”Scales” data = np.random.rand(8,12) plt.figure(figsize=(12, 6)) plt.title(title) plt.xlabel(xlabel) plt.ylabel(ylabel) c = plt.pcolor(data, edgecolors=”k”, linewidths=4, cmap=’RdBu’, vmin=0.0, vmax=1.0) def show_values(pc, fmt=”%.2f”, **kw): from itertools import izip pc.update_scalarmappable() ax … Read more