Skip to content

Instantly share code, notes, and snippets.

@story645
Created May 5, 2020 21:37
Show Gist options
  • Save story645/86178871e21f5245ccc57b1043ca7cd9 to your computer and use it in GitHub Desktop.
Save story645/86178871e21f5245ccc57b1043ca7cd9 to your computer and use it in GitHub Desktop.
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.ticker as mticker
fig, ax = plt.subplots()
s = ax.scatter([0, .5, 1], [1, .5, 0], c=[1,2,3],
edgecolor='k', s=1000, zorder=10)
im = ax.matshow([[1,1,1],[2,2,2],[3,3,3]], cmap='RdBu')
fig.colorbar(s)
fig.colorbar(im)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment