Make small changes
This commit is contained in:
parent
b88a9027bc
commit
7d39248a15
16 changed files with 36 additions and 30 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue