Make small changes

This commit is contained in:
Cory Balaton 2023-09-12 22:48:28 +02:00
commit 7d39248a15
No known key found for this signature in database
GPG key ID: 3E5FCEBFD80F432B
16 changed files with 36 additions and 30 deletions

View file

@ -4,8 +4,7 @@ import numpy as np
analytical_func = lambda x: 1 - (1 - np.exp(-10))*x - np.exp(-10*x)
def main():
fig, ax = plt.subplots()
for i in range(6):
for i in range(7):
x = []
y = []
x.append(0.)
@ -20,12 +19,12 @@ def main():
x.append(1.)
y.append(0.)
ax.plot(x, y, label=f"n$_{{steps}} = 10^{i+1}$")
plt.plot(x, y, label=f"n$_{{steps}} = 10^{i+1}$")
x = np.linspace(0, 1, 1001)
ax.plot(x, analytical_func(x), label=f"u$_{{exact}}$")
ax.legend()
fig.savefig("../latex/images/problem7.pdf")
plt.plot(x, analytical_func(x), label=f"u$_{{exact}}$")
plt.legend()
plt.savefig("../latex/images/problem7.pdf")
if __name__ == "__main__":
main()