Skip to content

Commit 5a030b7

Browse files
committed
_episodes/13-matplotlib.md: add import code to block.
- Add import code in 'Customising our plots with Matplotlib' section. - Add line reminding that data is randomly generated.
1 parent 61ae7d1 commit 5a030b7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

_episodes/13-matplotlib.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,13 @@ We can further customise our plots with Matplotlib directly. First we need to im
206206
The Matplotlib library can be imported using any of the import techniques we have seen.
207207
As Pandas is generally imported with `import pandas as pd`, you will find that `matplotlib` is most commonly imported
208208
with `import matplotlib.pyplot as plt` where `plt` is the alias.
209+
For demonstration purposes, we are going to use randomly generated data, using the NumPy library (aliased here as `np`).
209210
210211
~~~
212+
import numpy as np
213+
import pandas as pd
214+
import matplotlib.pyplot as plt
215+
211216
# Generate some date for 2 sets of points.
212217
x1 = pd.Series(np.random.rand(20) - 0.5)
213218
y1 = pd.Series(np.random.rand(20) - 0.5)

0 commit comments

Comments
 (0)