-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
gh-actions
committed
Sep 11, 2024
1 parent
20cfe7e
commit 3c7c246
Showing
4 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
# Ensure ~/bin is in the PATH so matplotlib can find latex | ||
import os | ||
from pathlib import Path | ||
os.environ["PATH"] += os.pathsep + str(Path.home() / "bin") | ||
|
||
import matplotlib.pyplot as plt | ||
import paths | ||
plt.rcParams.update({"text.usetex": True}) | ||
fig = plt.figure(figsize=(7, 6)) | ||
plt.plot([0, 1], [0, 1]) | ||
plt.xlabel(r'$\alpha \beta \frac{1}{2} \exp{-x^2}$') | ||
fig.savefig(paths.figures / 'test_figure.pdf', bbox_inches='tight') | ||
|
This file contains 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