Skip to content

Instantly share code, notes, and snippets.

@blaylockbk
Last active March 9, 2021 18:31
Show Gist options
  • Save blaylockbk/4f27dfd46a071e73e87e98dff8f1c889 to your computer and use it in GitHub Desktop.
Save blaylockbk/4f27dfd46a071e73e87e98dff8f1c889 to your computer and use it in GitHub Desktop.
Special String Formating and Characters
# Greek Letters
plt.title(r'$\theta$')
plt.title(r'$\alpha$')
plt.title(r'$\Delta$')
# Superscript (wind speed m/s)
plt.ylabel(r'Wind Speed (m s$\mathregular{^{-1}}$)')
# Subscript (CO_2, theta_surface)
plt.ylabel(r'CO$_2$ (ppm)')
plt.ylabel(r'$\theta$$\mathregular{_{surface}}$')
# Temperature Degree Symbol
plt.ylabel(r'Temperature $\degree$C')
# PM 2.5 concentration (ug/m3)
plt.ylabel(r'PM 2.5 Concentration ($\mu$g m$\mathregular{^{-3}}$)')
@blaylockbk
Copy link
Author

r'$\Sigma$' is the sum character image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment