/plt-styles-phys

Publication ready plots in python (physics)

Primary LanguageJupyter NotebookMIT LicenseMIT

plt-styles-phys

Publication ready plots in python (physics)

Can be loaded as simplte as

  • Computer modern style
plt.rcdefaults()  # reset to default
plt.style.use('https://raw.githubusercontent.com/toftul/plt-styles-phys/main/phys-plots-cm.mplstyle')
  • Improved sans style
plt.rcdefaults()  # reset to default
plt.style.use('https://raw.githubusercontent.com/toftul/plt-styles-phys/main/phys-plots-sans.mplstyle')

Or you are free to download these style files, change and use as

plt.style.use('<FILENAME>.mplstyle')

More to look at:

Examples

Default

plt.rcdefaults()

Default

Computer moder font (default $\LaTeX$ font)

plt.rcdefaults()  # reset to default
plt.style.use('https://raw.githubusercontent.com/toftul/plt-styles-phys/main/phys-plots-cm.mplstyle')

Computer modern

Good sans font (ideal for presentations)

plt.rcdefaults()  # reset to default
plt.style.use('https://raw.githubusercontent.com/toftul/plt-styles-phys/main/phys-plots-sans.mplstyle')

Improved sans