Skip to content
Snippets Groups Projects
Commit 0b39df89 authored by Dominik Zobel's avatar Dominik Zobel Committed by Tobias Koelling
Browse files

Adjust Fibonacci graph slide

parent a2f3c6eb
No related branches found
No related tags found
1 merge request!24complexity lecture
......@@ -132,7 +132,9 @@ $$
$$
## graph
## Fibonacci series example (3/3)
**Performance Overview**
```{python}
import time
......@@ -147,10 +149,11 @@ x1 = list(range(30))
x2 = list(range(60))
y1 = [get_time(lambda: fib1(i)) for i in x1]
y2 = [get_time(lambda: fib2(i)) for i in x2]
plt.plot(x1, y1, label="fib1")
plt.plot(x1, y1, label="fib1", ls='--')
plt.plot(x2, y2, label="fib2")
plt.xlabel("n")
plt.ylabel("time / s")
plt.yscale('log')
plt.xlabel("Number n", fontsize=14)
plt.ylabel("Time to compute [s]", fontsize=14)
plt.legend()
None
```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment