-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot.py
More file actions
37 lines (35 loc) · 2.16 KB
/
plot.py
File metadata and controls
37 lines (35 loc) · 2.16 KB
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
import matplotlib.pyplot as plt
import numpy as np
points = np.array([
[4, 0], [3.83816540739929, 1.07578501875574], [0.689051687913723, 0.538279095796101],
[-0.909634852972086, -0.671271285388956], [0.181645429819496, -0.359242725593119],
[2.01163349888763, 0.153308581875587], [1.35406647728457, 1.32582226857697],
[-0.189791014836295, 2.31327111041820], [0.0720490844521664, 2.71850929822278],
[1.43947005928924, 1.49302839463328], [1.72262971301982, 0.280883428974671],
[1.27608964081406, 0.743446720481118], [0.279313095572966, 1.90774774226013],
[-0.306337413786329, 2.61780732667061], [0.235535338435817, 2.64314790396324],
[1.07960984984918, 2.12915837350879], [1.36144039810571, 1.66859750746316],
[1.25484254093587, 1.64227877414432], [1.17246687366768, 1.81735984018747],
[1.10392198052069, 1.86801354681971], [0.930131074947194, 1.88872999205683],
[0.634850297003614, 1.98625198061269], [0.324247401659741, 2.02420784571966],
[0.212512102775306, 1.90320182892462], [0.405156895487819, 1.51101103469798],
[0.798971546638511, 1.04442951129065], [1.32239474070909, 0.777942125298938],
[1.83828129311068, 0.743381170723005], [2.00400606125624, 0.949563517601230],
[1.74779918786830, 1.26297343944533], [1.32628666779336, 1.37795440589996],
[1.17382399200413, 1.35524569528457], [1.51114435763908, 1.21495312633942],
[2.11232463594790, 0.720148039856635], [2.47627621120643, 0.0599077798444487],
[2.48345287480638, -0.202644899201920], [2.30961376799010, 0.0839775808588011],
[2.09616799992843, 0.666261708371627], [1.96434870492716, 1.25165813543813],
[2.03421937833924, 1.59578386281267], [2.30594059905570, 1.57684650388827],
[2.61033275344234, 1.28908171534353], [2.79077864111555, 0.995866020293123],
[2.81955519819841, 0.925684553580145], [2.73787150689276, 1.11617978655887],
[2.60304877897612, 1.43133847864904], [2.47840692306907, 1.69787040467403],
[2.40182028104416, 1.84467556742253]
])
plt.figure(figsize=(6, 6))
plt.scatter(points[:, 0], points[:, 1], color='blue', marker='o')
plt.xlabel("X-axis")
plt.ylabel("Y-axis")
plt.title("Scatter Plot of Given Points")
plt.grid(True)
plt.show()