Skip to content

Instantly share code, notes, and snippets.

View chiang-yuan's full-sized avatar
🐧

Yuan (Cyrus) Chiang chiang-yuan

🐧
View GitHub Profile
@chiang-yuan
chiang-yuan / ptable.ipynb
Created November 2, 2023 00:05
Plot periodic table using matplotlib and pymatgen
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chiang-yuan
chiang-yuan / 2023-07-09-latex-matplotlib-on-HPCs.md
Last active November 2, 2025 16:58
Use latex with matplotlib on HPCs where you can't sudo!

Have you ever wanted to use LaTeX with matplotlib? You are definitely not alone. There are many tutorials out there that can guide you through the installation process. Then we can just follow the official documentation to make plots by activating plt.rcParams['text.usetex'] = True.

What we need to do is just installing typical latex by

sudo apt update
sudo apt install texlive # for minimum latex build
sudo apt install dvipng texlive-latex-extra texlive-fonts-recommended # required by matplotlib