Skip to content

Instantly share code, notes, and snippets.

@cdeitrick
Last active November 21, 2023 17:53
Show Gist options
  • Select an option

  • Save cdeitrick/33126ea324741042e6ba9190f454facc to your computer and use it in GitHub Desktop.

Select an option

Save cdeitrick/33126ea324741042e6ba9190f454facc to your computer and use it in GitHub Desktop.
Matplotlib Snippets
# 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