Last active
March 29, 2023 11:41
-
-
Save ISDementyev/d8f2e8cf4d198dbb734775cd6a829c9d to your computer and use it in GitHub Desktop.
Matplotlib plot with LaTeX (Computer Modern) font
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
import matplotlib.pyplot as plt | |
plt.style.use('seaborn') # I personally prefer seaborn for the graph style, but you may choose whichever you want. | |
params = {"ytick.color" : "black", | |
"xtick.color" : "black", | |
"axes.labelcolor" : "black", | |
"axes.edgecolor" : "black", | |
"text.usetex" : True, | |
"font.family" : "serif", | |
"font.serif" : ["Computer Modern Serif"]} | |
plt.rcParams.update(params) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment