Created
November 14, 2017 03:43
-
-
Save erikaris/fe7d63ae38dd02b05d0abbd3ebdf106d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# from matplotlib.org | |
import matplotlib.pyplot as plt | |
from matplotlib.gridspec import GridSpec | |
def make_ticklabels_invisible(fig): | |
for i, ax in enumerate(fig.axes): | |
ax.text(0.5, 0.5, "ax%d" % (i+1), va="center", ha="center") | |
ax.tick_params(labelbottom=False, labelleft=False) | |
# demo 3 : gridspec with subplotpars set. | |
fig = plt.figure() | |
fig.suptitle("GridSpec w/ different subplotpars") | |
gs1 = GridSpec(4, 3) | |
gs1.update(hspace=6.95, wspace= 4.95) | |
ax1 = plt.subplot(gs1[:-2, :]) | |
ax2 = plt.subplot(gs1[2, :-1]) | |
ax3 = plt.subplot(gs1[-1, -1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment