Created
February 14, 2017 12:23
-
-
Save naxty/62a8ec1d014e0b53ae783416921fc818 to your computer and use it in GitHub Desktop.
Multiple plots inside one graph
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 matplotlib.pyplot as plt | |
f, (ax1, ax2) = plt.subplots(ncols=1, nrows=2, figsize=(24, 9)) | |
f.tight_layout() | |
ax1.imshow(gradx, cmap='gray') | |
ax1.set_title('Gradx', fontsize=50) | |
ax2.imshow(grady, cmap='gray') | |
ax2.set_title('Grady', fontsize=50) | |
plt.subplots_adjust(left=0., right=1, top=0.9, bottom=0.) | |
f.savefig('grads.png') # save the figure to file | |
plt.close(f) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment