Last active
July 25, 2020 02:43
-
-
Save KerryHalupka/343009017a41d4c48be6e65a50d2f4b1 to your computer and use it in GitHub Desktop.
example imshow, default colormap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
x, y = np.mgrid[-5:5:0.05, -5:5:0.05] | |
z = (np.sqrt(x**2 + y**2) + np.sin(x**2 + y**2)) | |
fig, ax = plt.subplots(1,1) | |
im = ax.imshow(z) | |
fig.colorbar(im) | |
ax.yaxis.set_major_locator(plt.NullLocator()) # remove y axis ticks | |
ax.xaxis.set_major_locator(plt.NullLocator()) # remove x axis ticks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment