matplotlib Flashcards

1
Q

Import the pyplot module

A

import matplotlib.pyplot as plt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Allow plots to display in Jupyter Notebook cell

A

%matplotlib inline

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Plot and display the visual

A

plt. plot()
plt. show()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Create a figure sized 12 wide and 5 high containing 2 rows and 3 columns of subplots

A

fig, axs = plt.subplots(2, 3, figsize=(12, 5) )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Create a line chart

A

ax.plot(x, y)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly