Last active
November 21, 2023 17:53
-
-
Save cdeitrick/33126ea324741042e6ba9190f454facc to your computer and use it in GitHub Desktop.
Matplotlib Snippets
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
| # Change ticklabel size | |
| plt.yticks(fontsize=20) | |
| ax.tick_params(axis='x', labelsize=20) | |
| # Remove tick labels | |
| ax.xaxis.set_visible(True) | |
| ax.axis('off') | |
| ax.set_axis_off() | |
| ax.get_xaxis().set_visible(False) | |
| ax.get_yaxis().set_visible(False) | |
| ax.spines['right'].set_visible(False) | |
| ax.spines['top'].set_visible(False) | |
| #rotate x-axis tick labels | |
| plt.xticks(rotation=45) | |
| #rotate y-axis tick labels | |
| plt.yticks(rotation=90) | |
| # Use a monospaced font | |
| plt.rcParams['font.family'] = ['Noto Mono'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment