-
-
Save yonesuke/dcf880846bad725eadad4e6f59566935 to your computer and use it in GitHub Desktop.
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 numpy as np | |
import matplotlib.pyplot as plt | |
plt.rcParams["text.usetex"] = True | |
plt.rcParams["text.latex.preamble"] = r"\usepackage{amsmath,bm}" | |
plt.rcParams["font.family"] = "serif" | |
xs = np.arange(0, 1, 0.01) | |
ys = xs ** 2 | |
plt.figure(figsize=[8, 6]) | |
plt.rcParams["font.size"] = 15 | |
plt.xlim(0, 1) | |
plt.ylim(0, 1) | |
plt.plot(xs, ys) | |
plt.xlabel("$x$") | |
plt.ylabel("$f(x)=x^{2}$") | |
plt.savefig("out.png") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment