-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlotter.py
More file actions
executable file
·62 lines (59 loc) · 2.21 KB
/
Plotter.py
File metadata and controls
executable file
·62 lines (59 loc) · 2.21 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
a_list=[0.001,1, 2.25, 3.5, 4.75, 6, 7.25, 8.5, 9.75, 11, 12.25, 13.5, 14.75]
summaryPlot = [1e-5,1e-5,0.0052/0.113,0.016/0.113,0.027/0.113,0.063/0.113,0.082/0.113,0.1/0.113,0.103/0.113,0.106/0.113,0.112/0.113,0.1125/0.113,0.1127/0.113]
stepCount = [element * 81.16 / 8.5 for element in a_list]
plt.style.use('fivethirtyeight')
fig = plt.figure(figsize=(8, 8))
ax = plt.subplot(111)
ax.plot(stepCount, summaryPlot)
ax.set_title('')
chartBox = ax.get_position()
ax.set_position([chartBox.x0, chartBox.y0, chartBox.width * 0.7, chartBox.height])
ax.legend(loc='upper right', bbox_to_anchor=(0.9, 0.8))
ax.xaxis.set_major_locator(ticker.MultipleLocator(stepCount[-1] / 10))
ax.xaxis.set_minor_locator(ticker.MultipleLocator(stepCount[-1] / 20))
ax.yaxis.set_major_locator(ticker.MultipleLocator(summaryPlot[-1] * stepCount[-1] / 100))
ax.yaxis.set_minor_locator(ticker.MultipleLocator(summaryPlot[-1] * stepCount[-1] / 200))
ax.tick_params(axis='both',
which='major',
direction='inout',
length=20,
width=2,
color='#e54747',
pad=10,
labelsize=10,
labelcolor='#000',
bottom=True,
top=True,
left=True,
right=True,
labelbottom=True,
labeltop=True,
labelleft=True,
labelright=True,
labelrotation=70)
ax.tick_params(axis='both',
which='minor',
direction='out',
length=10,
width=1,
color='#e54747',
pad=10,
labelsize=15,
labelcolor='#000',
bottom=True,
top=True,
left=True,
right=True)
ax.grid(which='major',
color='k')
ax.minorticks_on()
ax.grid(which='minor',
color='gray',
linestyle=':')
ax.set_ylabel('Эффективность')
ax.set_xlabel('Угловая скорость, об/мин')
# ax.set_xlim(xmin=nrg[0], xmax=nrg[-1])
fig.tight_layout()
plt.show()