-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path01-getting-started.py
More file actions
47 lines (35 loc) · 907 Bytes
/
01-getting-started.py
File metadata and controls
47 lines (35 loc) · 907 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import matplotlib.pyplot as plt
def simple_plot():
x = [0, 1, 2, 3, 4]
y = [0, 1, 4, 9, 16]
plt.plot(x, y)
plt.show()
def scatter_plot():
x = [0, 1, 2, 5, 8]
y = [1, 4, 3, 2, 5]
plt.scatter(x, y)
plt.show()
def scatter_plot_custom_design():
x = [0, 1, 2, 5, 8]
y = [1, 4, 3, 2, 5]
plt.scatter(x, y, color='red')
plt.show()
x = [0, 1, 2, 5, 8]
y = [1, 4, 3, 2, 5]
plt.scatter(x, y, color='red', marker='^')
plt.show()
def scatter_plot_labels():
x = [0, 1, 2, 5, 8]
y = [1, 4, 3, 2, 5]
plt.scatter(x, y, color='red', marker='^')
plt.xlabel('X Axis Label')
plt.ylabel('Y Axis Label')
plt.show()
def scatter_plot_limits():
x = [0, 1, 2, 5, 8]
y = [1, 4, 3, 2, 5]
plt.scatter(x, y, color='red', marker='^')
plt.xlabel('X Axis Label')
plt.ylabel('Y Axis Label')
plt.ylim(0)
plt.show()