File tree 1 file changed +4
-4
lines changed
content/posts/pyplot-vs-object-oriented-interface
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ This interface shares a lot of similarities in syntax and methodology with MATLA
60
60
import matplotlib.pyplot as plt
61
61
62
62
plt.figure(figsize = (9 ,7 ), dpi = 100 )
63
- plt.plot(distance,' bo-' )
63
+ plt.plot(time, distance,' bo-' )
64
64
plt.xlabel(" Time" )
65
65
plt.ylabel(" Distance" )
66
66
plt.legend([" Distance" ])
@@ -76,7 +76,7 @@ The plot shows how much distance was covered by the free-falling object with eac
76
76
77
77
``` python
78
78
plt.figure(figsize = (9 ,7 ), dpi = 100 )
79
- plt.plot(velocity,' go-' )
79
+ plt.plot(time, velocity,' go-' )
80
80
plt.xlabel(" Time" )
81
81
plt.ylabel(" Velocity" )
82
82
plt.legend([" Velocity" ])
@@ -94,8 +94,8 @@ Let's try to see what kind of plot we get when we plot both distance and velocit
94
94
95
95
``` python
96
96
plt.figure(figsize = (9 ,7 ), dpi = 100 )
97
- plt.plot(velocity,' g-' )
98
- plt.plot(distance,' b-' )
97
+ plt.plot(time, velocity,' g-' )
98
+ plt.plot(time, distance,' b-' )
99
99
plt.ylabel(" Distance and Velocity" )
100
100
plt.xlabel(" Time" )
101
101
plt.legend([" Distance" , " Velocity" ])
You can’t perform that action at this time.
0 commit comments