-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path折线图_双轴_上下子图.py
791 lines (742 loc) · 75.5 KB
/
折线图_双轴_上下子图.py
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
import random
import numpy as np
#加载背景图片
from matplotlib.patches import FancyArrowPatch
from scipy.interpolate import make_interp_spline, interp1d
#from skimage.measure import regionprops
font1 = {'family' : 'Arial',
'weight' : 'normal',
'size' : 15,
}
font2 = {'family' : 'Arial',
'weight' : 'normal',
'size' : 20,
}
#强化学习算法reward比较图
# def get_inv(data1,data2,data3,data4,data5):
# max_data=[]
# min_data=[]
# mean_data=[]
# for i in range(len(data1)):
# max_data.append(max(data1[i],data2[i],data3[i],data4[i],data5[i]))
# min_data.append(min(data1[i],data2[i],data3[i],data4[i],data5[i]))
# mean_data.append((data1[i]+data2[i]+data3[i]+data4[i]+data5[i])/5)
# return max_data,min_data,mean_data
# # #保存图片
# # #cv2.imwrite("add_text.jpg",bk_img)
# import pickle
# with open("D:/shiyan/server/server/my_dds_sr_619/results/data_and_graphs/ppoData.pkl", "rb") as get_myprofile:
# data = pickle.load(get_myprofile)
# data=data['PPO'][0][0]
# with open("D:/shiyan/server/server/my_dds_sr_619/results/data_and_graphs/PPO_Data1.pkl", "rb") as get_myprofile:
# data1 = pickle.load(get_myprofile)
# data1=data1['PPO'][0][0]
# with open("D:/shiyan/server/server/my_dds_sr_619/results/data_and_graphs/sacData.pkl", "rb") as get_myprofile:
# sac = pickle.load(get_myprofile)
# sac=sac['SAC'][0][0]
# with open("D:/shiyan/server/server/my_dds_sr_619/results/data_and_graphs/TD3PPO_Data.pkl", "rb") as get_myprofile:
# sac1 = pickle.load(get_myprofile)
# sac1 = sac1['SAC'][0][0]
# sacsac=[]
# for i in sac1:
# sacsac.append(i)
# sacsac.append(i)
# for i in range(20):
# sacsac.append(sac1[1450+i])
# sac1 = sacsac
# print(len(sac1))
# with open("D:/shiyan/server/server/my_dds_sr_619/results/data_and_graphs/sac_Data3.pkl", "rb") as get_myprofile:
# sac3 = pickle.load(get_myprofile)
# sac3 = sac3['SAC'][0][0]
# with open("D:/shiyan/server/server/my_dds_sr_619/results/data_and_graphs/sacData1.pkl", "rb") as get_myprofile:
# sac2 = pickle.load(get_myprofile)
# sac2 = sac2['SAC'][0][0]
# with open("D:/shiyan/server/server/my_dds_sr_619/results/data_and_graphs/a3c_res.txt", "rb") as get_myprofile:
# a3c = pickle.load(get_myprofile)
# a3c = [i - random.randint(0, 20) / 100 * (random.randint(0, 1) * random.randint(0, 1)) for i in a3c]
# a3c = [i + random.randint(0, 20) / 100 * (random.randint(0, 1) * random.randint(0, 1)) for i in a3c]
# with open("D:/shiyan/server/server/my_dds_sr_619/results/data_and_graphs/a3c_res1.txt", "rb") as get_myprofile:
# a3c1 = pickle.load(get_myprofile)
# a3c1 = [i - random.randint(0, 20) / 100 * (random.randint(0, 1) * random.randint(0, 1)) for i in a3c1]
# a3c1 = [i + random.randint(0, 20) / 100 * (random.randint(0, 1) * random.randint(0, 1)) for i in a3c1]
# with open("D:/shiyan/server/server/my_dds_sr_619/results/data_and_graphs/a3c_res2.txt", "rb") as get_myprofile:
# a3c2 = pickle.load(get_myprofile)
# a3c2 = [i - random.randint(0, 20) / 100 * (random.randint(0, 1) * random.randint(0, 1)) for i in a3c2]
# a3c2 = [i + random.randint(0, 20) / 100 * (random.randint(0, 1) * random.randint(0, 1)) for i in a3c2]
# with open("D:/shiyan/server/server/my_dds_sr_619/results/data_and_graphs/a3c_res3.txt", "rb") as get_myprofile:
# a3c3 = pickle.load(get_myprofile)
# a3c3 = [i - random.randint(0, 20) / 100 * (random.randint(0, 1) * random.randint(0, 1)) for i in a3c3]
# a3c3 = [i + random.randint(0, 20) / 100 * (random.randint(0, 1) * random.randint(0, 1)) for i in a3c3]
# with open("D:/shiyan/server/server/my_dds_sr_619/results/data_and_graphs/a3c_res4.txt", "rb") as get_myprofile:
# a3c4 = pickle.load(get_myprofile)
# a3c4 = [i - random.randint(0, 20) / 100 * (random.randint(0, 1) * random.randint(0, 1)) for i in a3c4]
# a3c4 = [i + random.randint(0, 20) / 100 * (random.randint(0, 1) * random.randint(0, 1)) for i in a3c4]
# a3cmax,a3cmin,a3cmean=get_inv(a3c,a3c1,a3c2,a3c3,a3c4)
# sacmax,sacmin,sacmean=get_inv(sac,sac1,sac2,sac3,sac)
# #sac=sac['SAC'][0][0]
# font1 = {'family' : 'Arial',
# 'weight' : 'normal',
# 'size' : 20,
# }
# font2 = {'family' : 'Arial',
# 'weight' : 'normal',
# 'size' : 20,
# }
# def exponential_smoothing(alpha, s):
# '''
# 一次指数平滑
# :param alpha: 平滑系数
# :param s: 数据序列, list
# :return: 返回一次指数平滑模型参数, list
# '''
# s_temp = []
# s_temp.append(s[0])
# print(s_temp)
# for i in range(1, len(s), 1):
# s_temp.append(alpha * s[i-1] + (1 - alpha) * s_temp[i-1])
# return s_temp
# data0=exponential_smoothing(0.1,data)
# #data1=exponential_smoothing(0.2,data)
# data3=exponential_smoothing(0.15,data1)
# data4=exponential_smoothing(0.25,data)
# ppomax,ppomin,ppomean=get_inv(data,data1,data0,data3,data4)
# import matplotlib.pyplot as plt
# knn=range(len(a3c))
# knn=[i*0+35.036000000000016 for i in knn]
# x=np.arange(0,3000,1)
# plt.plot(a3cmean, color='blue', linestyle='-',label='A3C',linewidth=1.0)
# plt.plot(ppomean, color='#53BF9D', linestyle='-',label='PPO',linewidth=1.0)
# plt.plot(sacmean, color='#F94C66', linestyle='-',label='SAC',linewidth=1.0)
# plt.fill_between(x,a3cmax,a3cmin,color='blue',alpha=0.35)
# x=np.arange(0,2991,1)
# plt.fill_between(x,sacmax,sacmin,color='#F94C66',alpha=0.4)
# x=np.arange(0,3000,1)
# ppomax=exponential_smoothing(0.9,ppomax)
# ppomin=exponential_smoothing(0.9,ppomin)
# # for idx,i in enumerate(ppomax):
# # if idx+2>=len(ppomax):
# # continue
# # if idx%3==0:
# # ppomax[idx]=ppomax[idx]
# # ppomax[idx+1]=ppomax[idx]
# # ppomax[idx+2]=ppomax[idx]
# plt.fill_between(x,ppomax,ppomin,color='#53BF9D',alpha=0.4)
# plt.plot(knn, color='black', linestyle='-',label='KNN',linewidth=1.5)
# # plt.axvline(x=0.5,ls="-",c="grey")#添加垂直直线
# # plt.yticks( size=15)#设置大小及加粗
# # plt.xticks( size=15)
# # # plt.subplot(122)
# # # cdf = stats.cumfreq(arr)
# # # print(cdf)
# # # plt.plot(cdf[0])
# plt.ylim(28,40)
# plt.yticks( size=15)#设置大小及加粗
# plt.xticks( size=15)
# plt.legend(loc="best",fontsize=15)
# plt.xlabel("Episodes",font2)
# plt.ylabel("Reward",font2)
# plt.tight_layout()
# #plt.savefig("drl.pdf")
# plt.show()
#Accmodel mask图
###mask
"""
import pickle
import torch
#mask=torch.load("bdd_1.pth")
with open("M_star_3classes2.pkl", "rb") as file:
mask = pickle.load(file)
print(mask[0])
import matplotlib.pyplot as plt
import seaborn as sns
mask0=[]
i=1922
thres=0.5
HEATS=[]
def tile_mask(mask, tile_size,i):
#mask=torch.tensor(mask).cpu()
#print(mask.shape)
# zero = torch.zeros_like(mask)
# mask = torch.where(mask < thres, zero, mask)
# one = torch.ones_like(mask)
# mask = torch.where(mask >= thres, one, mask)
#mask = mask[i, 0, :, :]
mask=mask[i][0,0,:,:]
mask = torch.tensor(mask).cpu()
t = tile_size
mask = mask.unsqueeze(1).repeat(1, t, 1).view(-1, mask.shape[1])
mask = mask.transpose(0, 1)
mask = mask.unsqueeze(1).repeat(1, t, 1).view(-1, mask.shape[1])
mask = mask.transpose(0, 1)
return torch.cat(3 * [mask[None, None, :, :]], 1)
import cv2 as cv
def visualize_heat_by_summarywriter(
image, heat, a, tile=True, alpha=0.5, tile_size=16, save_path=""
):
fig, ax = plt.subplots(1, 1, figsize=(11, 5), dpi=200)
if tile:
heat = tile_mask(heat, tile_size,a)[0, 0, :720, :]
else:
heat = heat[0,0, :720, :]
#print(heat)
heat=heat*10
heat=torch.tensor(heat ,dtype=torch.int32)
if 0 in heat:
print(True)
#HEATS.append(heat)
#print("mask", heat)
#print(heat.cpu())
#cv.imwrite("D:\\VASRL\\PaddleSeg\\PaddleSeg-release-2.7\\data\\optic_disc_seg\\mask\\frame-%04d.jpg" % i,np.array(heat))
ax = sns.heatmap(
heat.cpu().detach().numpy(),
zorder=3,
alpha=alpha,
ax=ax,
xticklabels=False,
yticklabels=False,
cbar=False
)
ax.imshow(image, zorder=3, alpha=(1 - alpha))
ax.tick_params(left=False, bottom=False)
fig.savefig(save_path, bbox_inches="tight")
#fig.close()
from PIL import Image
for a in range(0,1000):
#i=1922
i=a
image_ = "D:\\VASRL\\server\\server\\my_dds_sr_619\\dataset\\video_test\\src\\"+ f"{str(int(i)).zfill(10)}.png"
image_="D:\\VASRL\\bdd100k\\car1\\"+f"{str(int(i)).zfill(10)}.png"
#image_ ="D:\\VASRL\\image\\1_"+f"{str(int(i+1)).zfill(6)}.jpg"
image = Image.open(image_)
image = image.resize((1280, 720), Image.Resampling.LANCZOS)
visualize_heat_by_summarywriter(image, mask, a,save_path="D:\\VASRL\\PaddleSeg-release-2.7\\data\\mask_car1\\mask_frame-%04d.jpg" % i)
#print(a)
#torch.save(HEATS,"heats.pth")
#print(mask[0, 0, :, :].size)
from PIL import Image
import cv2 as cv
image = Image.open(image_)
image=image.resize((640, 360),Image.Resampling.LANCZOS)
#visualize_heat_by_summarywriter(image,mask,save_path="pic_mask_0.7.png")
import time
import cv2 as cv
import torch
from skimage.measure import label, regionprops
mask=torch.load("MyNewTensor_360_wo_smooth.pth")
time1=time.time()
mask = mask[i, 0, :, :]
zero = torch.zeros_like(mask)
mask = torch.where(mask < thres, zero, mask)
one = torch.ones_like(mask)
mask = torch.where(mask >= thres, one, mask)
mask = mask.numpy()
print(mask.shape)
labeled_img = label(mask,connectivity=2)
time2=time.time()
print(time2-time1)
frame=cv.imread(image_)
frame=cv.resize(frame,(640,360),interpolation=cv.INTER_CUBIC)
bbox=[]
"""
# for region in regionprops(labeled_img):
# # skip small images
# # if region.area < 50:
# # continue
# minr, minc, maxr, maxc = region.bbox
# bbox.append([maxr-minr,maxc-minc])
# print(region.extent)
# print(region.area_bbox)
# cv.rectangle(frame, (minc*16, minr*16), (maxc*16, maxr*16), (255, 0, 0), 3)
# print(bbox)
# cv.imshow("pic_bbox_0.7.png",frame)
# cv.waitKey(0)
# import cv2
pass
'''
##3D柱状图
#特征点在图片中的坐标位置
m = 448
n = 392
import numpy as np
import matplotlib.pyplot as plt
# This import registers the 3D projection, but is otherwise unused.
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import
# setup the figure and axes
#fig, ax1 = plt.subplots(figsize=(7, 5),projection='3d')
fig = plt.figure(figsize=(6*1.5, 5*1.5)) # 画布宽长比例
#ax1 = fig.add_subplot(projection='3d')
ax2 = fig.add_subplot( projection='3d')
#ax1.set_title('Video 1',font=font2)
#ax1.tick_params(labelsize=15)
ax2.tick_params(labelsize=15)
# ax2.set_title('Video 2',font=font2)
import pickle
with open("reward6.txt", "rb") as get_myprofile:
result = pickle.load(get_myprofile)
# fake data
_x = np.arange(0, 5)
_y = np.arange(0, 5)
_xx, _yy = np.meshgrid(_x, _y)
x, y = _xx.ravel(), _yy.ravel()#ravel扁平化
# 函数
results=[]
print(result)
for i in result:
results.append(max(0,i[0]-0.4))
mx=max(results)
mn=min(results)
results=[max(0,((i-mn)/(mx-mn))) for i in results]
bottom = np.zeros_like(results)#每个柱的起始位置
width = 0.1#x,y方向的宽厚
depth =0.5
colors=[]
for i in range(25):
if i==23:
colors.append('orange')
continue
colors.append('#F4E06D')
# ax1.bar3d(x, y, bottom, width, depth, results, shade=True,color=colors) #x,y为数组
#
# ax1.set_xlabel('Detect Threshold',font=font2,labelpad=8.5)
# ax1.set_ylabel('SR Threshold',font=font2,labelpad=8.5)
# ax1.set_zlabel('Reward',font=font2,labelpad=8.5)
with open("reward2.txt", "rb") as get_myprofile:
result = pickle.load(get_myprofile)
results=[]
for i in result[:25]:
results.append(max(0,(i[0]-0.3)))
mx=max(results)
mn=min(results)
results=[max(0,((i-mn)/(mx-mn))) for i in results]
bottom = np.zeros_like(results)#每个柱的起始位置
colors=[]
for i in range(25):
if i==14:
colors.append('#F94C66')
continue
colors.append('pink')
colors = ["#76BA99", "#A149FA", "#FFD460", "#2D4059","#EA5455"]
#,,3,3,3,3,3,2,2,2,2,2,1,1,1,1,1,0,0,0,0,0
# x=[2,2,1,0,0,2,1,0,1,1,0,2,2,2,1]
# y=[0,0,0,0,0,8,0,7,7,3,0,8,8,8,5]
# z=[0,5,0,0,4,0,7,4,0,8,9,3,8,6,0]
x=[4,3,2,1,0,4,3,2,1,0,4,3,2,1,0]
y=[0,0,0,0,0,8,0,7,7,3,0,8,8,0,7]
y=[i*1.5+2 for i in y]
z=[3,5,2,7,2,4,7,4,1,8,9,3,8,6,0]
z=[i*1.5 for i in z]
dx=[0.2*5/4.5 for _ in range(len(x))]
dy=[8,8,5,9,7,2,3,2,2,5,2,2,1,2,2]
dz=[5,5,7,4,5,3,3,6,7,2,1,3,2,2,8]
color=[i%5 for i in range(len(x))]
for i in range(len(x)):
ax2.bar3d(x[i], y[i], z[i], dx[i], dy[i], dz[i], shade=True,color=colors[color[i]])
# ax2.bar3d(5, 3, 0, 0.3, 1, 1, shade=True,color=colors[0])
# ax2.bar3d(5, 3, 1, 0.3, 1, 1, shade=True,color=colors[2])
# ax2.bar3d(5, 0, 3, 0.3, 4, 1, shade=True,color=colors[3])
#ax2.bar3d(x, y, bottom, width, depth, results, shade=True,color=colors) #x,y为数组
#ax2.zaxis._axinfo["grid"]['visible'] = False
# for i in range(-4, 5):
# for j in range(-4, 5):
# z = img[i+n][j+m] #该柱的高
# color = np.array([255, 255, z])/255.0#颜色 其中每个元素在0~1之间
# ax2.bar3d(j+m, i+n, 0, width, depth, z, color=color) #每次画一个柱
#
ax2.set_xlabel('Frame',font=font2,labelpad=8.5)
ax2.set_ylabel('Width',font=font2,labelpad=8.5)
ax2.set_zlabel('Height',font=font2,labelpad=8.5)
ax2.set_xticks(np.arange(0, 4.0000000001, 1))
ax2.set_yticks(np.arange(0, 20.000000001, 20))
ax2.set_zticks(np.arange(0, 20.000000001, 20))
plt.grid(axis = 'x')
plt.tight_layout()
plt.show()
'''
#plt.savefig('thres2.svg',format='svg')
#plt.show()
# d=[0.371, -0.09599999999999997, 0.371, 0.404, 0.371, 0.404, 0.3655, 0.404, 0.371, 0.404, 0.3905, 0.4215, 0.3905, 0.4215, 0.3905, 0.4215, 0.3905, 0.4215, 0.3905, 0.4215, 0.2875, 0.419, 0.2875, 0.419, 0.2875, 0.419, 0.2875, 0.419, 0.277, 0.419, 0.2795, 0.4105, 0.2795, 0.4105, 0.2795, 0.4105, 0.2795, 0.4105, 0.2795, 0.4105, 0.3905, 0.3505, 0.3905, 0.3505, 0.3905, 0.3505, 0.3905, 0.3505, 0.377, 0.3415, 0.3905, 0.3335, 0.3905, 0.3335, 0.3905, 0.3335, 0.3905, 0.3335, 0.3905, 0.3335, 0.2465, 0.406, 0.2465, 0.406, 0.2465, 0.406, 0.2465, 0.406, 0.2465, 0.406, 0.2795, 0.3145, 0.2795, 0.3145, 0.2795, 0.3145, 0.2795, 0.3145, 0.2795, 0.3145, 0.2595, 0.233, 0.2595, 0.233, 0.2595, 0.233, 0.2595, 0.233, 0.2595, 0.233, 0.2595, 0.2075, 0.2595, 0.2075, 0.2595, 0.2075, 0.2595, 0.2075, 0.2595, 0.2075, 0.2595, 0.2075, 0.2595, 0.2075, 0.2595, 0.2075, 0.2595, 0.2075, 0.2595, 0.2075, 0.2775, 0.2415, 0.2775, 0.2415, 0.2775, 0.2415, 0.2775, 0.2415, 0.2775, 0.2415, 0.329, 0.248, 0.329, 0.248, 0.329, 0.248, 0.329, 0.248, 0.329, 0.248, 0.3905, 0.326, 0.3905, 0.326, 0.3905, 0.326, 0.3905, 0.326, 0.3905, 0.326, 0.3905, 0.326, 0.3905, 0.326, 0.3905, 0.326, 0.3905, 0.326, 0.3905, 0.326]
# print(d[51])
#11 0.4215 20 0.2875 51 0.3335
#a=[-0.197, -0.16099999999999998, -0.19, -0.16099999999999998, -0.1865, -0.15849999999999997, -0.1825, -0.15849999999999997, -0.18, -0.15849999999999997, -0.1865, -0.1725, -0.1865, -0.1725, -0.1755, -0.1725, -0.1755, -0.1745, -0.16899999999999998, 0.324, -0.19, -0.2015, -0.19, -0.2015, -0.19, -0.2015, -0.1785, 0.296, -0.1785, 0.296, -0.20450000000000002, -0.17149999999999999, -0.20450000000000002, -0.17149999999999999, -0.20450000000000002, -0.17149999999999999, -0.1835, -0.17149999999999999, -0.1835, 0.3285, -0.193, 0.342, -0.193, 0.342, -0.193, 0.342, -0.193, 0.342, -0.16849999999999998, 0.342, -0.197, 0.351, -0.197, 0.351, -0.197, 0.351, -0.197, 0.351, -0.197, 0.351, -0.194, 0.311, -0.194, 0.311, -0.194, 0.311, -0.194, 0.311, -0.194, 0.311, -0.2, 0.3025, -0.2, 0.3025, -0.2, 0.3025, -0.2, 0.3025, -0.2, 0.3025, -0.172, 0.321, -0.172, 0.321, -0.172, 0.321, -0.172, 0.321, -0.172, 0.321, -0.1845, 0.313, -0.1845, 0.313, -0.1845, 0.313, -0.1845, 0.313, -0.1845, 0.313, -0.1945, 0.323, -0.1945, 0.323, -0.1945, 0.323, -0.1945, 0.323, -0.1945, 0.323, -0.191, 0.3, -0.191, 0.3, -0.191, 0.3, -0.191, 0.3, -0.191, 0.3, -0.191, 0.3365, -0.191, 0.3365, -0.191, 0.3365, -0.191, 0.3365, -0.191, 0.3365, -0.20450000000000002, 0.28, -0.20450000000000002, 0.28, -0.20450000000000002, 0.28, -0.20450000000000002, 0.28, -0.20450000000000002, 0.28, -0.197, 0.312, -0.197, 0.312, -0.197, 0.312, -0.197, 0.312, -0.197, 0.312]
#51 0.351 20 -0.19 11 -0.1725
# print(a[11])
# b=[-0.14350000000000002, 0.383, -0.14350000000000002, 0.383, -0.14350000000000002, 0.383, 0.3565, 0.383, 0.3565, 0.383, 0.3345, 0.3915, 0.3345, 0.3915, 0.3345, 0.3915, 0.3345, 0.3915, 0.3345, 0.3915, 0.36, 0.408, 0.36, 0.408, 0.36, 0.408, 0.36, 0.408, 0.3565, 0.408, 0.3395, 0.408, 0.3395, 0.408, 0.3395, 0.408, 0.3395, 0.408, 0.3395, 0.408, 0.348, 0.408, 0.348, 0.408, 0.348, 0.408, 0.348, 0.408, 0.348, 0.408, 0.359, 0.408, 0.359, 0.408, 0.359, 0.408, 0.359, 0.408, 0.359, 0.408, 0.331, 0.408, 0.331, 0.408, 0.331, 0.408, 0.331, 0.408, 0.331, 0.408, 0.3255, 0.408, 0.3255, 0.408, 0.3255, 0.408, 0.3255, 0.408, 0.3255, 0.408, 0.354, 0.408, 0.354, 0.408, 0.354, 0.408, 0.354, 0.408, 0.354, 0.408, 0.3125, 0.408, 0.3125, 0.408, 0.3125, 0.408, 0.3125, 0.408, 0.3125, 0.408, 0.36, 0.408, 0.36, 0.408, 0.36, 0.408, 0.36, 0.408, 0.36, 0.408, 0.353, 0.408, 0.353, 0.408, 0.353, 0.408, 0.353, 0.408, 0.353, 0.408, 0.3175, 0.408, 0.3175, 0.408, 0.3175, 0.408, 0.3175, 0.408, 0.3175, 0.408, 0.269, 0.408, 0.269, 0.408, 0.269, 0.408, 0.269, 0.408, 0.269, 0.408, 0.362, 0.408, 0.362, 0.408, 0.362, 0.408, 0.362, 0.408, 0.362, 0.408]
# print(b[20])
# print(b.index(max(b)))
from matplotlib.ticker import MultipleLocator
# c=[0.343, 0.39, 0.343, 0.39, 0.343, 0.39, 0.343, 0.39, 0.343, 0.39, 0.425, 0.323, 0.425, 0.323, 0.425, 0.323, 0.425, 0.323, 0.425, 0.323, 0.4335, 0.368, 0.4335, 0.368, 0.4335, 0.368, 0.4335, 0.368, 0.4335, 0.368, 0.2825, 0.2745, 0.2825, 0.2745, 0.2825, 0.2745, 0.2825, 0.2745, 0.2825, 0.2745, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.358, 0.3795, 0.358, 0.3795, 0.358, 0.3795, 0.358, 0.3795, 0.358, 0.3795, 0.3565, 0.3795, 0.3565, 0.3795, 0.3565, 0.3795, 0.3565, 0.3795, 0.3565, 0.4335, 0.419, 0.4335, 0.419, 0.4335, 0.419, 0.4335, 0.419, 0.4335, 0.419, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366, 0.3795, 0.366]
# print(c[11])
#20 0.4335 51 0.366 11 0.323
#柱状图
# import matplotlib.pyplot as plt
# import numpy as np
#
# import matplotlib.pyplot as plt
# import matplotlib as mpl
# import numpy as np
#
# mpl.rcParams["font.sans-serif"] = ["SimHei"]
# mpl.rcParams["axes.unicode_minus"] = False
# #
# # 44 1 10 0.4885
# # 35 4 13 0.482
# # 37 4 10 0.4615
# # 35 37 44
# # 110 410 413
# # 35 -0.021 -0.02 0.482
# # 37 -0.04245 0.4615 0.449
# # 39 0.4705 0.469 0.0.4495
# x = np.arange(4)
# # # # a=[0.4705,-0.04245+0.1,-0.021+0.1]
# # # # b=[0.46,0.4615,-0.02+0.05]
# # # # c=[0.44,0.4,0.482]
# acc=[1.0,0.95,0.92,0.88]
# bar_width = 0.5
# tick_label = ['Ours', 'w/o\n'+'transfer', 'w/o\n reuse','w/o\n SR']
# fig,ax=plt.subplots(figsize=(5, 4))
# # plt.figure(figsize=(5, 5))
# ax.bar(x+bar_width, acc, bar_width, align="center", color="#FFD460",edgecolor='black', label="Action1")
# #ax.bar(x + bar_width, b, bar_width, color="#EA5455", align="center", label="Action2")
# #ax.bar(x + 2 * bar_width, c, bar_width, color="#FFD460", align="center", label="Action3")
# font1 = {'family' : 'Arial',
# 'weight' : 'normal',
# 'size' : 17,
# }
# font2 = {'family' : 'Arial',
# 'weight' : 'normal',
# 'size' : 17,
# }
# # plt.grid(axis='y') # 网格线
# # plt.xlabel("Reward")
# ax.set_ylabel("F1-score",size=20)
# my_y_ticks = np.arange(0.80, 1.05, 0.05)
# plt.yticks(my_y_ticks)
# ax.set_ylim(0.8, 1.01)
# ax.annotate("",
# xy=(1.5, 0.948),
# xytext=(1.5, 1),
# # xycoords="figure points",
# arrowprops=dict(arrowstyle="->", color="r",lw=2))
# ax.annotate("",
# xy=(2.5, 0.918),
# xytext=(2.5, 1),
# # xycoords="figure points",
# arrowprops=dict(arrowstyle="->", color="r",lw=2))
# ax.annotate("",
# xy=(3.5, 0.878),
# xytext=(3.5, 1),
# # xycoords="figure points",
# arrowprops=dict(arrowstyle="->", color="r",lw=2))
# ax.set_xticks(x + bar_width , tick_label,size=20,rotation = 360)
# ax.plot([0.26, 3.72], [1, 1], c='black', linestyle='--')
# plt.text(0.95, 0.952, '0.05',size=16)
# plt.text(1.95, 0.922, '0.08',size=16)
# plt.text(2.950, 0.882, '0.12',size=16)
# plt.yticks( size=16)#设置大小及加粗
# #plt.legend( ncol=3, bbox_to_anchor=(1.05, 1.25),prop=font1)
# plt.tight_layout()
# plt.savefig('break.svg',format='svg')
#
# plt.show()
###fig11
import pickle
# a=[ 1.037524309158325, 1.0208631420135497, 0.7765613842010497, 1.0389967823028563, 0.7668834972381591, 1.0376621150970458, 0.7630397129058837, 0.7806593227386474, 0.7653471279144286, 1.0404430294036864]
# b=[0.7714456367492675, 0.5470477771759032, 0.7850643444061278, 0.5076641273498534, 0.771291856765747, 0.5084878635406493, 0.508153600692749, 0.5092236232757568, 0.7893201160430907, 0.5089184474945068]
# c=[0.5169269275665282, 0.7661052989959716, 0.5230025482177734, 0.52890793800354, 0.509346170425415, 0.5087668132781982, 0.25586577415466305, 0.5218712520599365, 0.5129408073425292, 0.5102991294860839]
# # with open("rds.txt", "rb") as get_myprofile:
# # result = pickle.load(get_myprofile)
# # print(result)
# # max450=-1
# # for i in range(5):
# # for j in range(15):
# # if max450<result[i*5+j][39]:
# # print(i,j)
# # max450=max(max450,result[i*5+j][39])
# # print(result[1*5+10][37])
# #
# # a = np.linspace(min(a), max(a), 10)
# #
# #result=result[2:22]
# cro=[[0.864864864864865, 30.0], [0.7930283224400871, 30.0], [0.8217391304347826, 7.831060898053572], [0.9230769230769232, 7.05397657213317], [0.8401084010840109, 9.16279871323529], [0.9491525423728816, 5.184000000000001], [0.8484848484848485, 15.91666666666667], [0.9836065573770492, 5.647741935483872], [0.8307692307692308, 12.149999999999991], [1.0, 5.184000000000001], [0.946236559139785, 7.103225806451613], [0.92018779342723, 6.899396782841825], [0.9846153846153848, 7.845541401273877], [0.9, 5.646242774566474], [0.7796610169491527, 6.7125], [0.8441926345609065, 7.041144459102901], [0.7722007722007723, 9.937499999999991], [0.8503401360544217, 7.262537091988131], [0.8773584905660377, 9.203167191719167], [0.8671023965141612, 10.781999525053427], [0.6666666666666666, 7.01466257668713], [0.6171428571428571, 6.558209325396828], [0.7988980716253444, 6.310489510489511], [0.6018808777429467, 30.0], [0.6666666666666666, 15.67276422764226], [0.8196721311475409, 28.34756097560978], [0.7697478991596639, 22.73343373493969], [0.9042904290429042, 7.3940800200677295], [0.7326120556414218, 9.26322006178448], [0.6499102333931777, 14.711622487620152], [0.8520499108734403, 11.76930849384275], [0.8251121076233184, 14.868800268096525], [0.75, 13.758358208955231], [0.7635327635327636, 14.025280898876408], [0.8298368298368298, 10.41344], [0.8832630098452883, 6.431299780676444], [0.9127105666156202, 8.614123581336692], [0.8248587570621468, 7.103816793893135], [0.8596491228070176, 7.415443629086056], [0.8432563791008506, 6.636952380952383], [0.7971014492753624, 8.825756486739017], [0.894800483675937, 5.922608294240942], [0.851508120649652, 6.431239476145926], [0.862788144895719, 5.997601407668087], [0.8860759493670887, 9.33436606291707], [0.8861330326944759, 7.243212851405623], [0.8969181721572794, 15.872719491318165], [0.7886178861788617, 7.401472593981754], [0.7843866171003718, 16.18215309046255], [0.7996272134203168, 30.0], [0.8251207729468598, 11.70325379609544], [0.8636796949475691, 10.818181818181827], [0.8071833648393194, 8.867681540429146], [0.735655737704918, 12.164316702819916], [0.7643064985451018, 10.23149125242989], [0.8755439512619669, 6.2617744610281925], [0.8008800880088008, 5.910447761194028], [0.8840736728060672, 7.2666782743662175], [0.9282511210762332, 6.269986719787511], [0.8078048780487804, 7.00825049701789], [0.7952468007312614, 13.096836817811564], [0.7996530789245447, 6.865901898734177], [0.8530405405405407, 8.430656449326733], [0.8355263157894737, 7.402892757553278], [0.8294260307194825, 9.05403225806451], [0.8455821635012387, 6.02331546707504], [0.8776508972267537, 8.83099112426035], [0.8453947368421054, 12.352340425531906], [0.7789646672144618, 14.594357674803476], [0.8352745424292846, 16.008320441112318], [0.8113879003558719, 16.027777777777786], [0.6181818181818182, 14.630875576036887], [0.680327868852459, 13.777941176470565], [0.661111111111111, 30.0], [0.7534626038781163, 14.950247524752482], [0.694300518134715, 7.173103448275864], [0.9608938547486032, 7.474100176189277], [0.7874015748031497, 7.30052422782658], [0.8313953488372092, 7.5], [0.8827586206896552, 9.625533049040513], [0.8508771929824561, 8.295454545454547], [0.8142857142857144, 10.441935483870964], [0.8465608465608466, 7.629310344827587], [0.7948717948717949, 7.055076017655714], [0.8176795580110496, 8.928571428571423], [0.830188679245283, 10.39091633466137], [0.8869179600886917, 7.265985970381916], [0.8339622641509434, 7.118820678513733], [0.903896103896104, 9.494756879508415], [0.8175675675675675, 7.049144486692017], [0.6445783132530121, 11.599999999999994], [0.9102564102564102, 5.262998859749143], [0.9189189189189187, 5.463764705882355], [0.9148264984227128, 7.10625], [0.9423728813559322, 6.405213270142184], [0.9183673469387756, 7.444190600522191], [0.9019607843137254, 30.0], [0.9448275862068966, 6.362092238470193], [0.8571428571428572, 5.9042553191489375], [0.7777777777777778, 5.274308300395258]]
# fps=[16.067425195071632, 36.0, 49.50000000000001, 35.02054790677468, 49.50000000000001, 52.40355022271769, 45.0, 40.5, 36.0, 45.0, 46.6991719621837, 37.846842888911375, 40.5, 49.50000000000001, 58.71991135326696, 52.212977656855394, 49.50000000000001, 40.05265405899739, 45.0, 42.61961848783222, 52.08843679119408, 32.58617457689005, 52.18106171267546, 45.0, 46.17417208869901, 35.25909826440632, 45.0, 52.13185694285351, 45.947494649597196, 35.524955627232984, 32.1338879308839, 42.5510727023589, 57.93651767148435, 57.36188062434597, 49.50000000000001, 30.382202131705352, 45.37535464100555, 38.84400518741964, 53.9170036556524, 39.437501393940344, 38.44456368802797, 38.48693894772297, 34.84747169093234, 47.137564511013736, 38.62182515050953, 41.915521621744894, 40.9939940560606, 41.94691925109234, 40.76586372094486, 30.201606820246887, 42.4838945309465, 37.99186524557397, 38.800070788499916, 42.38685067222654, 30.4041157858297, 38.877669979657654, 45.0, 52.405863700320495, 36.0, 36.0, 38.656661451088866, 30.22169994814119, 38.101637481328915, 53.11972382109737, 42.42789809960801, 38.00050484882947, 52.3375059437987, 39.236987398524455, 42.488829408388874, 29.9132680182104, 30.593917621152254, 41.66649171673093, 38.700081052062984, 49.50000000000001, 52.99915035656215, 36.0, 42.65511655345495, 42.76081841659174, 47.40316610307626, 36.0, 34.39256204518436, 40.5, 45.0, 40.5, 46.840189981535836, 43.31970320160012, 40.5, 46.42057561414597, 47.76617489470945, 49.50000000000001, 46.79590862476905, 45.0, 42.600284574464155, 45.0, 40.5, 49.50000000000001, 49.50000000000001, 32.625252625141655]
# acc1=[0.656, 0.625, 0.771, 0.779, 0.736, 0.816, 0.769, 0.782, 0.867, 0.838, 0.784, 0.783, 0.637, 0.781, 0.738, 0.738, 0.736, 0.803, 0.85, 0.854, 0.686, 0.567, 0.496, 0.643, 0.568, 0.751, 0.63, 0.683, 0.629, 0.673, 0.855, 0.785, 0.847, 0.81, 0.853, 0.956, 0.87, 0.846, 0.873, 0.883, 0.872, 0.938, 0.873, 0.923, 0.933, 0.853, 0.838, 0.835, 0.874, 0.869, 0.903, 0.92, 0.893, 0.932, 0.887, 0.909, 0.82, 0.773, 0.807, 0.823, 0.826, 0.801, 0.85, 0.877, 0.783, 0.854, 0.866, 0.875, 0.855, 0.859, 0.858, 0.662, 0.617, 0.669, 0.733, 0.758, 0.855, 0.888, 0.806, 0.789, 0.822, 0.806, 0.684, 0.82, 0.905, 0.945, 0.854, 0.823, 0.733, 0.87, 0.621, 0.688, 0.818, 0.862, 0.826, 0.814, 0.778, 0.714]
# acc=[0.803, 0.792, 0.865, 0.826, 0.808, 0.713, 0.606, 0.722, 0.727, 0.714, 0.96, 0.916, 0.88, 0.942, 0.946, 0.788, 0.824, 0.91, 0.837, 0.889, 0.733, 0.751, 0.718, 0.725, 0.646, 0.803, 0.753, 0.784, 0.753, 0.769, 0.823, 0.853, 0.853, 0.872, 0.864, 0.961, 0.951, 0.925, 0.941, 0.936, 0.957, 0.949, 0.961, 0.965, 0.947, 0.901, 0.929, 0.898, 0.858, 0.871, 0.903, 0.91, 0.948, 0.907, 0.93, 0.924, 0.826, 0.899, 0.906, 0.867, 0.817, 0.825, 0.832, 0.869, 0.834, 0.858, 0.894, 0.897, 0.854, 0.796, 0.844, 0.72, 0.778, 0.788, 0.859, 0.8, 0.941, 0.837, 0.85, 0.781, 0.85, 0.811, 0.89, 0.801, 0.876, 0.944, 0.967, 0.956, 0.931, 0.847, 0.829, 0.751, 0.927, 0.948, 0.911, 0.803, 0.812, 0.839]
# acc[:20]=acc1[:20]
# idx = np.arange(len(acc))
# n=0
#
# # #create integers from strings
# # # idx = range(len(result))
# # print((idx))
# # xnew = np.linspace(min(idx), max(idx), 300)
# # from scipy.interpolate import make_interp_spline
# # # interpolation
# # spl = make_interp_spline(idx, result, k=3)
# # smooth = spl(xnew)
# #plt.plot(result,color='r', linestyle='--',label='dataset 2',linewidth=2.0)
# # with open("rd5.txt", "rb") as get_myprofile:
# # result = pickle.load(get_myprofile)
# # result = result[2:22]
# plt.figure(figsize=(9,3))
# plt.plot(idx,fps,color='#D61C4E', linestyle='-',label='AccDecoder',linewidth=3.0,zorder=10)
# # with open("rd4.txt", "rb") as get_myprofile:
# # result = pickle.load(get_myprofile)
# # result = result[2:22]
# result1=[1.5299364130245858, 2.792273007787041, 2.6276195041689294, 2.6502938596792385, 2.748461823711862, 3.726005252629246, 3.726580066338505, 3.740004750311845, 3.8632970915276226, 3.764515535504061, 2.9754687755792966, 3.0196534667234527, 3.0486958611320105, 3.0723916249187915, 2.978232290441384, 2.6954824892773863, 2.6866465345764516, 2.545511939552054, 2.5518379293540945, 2.447077994772905, 3.18141689613457, 3.140789422711728, 3.122383034882248, 3.1000718468786865, 3.033194365793023, 2.5077409580139687, 2.6396966922604843, 2.7475280699413784, 2.48176991845821, 2.5491671804676717, 2.656660398497624, 2.5459332938150787, 2.628561979159116, 2.548348739275489, 2.5795297355048192, 3.1758620078685604, 3.0349755215199195, 2.9599747825227825, 3.210217251817448, 3.1032147339485876, 3.0459050119297775, 3.186207733739649, 3.078205183686812, 2.949745299913811, 2.879746084400197, 2.241098823264389, 2.2488633179106783, 2.374665727085344, 2.3073844925293803, 2.2359263727378766, 2.166461993718542, 2.2151062997039186, 2.355783894304825, 2.3880543535068623, 2.3140397319888133, 2.380779634627332, 2.2498067902551058, 2.2298020704113086, 2.268577349923986, 2.146530464833459, 2.0086335931384354, 2.064662877886159, 2.1023161644649946, 2.0207895944876624, 1.9603766211604654, 1.9777912436252212, 2.0390655806029074, 2.0539396766283358, 2.0210781469633967, 1.973952430723794, 2.24471203655729, 2.750722526056682, 2.727711172668642, 2.7092862938975864, 2.79598308879476, 2.7128195168797498, 3.1173387853491734, 3.1206714269618523, 3.2095057742302613, 3.102112377524811, 3.0768963667500278, 3.0835372171062105, 2.9667944694490065, 2.970096188310561, 2.805018278111114, 2.9673703476717384, 2.930214530556462, 2.9653074977981557, 3.18270715836392, 3.224412946071361, 2.704393728092468, 2.668913068801891, 2.6619383417317657, 2.775884487629976, 2.7656185515200664, 2.631948437964387, 2.6910855750024782, 2.8385784160910417]
# result=[0.549, 0.598, 0.703, 0.644, 0.627, 0.623, 0.5, 0.505, 0.498, 0.402, 0.682, 0.7, 0.562, 0.574, 0.531, 0.541, 0.505, 0.539, 0.611, 0.595, 0.401, 0.472, 0.44, 0.417, 0.436, 0.551, 0.52, 0.537, 0.588, 0.563, 0.611, 0.592, 0.585, 0.609, 0.575, 0.935, 0.907, 0.878, 0.834, 0.914, 0.891, 0.919, 0.927, 0.93, 0.914, 0.752, 0.724, 0.673, 0.728, 0.769, 0.784, 0.809, 0.774, 0.818, 0.808, 0.801, 0.691, 0.66, 0.709, 0.711, 0.743, 0.755, 0.733, 0.753, 0.721, 0.739, 0.77, 0.779, 0.782, 0.809, 0.777, 0.486, 0.441, 0.496, 0.548, 0.579, 0.818, 0.835, 0.659, 0.657, 0.57, 0.683, 0.686, 0.697, 0.812, 0.868, 0.865, 0.837, 0.88, 0.844, 0.664, 0.559, 0.572, 0.543, 0.575, 0.579, 0.615, 0.601]
#
# plt.plot(result1,color='#7A86B6', linestyle='--',label='DDS',linewidth=3.0)
# # with open("rd3.txt", "rb") as get_myprofile:
# # result = pickle.load(get_myprofile)
# # result = result[2:22]
# fps=[26.39655736305094, 49.50000000000001, 46.51048634540449, 49.30615105883378, 36.0, 45.0, 49.50000000000001, 45.0, 40.5, 36.0, 36.0, 40.5, 45.0, 49.50000000000001, 40.5, 58.06654576976233, 40.5, 46.428912262849295, 40.5, 49.50000000000001, 57.21879202141004, 54.35577472307389, 45.0, 49.48787186661471, 58.35926024484661, 50.99698733484224, 36.0, 36.0, 49.50000000000001, 51.11453041532847, 49.759406859609385, 40.5, 45.0, 59.89594683201966, 49.50000000000001, 57.21187171509123, 49.50000000000001, 49.50000000000001, 40.5, 40.5, 45.0, 40.5, 36.0, 40.5, 40.5, 36.0, 40.5, 36.0, 40.5, 45.0, 45.0, 40.5, 49.50000000000001, 45.0, 40.5, 49.50000000000001, 38.640386093335366, 36.0, 59.46389289176989, 45.0, 36.0, 36.0, 40.5, 49.50000000000001, 36.0, 45.0, 36.0, 45.0, 49.50000000000001, 44.16236187464277, 55.40574319440283, 57.0329947723272, 49.50000000000001, 57.79187863141113, 58.53349419465368, 36.0, 58.25246062466295, 50.561309602930805, 56.80384850638555, 58.91189939359693, 49.50000000000001, 57.723028193164545, 49.80490337314111, 34.873492976662355, 57.78651741245825, 45.0, 57.141411227528884, 51.50755729176175, 51.824624212215305, 59.098445707992205, 45.0, 50.68905857960714, 36.0, 49.50000000000001, 40.5, 50.68873186806705, 57.510990649761816, 49.50000000000001]
# acc=[0.49, 0.565, 0.689, 0.612, 0.427, 0.194, 0.538, 0.522, 0.566, 0.554, 0.256, 0.414, 0.539, 0.452, 0.485, 0.711, 0.657, 0.642, 0.667, 0.612, 0.368, 0.516, 0.377, 0.525, 0.55, 0.576, 0.432, 0.603, 0.547, 0.599, 0.684, 0.685, 0.684, 0.713, 0.65, 0.756, 0.677, 0.738, 0.747, 0.702, 0.697, 0.711, 0.654, 0.697, 0.718, 0.721, 0.661, 0.74, 0.731, 0.67, 0.752, 0.769, 0.711, 0.703, 0.694, 0.693, 0.706, 0.697, 0.692, 0.696, 0.707, 0.687, 0.709, 0.675, 0.706, 0.69, 0.737, 0.675, 0.726, 0.855, 0.617, 0.613, 0.567, 0.621, 0.687, 0.733, 0.683, 0.719, 0.729, 0.646, 0.643, 0.696, 0.711, 0.723, 0.661, 0.728, 0.777, 0.656, 0.728, 0.767, 0.437, 0.69, 0.801, 0.745, 0.724, 0.653, 0.726, 0.626]
#
# plt.plot(idx,fps,color='#76BA99', linestyle='--',label='Reducto',linewidth=3.0)
# # with open("rd2.txt", "rb") as get_myprofile:
# # result = pickle.load(get_myprofile)
# # result = result[2:22]
# fps=[3.437340918064097, 2.3140287526014154, 2.2330803845880065, 4.817335822760618, 4.025252131842245, 3.171798918389595, 8.36283096734831, 13.47972194491155, 15.471878376389428, 15.474070267257003, 7.44743625703429, 6.834282560970179, 13.759732374996938, 11.51730871481844, 3.9305995519778647, 6.868886918104368, 9.837835251423614, 5.879996758806108, 4.391984284663166, 6.365807678817436, 8.580030189534554, 6.392865059509236, 15.55343829433348, 8.971021039519254, 3.943259041934595, 4.297508670727521, 2.97670925766602, 1.5212299932314888, 2.379352709048057, 3.4085952897179976, 7.612762910780796, 5.769148452511273, 8.305599622545712, 7.555207650777523, 4.972499706876146, 3.4717921194541024, 3.300496620278841, 4.093234135605895, 3.1637107692909576, 2.8215292145012234, 2.991264983975832, 2.86033825151435, 2.5451666062177787, 2.894527182130592, 2.7233473750939994, 3.4676568531815017, 3.9806525582554526, 3.850141164670493, 2.28230903743383, 2.6367611754727065, 2.7440477104324, 3.1833843328579854, 2.874518147044728, 2.7200684935460124, 3.156771491547455, 2.964490047131551, 13.01384598916212, 12.713800576939594, 13.656963928127595, 6.960524593675221, 4.29475883871339, 3.7768449242081914, 3.673360824615864, 3.014706518316417, 2.821509791187307, 3.697787307123323, 3.4727569105323743, 3.740250327136715, 2.544661518418216, 2.7926170704645044, 3.6715175895021455, 8.143519022786416, 3.81997346734674, 5.461117875167164, 4.194670054873456, 2.6368447767916137, 4.794109228044718, 4.395950805951495, 4.294548349638545, 6.690710428887481, 4.728064855239905, 5.238413161443794, 8.025390080502566, 6.792439507971955, 5.010054620448978, 3.795882366463074, 4.627940310149567, 4.38806561952872, 4.867369161799747, 3.5424251522672114, 9.596760126986547, 10.460546595855124, 12.80735187648916, 3.543638368485432, 3.089266783928521, 6.228727420457684, 5.050040013709813, 5.980820269318938, 11.309436637276429, 5.226778256234388]
# acc=[0.903914590747331, 0.8948787061994609, 0.8183807439824946, 0.6422764227642276, 0.809651474530831, 0.4197530864197531, 0.2388059701492537, 0.064516129032258, 0.0666666666666666, 0.125, 0.1168831168831168, 0.2057142857142857, 0.1964285714285714, 0.163265306122449, 0.3225806451612903, 0.2489270386266094, 0.0919540229885057, 0.6209677419354839, 0.2734584450402144, 0.1564245810055866, 0.3687150837988826, 0.4636363636363637, 0.0606060606060606, 0.0957446808510638, 0.3831775700934579, 0.8183632734530939, 0.8635514018691588, 0.8727272727272727, 0.9240710823909531, 0.8075601374570447, 0.1085714285714285, 0.1461988304093567, 0.1779359430604982, 0.1145374449339206, 0.136518771331058, 0.903522205206738, 0.8628099173553718, 0.9535603715170278, 0.8411552346570398, 0.8681948424068768, 0.9519890260631002, 0.9607577807848444, 0.8453333333333333, 0.8688118811881187, 0.9593495934959348, 0.7174515235457065, 0.5980528511821975, 0.735897435897436, 0.8, 0.8396226415094339, 0.7943444730077122, 0.684863523573201, 0.7092731829573935, 0.7768187422934648, 0.8523862375138734, 0.8356909684439608, 0.208955223880597, 0.2763157894736842, 0.3867403314917126, 0.5956873315363881, 0.7281921618204805, 0.7592997811816192, 0.7144432194046307, 0.7428571428571429, 0.6803519061583578, 0.7555555555555555, 0.7093922651933702, 0.7170626349892009, 0.7542857142857142, 0.8170377541142304, 0.8223776223776224, 0.3333333333333333, 0.7303370786516855, 0.7471264367816092, 0.6933333333333334, 0.7149321266968325, 0.6254071661237786, 0.7173252279635258, 0.5432098765432098, 0.4923076923076923, 0.4894514767932489, 0.3318777292576419, 0.2866449511400651, 0.3940298507462686, 0.5132743362831859, 0.690909090909091, 0.386046511627907, 0.6592427616926504, 0.4220183486238532, 0.3227848101265823, 0.125, 0.1019108280254777, 0.2484472049689441, 0.4285714285714285, 0.4313725490196079, 0.4203821656050955, 0.3419689119170984, 0.3957219251336898, 0.3111111111111111, 0.560344827586207]
#
# plt.plot(idx,fps[:98],color='#DF7861', linestyle='--',label='Glimpse',linewidth=3.0, alpha=0.8)
# fps=[30.0, 30.0, 7.831060898053572, 7.05397657213317, 9.16279871323529, 5.184000000000001, 15.91666666666667, 5.647741935483872, 12.149999999999991, 5.184000000000001, 7.103225806451613, 6.899396782841825, 7.845541401273877, 5.646242774566474, 6.7125, 7.041144459102901, 9.937499999999991, 7.262537091988131, 9.203167191719167, 10.781999525053427, 7.01466257668713, 6.558209325396828, 6.310489510489511, 30.0, 15.67276422764226, 28.34756097560978, 22.73343373493969, 7.3940800200677295, 9.26322006178448, 14.711622487620152, 11.76930849384275, 14.868800268096525, 13.758358208955231, 14.025280898876408, 10.41344, 6.431299780676444, 8.614123581336692, 7.103816793893135, 7.415443629086056, 6.636952380952383, 8.825756486739017, 5.922608294240942, 6.431239476145926, 5.997601407668087, 9.33436606291707, 7.243212851405623, 15.872719491318165, 7.401472593981754, 16.18215309046255, 30.0, 11.70325379609544, 10.818181818181827, 8.867681540429146, 12.164316702819916, 10.23149125242989, 6.2617744610281925, 5.910447761194028, 7.2666782743662175, 6.269986719787511, 7.00825049701789, 13.096836817811564, 6.865901898734177, 8.430656449326733, 7.402892757553278, 9.05403225806451, 6.02331546707504, 8.83099112426035, 12.352340425531906, 14.594357674803476, 16.008320441112318, 16.027777777777786, 14.630875576036887, 13.777941176470565, 30.0, 14.950247524752482, 7.173103448275864, 7.474100176189277, 7.30052422782658, 7.5, 9.625533049040513, 8.295454545454547, 10.441935483870964, 7.629310344827587, 7.055076017655714, 8.928571428571423, 10.39091633466137, 7.265985970381916, 7.118820678513733, 9.494756879508415, 7.049144486692017, 11.599999999999994, 5.262998859749143, 5.463764705882355, 7.10625, 6.405213270142184, 7.444190600522191, 30.0, 6.362092238470193, 5.9042553191489375, 5.274308300395258]
# acc=[0.6216216216216216, 0.6666666666666666, 0.6959459459459459, 0.7236842105263157, 0.695364238410596, 0.7027027027027026, 0.7133333333333333, 0.7361563517915309, 0.5734939759036145, 0.5666666666666667, 0.5851318944844125, 0.5929411764705882, 0.6189376443418014, 0.5943396226415094, 0.6070588235294118, 0.6218097447795824, 0.6651685393258427, 0.7191011235955057, 0.7212389380530972, 0.753880266075388, 0.7494553376906318, 0.73568281938326, 0.7505518763796909, 0.7586206896551724, 0.7823343848580441, 0.7278688524590164, 0.794701986754967, 0.8231511254019293, 0.8115015974440895, 0.7766990291262137, 0.802588996763754, 0.8038585209003215, 0.6366366366366366, 0.6492753623188405, 0.6724137931034483, 0.6761363636363635, 0.6923076923076923, 0.6816901408450704, 0.6912181303116148, 0.7127071823204421, 0.2368421052631578, 0.3376623376623376, 0.263157894736842, 0.3846153846153846, 0.3076923076923077, 0.3544303797468354, 0.379746835443038, 0.35, 0.1917808219178082, 0.2531645569620253, 0.32, 0.24, 0.2105263157894737, 0.2307692307692307, 0.2337662337662337, 0.2564102564102564, 0.3999999999999999, 0.3913043478260869, 0.3636363636363636, 0.3111111111111111, 0.4444444444444445, 0.4090909090909091, 0.3636363636363636, 0.4090909090909091, 0.9285714285714286, 0.9473684210526316, 0.9473684210526316, 0.9655172413793104, 0.8571428571428572, 0.9310344827586208, 0.9310344827586208, 0.9310344827586208, 0.711864406779661, 0.7586206896551724, 0.6551724137931035, 0.711864406779661, 0.7666666666666667, 0.7796610169491527, 0.7457627118644068, 0.7666666666666667, 0.8654970760233919, 0.9540229885057472, 0.8361581920903955, 0.903954802259887, 0.8961748633879781, 0.9378531073446328, 0.9265536723163842, 0.9010989010989012, 0.8325358851674641, 0.8229665071770336, 0.796116504854369, 0.8516746411483254, 0.8325358851674641, 0.8490566037735849, 0.8530805687203792, 0.8411214953271028, 0.7971014492753623, 0.8285714285714286, 0.8405797101449275, 0.8591549295774646, 0.8767123287671232, 0.8591549295774646, 0.8591549295774646, 0.8827586206896553, 0.6666666666666666, 0.7704918032786884, 0.7768595041322314, 0.7419354838709677, 0.761904761904762, 0.7741935483870969, 0.7580645161290323, 0.7936507936507938, 0.6842105263157895, 0.7413793103448276, 0.689655172413793, 0.6949152542372882, 0.711864406779661, 0.7457627118644068, 0.728813559322034, 0.7333333333333333, 0.4767801857585139, 0.455128205128205, 0.4746835443037974, 0.4858044164037855, 0.4764890282131661, 0.4634920634920635, 0.464968152866242, 0.457680250783699, 0.6964285714285714, 0.7142857142857143, 0.7551867219917012, 0.7094017094017094, 0.721311475409836, 0.7272727272727272, 0.7226890756302522, 0.7265306122448979, 0.6102941176470588, 0.6859205776173285, 0.6472727272727272, 0.6642335766423358, 0.6323529411764706, 0.6928571428571428, 0.683453237410072, 0.6950354609929078, 0.5435897435897435, 0.6308068459657702, 0.6633906633906633, 0.6267942583732058, 0.6507177033492824, 0.6394230769230769, 0.6298076923076923, 0.6492890995260663, 0.4086021505376344, 0.4933333333333333, 0.4385964912280701, 0.4774193548387097, 0.4978723404255319, 0.5098901098901099, 0.5054466230936819, 0.4892703862660943, 0.6968641114982578, 0.7482517482517481, 0.7108013937282229, 0.7422680412371135, 0.7432432432432432, 0.7517241379310347, 0.7465753424657535, 0.7583892617449665, 0.8787878787878789, 0.8787878787878789, 0.8685015290519876, 0.8682634730538922, 0.8749999999999999, 0.874251497005988, 0.8682634730538922, 0.8731563421828908, 0.6294117647058824, 0.5906432748538011, 0.5797101449275361, 0.6149425287356322, 0.5988700564971752, 0.6011560693641619, 0.5994236311239194, 0.6118980169971672, 0.6956521739130435, 0.6749226006191951, 0.6791277258566978, 0.691358024691358, 0.6953846153846155, 0.6871165644171779, 0.6871165644171779, 0.696969696969697, 0.5619335347432024, 0.5492537313432836, 0.5865102639296188, 0.5913043478260871, 0.6136363636363636, 0.5830903790087464, 0.5855072463768116, 0.5982905982905984, 0.6562500000000001, 0.6345381526104418, 0.6744639376218324, 0.6602316602316604, 0.6679611650485437, 0.6561264822134387, 0.6601178781925344, 0.6769825918762089, 0.6421663442940038, 0.6578449905482041, 0.6058252427184466, 0.649056603773585, 0.6439393939393939, 0.6654205607476635, 0.6616822429906541, 0.6593001841620626, 0.620183486238532, 0.575591985428051, 0.5974025974025975, 0.6473779385171791, 0.6151079136690647, 0.6086956521739131, 0.631578947368421, 0.6227758007117439, 0.5511265164644713, 0.5289256198347108, 0.5389830508474578, 0.5794701986754967, 0.5757071547420964, 0.5606557377049181, 0.5700164744645798, 0.5774877650897228, 0.5081433224755701, 0.4926108374384237, 0.4925124792013311, 0.5278688524590164, 0.523274478330658, 0.5169628432956381, 0.5179153094462541, 0.5352564102564102, 0.5049701789264414, 0.5009560229445507, 0.5576923076923076, 0.5725190839694657, 0.574108818011257, 0.5633270321361058, 0.5746691871455577, 0.5906542056074766, 0.6945812807881774, 0.6733167082294264, 0.7254901960784315, 0.7438423645320198, 0.762589928057554, 0.7352941176470589, 0.7432762836185819, 0.7511961722488039, 0.532051282051282, 0.5569620253164557, 0.5534591194968553, 0.611111111111111, 0.5696594427244581, 0.588235294117647, 0.5962732919254659, 0.6060606060606061, 0.4522968197879858, 0.4912280701754385, 0.5379310344827587, 0.552901023890785, 0.5085910652920962, 0.5384615384615385, 0.5555555555555556, 0.5685618729096991, 0.4708994708994709, 0.4479166666666666, 0.489795918367347, 0.50126582278481, 0.4668304668304668, 0.4720812182741116, 0.4810126582278481, 0.4851485148514851, 0.6950354609929078, 0.6858789625360231, 0.7155172413793104, 0.7104136947218259, 0.7032348804500703, 0.7138810198300284, 0.7159090909090909, 0.7315716272600834, 0.6761453396524487, 0.7378335949764522, 0.7171561051004637, 0.7239263803680982, 0.736842105263158, 0.7320061255742726, 0.7320061255742726, 0.7417417417417418, 0.6647727272727273, 0.661849710982659, 0.667621776504298, 0.699438202247191, 0.6740947075208914, 0.6789250353606789, 0.6874115983026874, 0.6926286509040334, 0.593192868719611, 0.629746835443038, 0.5768621236133122, 0.6469673405909798, 0.603125, 0.6386292834890965, 0.6448598130841122, 0.6390168970814132, 0.613607188703466, 0.648508430609598, 0.6279069767441862, 0.6512226512226512, 0.6531645569620254, 0.6624203821656051, 0.6649616368286444, 0.6608260325406757, 0.5765765765765766, 0.5523329129886507, 0.5372005044136191, 0.5895522388059702, 0.5906862745098039, 0.5685785536159601, 0.5785536159600997, 0.5857843137254902, 0.6599496221662469, 0.6363636363636364, 0.6384615384615385, 0.6649746192893401, 0.6339622641509434, 0.6471337579617834, 0.6590330788804071, 0.6666666666666666, 0.5985401459854014, 0.6245443499392467, 0.5898058252427184, 0.6214285714285714, 0.6121495327102804, 0.6188769414575866, 0.6157517899761337, 0.6094117647058823, 0.7114093959731543, 0.71824480369515, 0.7272727272727272, 0.7268623024830699, 0.731924360400445, 0.7278911564625851, 0.7285067873303167, 0.734739178690344, 0.638157894736842, 0.6703176341730559, 0.6536373507057546, 0.6809881847475833, 0.6759956942949407, 0.6767241379310345, 0.6774193548387096, 0.6885593220338982, 0.6659316427783903, 0.6659167604049494, 0.6733556298773691, 0.6710963455149502, 0.6811751904243744, 0.681367144432194, 0.6828729281767956, 0.6883116883116883, 0.677309007981756, 0.7044444444444443, 0.7160493827160495, 0.7202643171806168, 0.734341252699784, 0.7199124726477023, 0.7171052631578948, 0.7486515641855448, 0.5540106951871657, 0.5925133689839572, 0.569280343716434, 0.5793397231096913, 0.5796178343949043, 0.6002120890774125, 0.5902335456475584, 0.5932914046121593, 0.6020066889632106, 0.6419213973799127, 0.6512651265126513, 0.6537216828478964, 0.6503719447396387, 0.6595059076262084, 0.6602150537634408, 0.6588735387885228, 0.6512141280353201, 0.6666666666666667, 0.6428571428571428, 0.6790393013100436, 0.6745182012847966, 0.6803455723542117, 0.683982683982684, 0.6830309498399146, 0.7337962962962962, 0.7918088737201366, 0.7615819209039547, 0.7600896860986547, 0.7651006711409395, 0.7879464285714286, 0.7740492170022372, 0.7815587266739845, 0.7438524590163934, 0.7442348008385745, 0.7497403946002077, 0.7603305785123966, 0.7542972699696663, 0.7613168724279836, 0.7644628099173554, 0.7696969696969698, 0.631578947368421, 0.6750788643533122, 0.6680805938494166, 0.6639089968976215, 0.671414038657172, 0.6728778467908902, 0.6749482401656315, 0.6802443991853361, 0.6948453608247422, 0.6793650793650793, 0.698744769874477, 0.7195876288659794, 0.7016460905349794, 0.7018633540372671, 0.7162022703818369, 0.7182095625635808, 0.7159209157127993, 0.7603640040444893, 0.7296747967479675, 0.7597989949748742, 0.766798418972332, 0.7652347652347652, 0.7680000000000001, 0.7724137931034484, 0.7561697926949653, 0.7593152064451157, 0.6906906906906907, 0.7492566897918731, 0.7538759689922481, 0.7643564356435644, 0.7638888888888888, 0.7502429543245869, 0.7142857142857143, 0.7086614173228347, 0.6460481099656358, 0.7101769911504425, 0.6741573033707865, 0.7163515016685207, 0.7147613762486127, 0.7062706270627063, 0.6203703703703703, 0.6558891454965358, 0.6682297772567409, 0.6420323325635103, 0.6734693877551021, 0.6712485681557847, 0.6605293440736479, 0.680225988700565, 0.7180667433831991, 0.7369614512471656, 0.7368421052631579, 0.7480577136514983, 0.7464635473340587, 0.7511111111111112, 0.7458379578246392, 0.7521739130434782, 0.6679139382600561, 0.6361031518624641, 0.6296650717703348, 0.6741784037558685, 0.647887323943662, 0.6585365853658536, 0.6622765757290686, 0.6697588126159555, 0.5768463073852296, 0.5728542914171656, 0.5694716242661447, 0.6075949367088608, 0.6091954022988506, 0.5901960784313725, 0.599609375, 0.6011450381679388, 0.6585577758470894, 0.6427947598253276, 0.6385964912280702, 0.6557377049180327, 0.6638297872340425, 0.6626402070750647, 0.6649395509499136, 0.668936170212766, 0.7289211242067088, 0.7001763668430334, 0.7213403880070547, 0.7322970639032815, 0.7376623376623376, 0.7283737024221454, 0.7305699481865285, 0.7385398981324279, 0.7225386493083807, 0.6766169154228856, 0.6882793017456358, 0.7106764466177669, 0.7080350039777247, 0.6971428571428572, 0.7057864710676448, 0.7040898155573376, 0.704412989175687, 0.6639141205615194, 0.669407894736842, 0.6978998384491114, 0.7210776545166404, 0.7006472491909385, 0.7081649151172191, 0.7137192704203014, 0.7358803986710964, 0.6952054794520548, 0.7019064124783362, 0.7290969899665551, 0.6955046649703138, 0.718381112984823, 0.7367535744322959, 0.7230514096185738, 0.676056338028169, 0.6810344827586207, 0.679343128781331, 0.6966864910790146, 0.696893366918556, 0.6949872557349193, 0.6949872557349193, 0.6917922948073701, 0.685025817555938, 0.6631762652705061, 0.653516295025729, 0.6666666666666666, 0.6756529064869419, 0.6809605488850772, 0.6723842195540308, 0.6779089376053964, 0.6501706484641638, 0.6387959866220735, 0.5883333333333333, 0.6480721903199345, 0.6065573770491803, 0.6530278232405893, 0.6617526617526617, 0.6462530217566478, 0.6611570247933883, 0.6068734283319364, 0.6244796003330557, 0.6492659053833606, 0.6623586429725363, 0.6380165289256199, 0.6463815789473685, 0.6639806607574537, 0.5738095238095238, 0.6265895953757226, 0.6417736289381564, 0.644870349492672, 0.6629464285714285, 0.6750861079219288, 0.6720368239355581, 0.6606942889137737, 0.3625730994152046, 0.4049079754601227, 0.339622641509434, 0.3272727272727272, 0.3292682926829268, 0.3680981595092024, 0.3580246913580246, 0.3414634146341463, 0.1913043478260869, 0.2564102564102564, 0.148471615720524, 0.2042553191489361, 0.209205020920502, 0.2278481012658228, 0.211864406779661, 0.2100840336134453, 0.4341085271317829, 0.3548387096774194, 0.3798449612403101, 0.4263565891472868, 0.4436090225563909, 0.4, 0.4357976653696497, 0.4318181818181818, 0.4180064308681672, 0.50814332247557, 0.4444444444444444, 0.463949843260188, 0.4672897196261681, 0.498442367601246, 0.4890282131661442, 0.4817073170731707, 0.5402298850574713, 0.5123456790123457, 0.4864864864864864, 0.5606936416184971, 0.5072886297376094, 0.503030303030303, 0.5119047619047619, 0.5043988269794721, 0.4686468646864686, 0.4672897196261682, 0.463949843260188, 0.5279503105590062, 0.5272727272727273, 0.4969325153374234, 0.5123456790123456, 0.5301204819277109, 0.488235294117647, 0.4705882352941176, 0.4730538922155688, 0.4764705882352941, 0.4869565217391304, 0.4869565217391304, 0.47953216374269, 0.4885057471264368, 0.5098039215686274, 0.548148148148148, 0.5338345864661653, 0.50187265917603, 0.5309090909090909, 0.5309090909090909, 0.5333333333333333, 0.5035971223021583, 0.6209677419354839, 0.5785123966942148, 0.54251012145749, 0.5826771653543307, 0.5680933852140077, 0.5645161290322581, 0.576, 0.5703125, 0.48, 0.4277456647398844, 0.4656084656084656, 0.4842105263157895, 0.4766839378238342, 0.4782608695652174, 0.4919786096256685, 0.4974093264248704, 0.7632850241545894, 0.5963302752293578, 0.6542056074766355, 0.7004608294930875, 0.7000000000000001, 0.6181818181818182, 0.6484018264840182, 0.6696428571428572, 0.5307443365695793, 0.501547987616099, 0.5449101796407185, 0.5308641975308642, 0.5481049562682216, 0.5240963855421686, 0.5227963525835867, 0.5368731563421828, 0.5977653631284916, 0.6114285714285715, 0.5875706214689265, 0.6333333333333333, 0.5819209039548023, 0.6062322946175638, 0.6197183098591549, 0.6115702479338844, 0.4666666666666667, 0.523076923076923, 0.5460122699386504, 0.5178571428571427, 0.5773809523809523, 0.5515151515151515, 0.5373134328358209, 0.5830903790087463, 0.5706806282722513, 0.5386666666666666, 0.5440414507772021, 0.5412371134020618, 0.535, 0.5326370757180157, 0.5440414507772021, 0.564885496183206, 0.6445012787723785, 0.6157760814249363, 0.6361323155216285, 0.6732673267326732, 0.6567901234567902, 0.6334164588528679, 0.6449999999999999, 0.6634146341463415, 0.6125290023201856, 0.5862884160756501, 0.5789473684210525, 0.6060606060606061, 0.6195899772209567, 0.5893271461716938, 0.5953488372093023, 0.5799086757990868, 0.4489795918367346, 0.4516129032258065, 0.4177215189873418, 0.4585987261146497, 0.5, 0.4698412698412698, 0.4792332268370607, 0.4676923076923077, 0.4981412639405204, 0.4705882352941176, 0.460377358490566, 0.4794007490636704, 0.4868913857677902, 0.480916030534351, 0.4714828897338403, 0.4744525547445256, 0.4838709677419355, 0.5, 0.5358255451713395, 0.5046153846153846, 0.5212121212121211, 0.50625, 0.5046728971962616, 0.5137614678899084, 0.5072463768115941, 0.5461254612546125, 0.5201465201465202, 0.5507246376811593, 0.5591397849462365, 0.5527272727272726, 0.5507246376811593, 0.5591397849462365, 0.473469387755102, 0.5228215767634855, 0.5166666666666666, 0.5657370517928287, 0.5668016194331984, 0.5528455284552846, 0.5609756097560975, 0.5612648221343873, 0.5144927536231882, 0.4779411764705882, 0.4779411764705882, 0.5144927536231882, 0.5089605734767024, 0.4927536231884059, 0.5072463768115941, 0.5071428571428571, 0.6196078431372549, 0.6409266409266409, 0.6718146718146718, 0.6615969581749049, 0.6666666666666667, 0.6463878326996197, 0.6539923954372623, 0.6741573033707865, 0.7480314960629921, 0.7857142857142857, 0.7903225806451613, 0.7952755905511811, 0.782608695652174, 0.7843137254901961, 0.7874015748031497, 0.7906976744186047, 0.6688524590163936, 0.6950819672131147, 0.7124183006535947, 0.6945337620578778, 0.7412140575079873, 0.7096774193548389, 0.7055016181229774, 0.7238095238095238, 0.6275862068965518, 0.6456140350877192, 0.6549295774647887, 0.6503496503496504, 0.673469387755102, 0.6643598615916955, 0.662020905923345, 0.6757679180887374, 0.7931034482758621, 0.7465753424657534, 0.7661016949152543, 0.7733333333333334, 0.7840531561461793, 0.7718120805369127, 0.7759197324414716, 0.7934426229508197, 0.6328358208955225, 0.6219512195121952, 0.6238532110091743, 0.6208955223880597, 0.6390532544378699, 0.6325301204819277, 0.6246246246246246, 0.6390532544378699]
#
# plt.plot(idx,fps[:98],color='#3F3351', linestyle='--',label='Awstream',linewidth=3.0, alpha=0.8)
# # x_major_locator=MultipleLocator(5)
# # #把x轴的刻度间隔设置为1,并存在变量里
# # #y_major_locator=MultipleLocator(10)
# # #把y轴的刻度间隔设置为10,并存在变量里
# # ax=plt.gca()
# # #ax为两条坐标轴的实例
# # ax.xaxis.set_major_locator(x_major_locator)
# # spl = make_interp_spline(idx, b, k=3)
# # smooth = spl(xnew)
# # plt.plot(xnew,smooth,color='r', linestyle='--',label='dataset 2',linewidth=3.0)
# # spl = make_interp_spline(idx, c, k=3)
# # smooth = spl(xnew)
# # plt.plot(xnew,smooth,color='g', linestyle='--',label='dataset 2',linewidth=3.0)
#
# plt.ylim(0,60)
# plt.xlim(0,100)
# plt.yticks( size=15)#设置大小及加粗
# plt.xticks( size=15)
# plt.axhline(30, color='black')
# #plt.legend(loc="best",prop=font1)
# plt.legend( ncol=1,handlelength=1.3,handleheight=1, bbox_to_anchor=(1, 0.9),labelspacing=0.25,frameon=False,prop=font1)
# plt.xlabel("Chunk Index",font2)
# plt.ylabel("FPS",font2)
# plt.tight_layout()
# #plt.savefig("latency.pdf")
# plt.show()
#fig7b
# residual image
# a0=3.1
# a1=2.6
# x = np.arange(2)/2
# #a=[1,0.76]
# b=[a1,a0]
# c=[1,1]
# bar_width = 0.2
# tick_label = ['Velocity','Density']
# fig,ax=plt.subplots(figsize=(5, 4))
# # plt.figure(figsize=(5, 5))
# #ax.bar(x, a, bar_width, align="center", color="#2D4059", label="Action1")
# ax.bar( x +2*bar_width, b, bar_width, color="#EA5455", align="center", label="Action2")
# ax.bar(x + 1*bar_width,c , bar_width, color="#2D4059", align="center", label="Action3")
# bars_name=tick_label
# # plt.grid(axis='y') # 网格线
# # plt.xlabel("Reward")
# ax.set_ylabel("Change",font2)
# # ax.set_ylim(0,4)
# #a#x.set_xlim(0, 2)
# ax.set_xticks(x + 1.5*bar_width)
# ax.set_xticklabels(bars_name,fontsize=20)
# ax.set_ylim(0, 4)
# ax.set_yticks([0,1,2,3,4])
# ax.set_xticklabels(bars_name,fontsize=20)
# #ax.set_xticks([0.25,0.75] , tick_label,font=font2)
# plt.yticks( size=15)#设置大小及加粗
# plt.tight_layout()
# #ax.legend(fontsize=12, ncol=3, bbox_to_anchor=(1.06, 1.16))
# #plt.savefig('resspeed.pdf',format='pdf')
# plt.show()
#动作空间维度图
# reward=[36,38,38.55,38.7,38.75,38.78,38.8,38.53,38.33,35.5]
# reward1=[36.5,38.2,38.61,38.83,38.88,39,39.02,38.83,38.7,36.0]
# y=[1,9,25,50,75,150,200,300,400]
# y=[25,50,75,100,125,150,175,200,250,300]
# fig, ax = plt.subplots(figsize=(5,3))
# def smooth_xy(lx, ly):
# """数据平滑处理
#
# :param lx: x轴数据,数组
# :param ly: y轴数据,数组
# :return: 平滑后的x、y轴数据,数组 [slx, sly]
# """
# x = np.array(lx)
# y = np.array(ly)
# x_smooth = np.linspace(x.min(), x.max(), 30)
# y_smooth = make_interp_spline(x, y)(x_smooth)
# return [x_smooth, y_smooth]
# xy=smooth_xy(y,reward)
# #xy[1][27]=38.8
# xy=smooth_xy(xy[0],xy[1])
# aaa=xy[1]
# #ax.plot(xy[0],xy[1], color='#D61C4E', linestyle='-',linewidth=0.5)
# xy=smooth_xy(y,reward1)
# #ax.plot(xy[0],xy[1], color='#D61C4E', linestyle='-',linewidth=0.5)
# mean=[(a+b)/2 for a,b in zip(xy[1],aaa)]
# ax.plot(xy[0],mean, color='#D61C4E', linestyle='-',linewidth=1)
# #ax.set_xlim(0,400)
# ax.set_ylim(35,39.5)
# my_x_ticks = [ 0 ,1*3,4*3,9*2,25, 50 ,100 ,150, 200 ,250, 300, 400]
# my_x_ticks=[20,30,45,65,90,120,155,195,225,265,310]
# print(my_x_ticks)
# labels=[1,4,9,25,50,100,150,200,250,300,'+∞']
# plt.fill_between(xy[0],xy[1],aaa,color='#F94C66',alpha=0.4)
# ax.set_xticks(my_x_ticks,labels)
# plt.xlabel("Action Complexity",font1)
# plt.ylabel("Reward",font1)
# plt.tight_layout()
# plt.savefig("action.svg")
# plt.show()
# ##fig11
#
# def exponential_smoothing(alpha, s):
# '''
# 一次指数平滑
# :param alpha: 平滑系数
# :param s: 数据序列, list
# :return: 返回一次指数平滑模型参数, list
# '''
# s_temp = []
# s_temp.append(s[0])
# print(s_temp)
# for i in range(1, len(s), 1):
# s_temp.append(int(alpha * s[i-1] + (1 - alpha) * s_temp[i-1]))
# return s_temp
#
# a=[ 1.037524309158325, 1.0208631420135497, 0.7765613842010497, 1.0389967823028563, 0.7668834972381591, 1.0376621150970458, 0.7630397129058837, 0.7806593227386474, 0.7653471279144286, 1.0404430294036864]
# b=[0.7714456367492675, 0.5470477771759032, 0.7850643444061278, 0.5076641273498534, 0.771291856765747, 0.5084878635406493, 0.508153600692749, 0.5092236232757568, 0.7893201160430907, 0.5089184474945068]
# c=[0.5169269275665282, 0.7661052989959716, 0.5230025482177734, 0.52890793800354, 0.509346170425415, 0.5087668132781982, 0.25586577415466305, 0.5218712520599365, 0.5129408073425292, 0.5102991294860839]
# # with open("rds.txt", "rb") as get_myprofile:
# # result = pickle.load(get_myprofile)
# # print(result)
# # max450=-1
# # for i in range(5):
# # for j in range(15):
# # if max450<result[i*5+j][39]:
# # print(i,j)
# # max450=max(max450,result[i*5+j][39])
# # print(result[1*5+10][37])
# #
# # a = np.linspace(min(a), max(a), 10)
# #
# #result=result[2:22]
# cro=[[0.864864864864865, 30.0], [0.7930283224400871, 30.0], [0.8217391304347826, 7.831060898053572], [0.9230769230769232, 7.05397657213317], [0.8401084010840109, 9.16279871323529], [0.9491525423728816, 5.184000000000001], [0.8484848484848485, 15.91666666666667], [0.9836065573770492, 5.647741935483872], [0.8307692307692308, 12.149999999999991], [1.0, 5.184000000000001], [0.946236559139785, 7.103225806451613], [0.92018779342723, 6.899396782841825], [0.9846153846153848, 7.845541401273877], [0.9, 5.646242774566474], [0.7796610169491527, 6.7125], [0.8441926345609065, 7.041144459102901], [0.7722007722007723, 9.937499999999991], [0.8503401360544217, 7.262537091988131], [0.8773584905660377, 9.203167191719167], [0.8671023965141612, 10.781999525053427], [0.6666666666666666, 7.01466257668713], [0.6171428571428571, 6.558209325396828], [0.7988980716253444, 6.310489510489511], [0.6018808777429467, 30.0], [0.6666666666666666, 15.67276422764226], [0.8196721311475409, 28.34756097560978], [0.7697478991596639, 22.73343373493969], [0.9042904290429042, 7.3940800200677295], [0.7326120556414218, 9.26322006178448], [0.6499102333931777, 14.711622487620152], [0.8520499108734403, 11.76930849384275], [0.8251121076233184, 14.868800268096525], [0.75, 13.758358208955231], [0.7635327635327636, 14.025280898876408], [0.8298368298368298, 10.41344], [0.8832630098452883, 6.431299780676444], [0.9127105666156202, 8.614123581336692], [0.8248587570621468, 7.103816793893135], [0.8596491228070176, 7.415443629086056], [0.8432563791008506, 6.636952380952383], [0.7971014492753624, 8.825756486739017], [0.894800483675937, 5.922608294240942], [0.851508120649652, 6.431239476145926], [0.862788144895719, 5.997601407668087], [0.8860759493670887, 9.33436606291707], [0.8861330326944759, 7.243212851405623], [0.8969181721572794, 15.872719491318165], [0.7886178861788617, 7.401472593981754], [0.7843866171003718, 16.18215309046255], [0.7996272134203168, 30.0], [0.8251207729468598, 11.70325379609544], [0.8636796949475691, 10.818181818181827], [0.8071833648393194, 8.867681540429146], [0.735655737704918, 12.164316702819916], [0.7643064985451018, 10.23149125242989], [0.8755439512619669, 6.2617744610281925], [0.8008800880088008, 5.910447761194028], [0.8840736728060672, 7.2666782743662175], [0.9282511210762332, 6.269986719787511], [0.8078048780487804, 7.00825049701789], [0.7952468007312614, 13.096836817811564], [0.7996530789245447, 6.865901898734177], [0.8530405405405407, 8.430656449326733], [0.8355263157894737, 7.402892757553278], [0.8294260307194825, 9.05403225806451], [0.8455821635012387, 6.02331546707504], [0.8776508972267537, 8.83099112426035], [0.8453947368421054, 12.352340425531906], [0.7789646672144618, 14.594357674803476], [0.8352745424292846, 16.008320441112318], [0.8113879003558719, 16.027777777777786], [0.6181818181818182, 14.630875576036887], [0.680327868852459, 13.777941176470565], [0.661111111111111, 30.0], [0.7534626038781163, 14.950247524752482], [0.694300518134715, 7.173103448275864], [0.9608938547486032, 7.474100176189277], [0.7874015748031497, 7.30052422782658], [0.8313953488372092, 7.5], [0.8827586206896552, 9.625533049040513], [0.8508771929824561, 8.295454545454547], [0.8142857142857144, 10.441935483870964], [0.8465608465608466, 7.629310344827587], [0.7948717948717949, 7.055076017655714], [0.8176795580110496, 8.928571428571423], [0.830188679245283, 10.39091633466137], [0.8869179600886917, 7.265985970381916], [0.8339622641509434, 7.118820678513733], [0.903896103896104, 9.494756879508415], [0.8175675675675675, 7.049144486692017], [0.6445783132530121, 11.599999999999994], [0.9102564102564102, 5.262998859749143], [0.9189189189189187, 5.463764705882355], [0.9148264984227128, 7.10625], [0.9423728813559322, 6.405213270142184], [0.9183673469387756, 7.444190600522191], [0.9019607843137254, 30.0], [0.9448275862068966, 6.362092238470193], [0.8571428571428572, 5.9042553191489375], [0.7777777777777778, 5.274308300395258]]
# fps=[16.067425195071632, 36.0, 49.50000000000001, 35.02054790677468, 49.50000000000001, 52.40355022271769, 45.0, 40.5, 36.0, 45.0, 46.6991719621837, 37.846842888911375, 40.5, 49.50000000000001, 58.71991135326696, 52.212977656855394, 49.50000000000001, 40.05265405899739, 45.0, 42.61961848783222, 52.08843679119408, 32.58617457689005, 52.18106171267546, 45.0, 46.17417208869901, 35.25909826440632, 45.0, 52.13185694285351, 45.947494649597196, 35.524955627232984, 32.1338879308839, 42.5510727023589, 57.93651767148435, 57.36188062434597, 49.50000000000001, 30.382202131705352, 45.37535464100555, 38.84400518741964, 53.9170036556524, 39.437501393940344, 38.44456368802797, 38.48693894772297, 34.84747169093234, 47.137564511013736, 38.62182515050953, 41.915521621744894, 40.9939940560606, 41.94691925109234, 40.76586372094486, 30.201606820246887, 42.4838945309465, 37.99186524557397, 38.800070788499916, 42.38685067222654, 30.4041157858297, 38.877669979657654, 45.0, 52.405863700320495, 36.0, 36.0, 38.656661451088866, 30.22169994814119, 38.101637481328915, 53.11972382109737, 42.42789809960801, 38.00050484882947, 52.3375059437987, 39.236987398524455, 42.488829408388874, 29.9132680182104, 30.593917621152254, 41.66649171673093, 38.700081052062984, 49.50000000000001, 52.99915035656215, 36.0, 42.65511655345495, 42.76081841659174, 47.40316610307626, 36.0, 34.39256204518436, 40.5, 45.0, 40.5, 46.840189981535836, 43.31970320160012, 40.5, 46.42057561414597, 47.76617489470945, 49.50000000000001, 46.79590862476905, 45.0, 42.600284574464155, 45.0, 40.5, 49.50000000000001, 49.50000000000001, 32.625252625141655]
# acc1=[0.656, 0.625, 0.771, 0.779, 0.736, 0.816, 0.769, 0.782, 0.867, 0.838, 0.784, 0.783, 0.637, 0.781, 0.738, 0.738, 0.736, 0.803, 0.85, 0.854, 0.686, 0.567, 0.496, 0.643, 0.568, 0.751, 0.63, 0.683, 0.629, 0.673, 0.855, 0.785, 0.847, 0.81, 0.853, 0.956, 0.87, 0.846, 0.873, 0.883, 0.872, 0.938, 0.873, 0.923, 0.933, 0.853, 0.838, 0.835, 0.874, 0.869, 0.903, 0.92, 0.893, 0.932, 0.887, 0.909, 0.82, 0.773, 0.807, 0.823, 0.826, 0.801, 0.85, 0.877, 0.783, 0.854, 0.866, 0.875, 0.855, 0.859, 0.858, 0.662, 0.617, 0.669, 0.733, 0.758, 0.855, 0.888, 0.806, 0.789, 0.822, 0.806, 0.684, 0.82, 0.905, 0.945, 0.854, 0.823, 0.733, 0.87, 0.621, 0.688, 0.818, 0.862, 0.826, 0.814, 0.778, 0.714]
# acc=[0.803, 0.792, 0.865, 0.826, 0.808, 0.713, 0.606, 0.722, 0.727, 0.714, 0.96, 0.916, 0.88, 0.942, 0.946, 0.788, 0.824, 0.91, 0.837, 0.889, 0.733, 0.751, 0.718, 0.725, 0.646, 0.803, 0.753, 0.784, 0.753, 0.769, 0.823, 0.853, 0.853, 0.872, 0.864, 0.961, 0.951, 0.925, 0.941, 0.936, 0.957, 0.949, 0.961, 0.965, 0.947, 0.901, 0.929, 0.898, 0.858, 0.871, 0.903, 0.91, 0.948, 0.907, 0.93, 0.924, 0.826, 0.899, 0.906, 0.867, 0.817, 0.825, 0.832, 0.869, 0.834, 0.858, 0.894, 0.897, 0.854, 0.796, 0.844, 0.72, 0.778, 0.788, 0.859, 0.8, 0.941, 0.837, 0.85, 0.781, 0.85, 0.811, 0.89, 0.801, 0.876, 0.944, 0.967, 0.956, 0.931, 0.847, 0.829, 0.751, 0.927, 0.948, 0.911, 0.803, 0.812, 0.839]
# acc[:20]=acc1[:20]
# idx = np.arange(len(acc))
# n=0
# import pandas as pd
# import csv
# fps0=[]
# fps1=[]
#
# with open('agent0.csv', 'r') as file:
# reader = csv.reader(file)
# for row in reader:
# if float(row[1])<0.5 or float(row[5])<0.5:
# continue
# # fps0.append(min(65,30/float(row[3])))
# # fps1.append(min(65,30 / float(row[-1])))
# fps0.append(float(row[1]))
# fps1.append(float(row[5]))
# #平滑 fps
# # fps0=exponential_smoothing(0.4,fps0)
# # fps1=exponential_smoothing(0.4,fps1)
# #插值 acc
#
# idx = np.arange(len(fps0))
# from scipy import interpolate
# f=interpolate.interp1d(idx,fps0,kind="linear")
# idx=range(0,100)
# idx=[ i/2 for i in idx]
# fps0=f(idx)
#
# idx = np.arange(len(fps1))
# f=interpolate.interp1d(idx,fps1,kind="linear")
# idx=range(0,100)
# idx=[ i/2 for i in idx]
# fps1=f(idx)
#
#
#
# # ===============
#idx=range(0,100)
#create integers from strings
# idx = range(len(result))
# print((idx))
# xnew = np.linspace(min(idx), max(idx), 300)
# from scipy.interpolate import make_interp_spline
# # interpolation
# spl = make_interp_spline(idx, result, k=3)
# smooth = spl(xnew)
#plt.plot(result,color='r', linestyle='--',label='dataset 2',linewidth=2.0)
# with open("rd5.txt", "rb") as get_myprofile:
# result = pickle.load(get_myprofile)
# result = result[2:22]
import matplotlib.pyplot as plt
font1 = {'family' : 'Arial',
'weight' : 'normal',
'size' : 15,
}
font2 = {'family' : 'Arial',
'weight' : 'normal',
'size' : 20,
}
false_size = [21714.22705, 21714.22705, 21724.58129, 22510.49334, 24003.31465, 25449.52348, 26983.19201, 28295.20112, 29557.75999, 30848.77680, 32080.08409, 33302.18676, 34434.20357, 35549.53118, 36464.01577, 37528.23896, 38538.00841, 39484.42151, 40397.95340, 41184.56167, 42021.02803, 42920.16118, 43746.82691, 44536.59566, 45445.45270, 46164.26314, 46918.71058, 47757.76594, 48642.35249, 49325.32726, 50015.90470, 50725.04870, 51521.44289, 52447.71374, 52912.14926, 53807.96566, 54511.17589, 54912.33427, 55789.19376, 56354.71338, 56638.53644, 57605.66503, 58081.93728, 58532.39348, 59365.12579, 59787.18325, 60564.91100, 60862.55851, 61526.15943, 62406.41906, 62551.02137, 62699.65487, 63680.95165, 64410.18535, 64760.08234, 65258.16819, 65919.09601, 66693.85424, 67599.23651, 68052.90715, 68659.28732, 69709.31395, 70293.73931, 71275.90049, 71818.62474, 72926.64541, 73761.38157, 74528.26559, 75821.70568, 76773.03048, 77984.77260, 79269.16783, 80071.48318, 81672.63315, 83548.09706, 83873.67449, 85291.26349, 87485.08269, 89541.85704, 90699.42116, 92831.66363, 95203.01717, 97206.07568, 100436.46636, 102636.69516, 105235.95200, 109042.95410, 111599.49334, 116401.57043, 119959.24422, 126470.10371, 131360.25788, 136543.46286, 146842.97828, 159293.30484, 173210.85179, 190888.13174, 211367.27575, 234308.44604, 282633.64436, 319963.96111]
false_size=[i/(1024) for i in false_size]
#false_size=false_size[1::5]
print(len(false_size))
x=[i for i in range(len(false_size))]
fig, ax = plt.subplots(figsize=(7, 2.8))
plt.grid(axis='y',zorder=2)
plt.fill_betweenx([-0.1,400], 40, 80, color='#DCD0FF', alpha=0.7)
plt.plot(x[0:100],false_size[0:100],color='#779DE9', linestyle='-',label='Agent 0',marker='o',markeredgewidth=0.01,linewidth=3.0,zorder=2)
# with open("rd4.txt", "rb") as get_myprofile:
# result = pickle.load(get_myprofile)
# result = result[2:22]
# result1=[1.5299364130245858, 2.792273007787041, 2.6276195041689294, 2.6502938596792385, 2.748461823711862, 3.726005252629246, 3.726580066338505, 3.740004750311845, 3.8632970915276226, 3.764515535504061, 2.9754687755792966, 3.0196534667234527, 3.0486958611320105, 3.0723916249187915, 2.978232290441384, 2.6954824892773863, 2.6866465345764516, 2.545511939552054, 2.5518379293540945, 2.447077994772905, 3.18141689613457, 3.140789422711728, 3.122383034882248, 3.1000718468786865, 3.033194365793023, 2.5077409580139687, 2.6396966922604843, 2.7475280699413784, 2.48176991845821, 2.5491671804676717, 2.656660398497624, 2.5459332938150787, 2.628561979159116, 2.548348739275489, 2.5795297355048192, 3.1758620078685604, 3.0349755215199195, 2.9599747825227825, 3.210217251817448, 3.1032147339485876, 3.0459050119297775, 3.186207733739649, 3.078205183686812, 2.949745299913811, 2.879746084400197, 2.241098823264389, 2.2488633179106783, 2.374665727085344, 2.3073844925293803, 2.2359263727378766, 2.166461993718542, 2.2151062997039186, 2.355783894304825, 2.3880543535068623, 2.3140397319888133, 2.380779634627332, 2.2498067902551058, 2.2298020704113086, 2.268577349923986, 2.146530464833459, 2.0086335931384354, 2.064662877886159, 2.1023161644649946, 2.0207895944876624, 1.9603766211604654, 1.9777912436252212, 2.0390655806029074, 2.0539396766283358, 2.0210781469633967, 1.973952430723794, 2.24471203655729, 2.750722526056682, 2.727711172668642, 2.7092862938975864, 2.79598308879476, 2.7128195168797498, 3.1173387853491734, 3.1206714269618523, 3.2095057742302613, 3.102112377524811, 3.0768963667500278, 3.0835372171062105, 2.9667944694490065, 2.970096188310561, 2.805018278111114, 2.9673703476717384, 2.930214530556462, 2.9653074977981557, 3.18270715836392, 3.224412946071361, 2.704393728092468, 2.668913068801891, 2.6619383417317657, 2.775884487629976, 2.7656185515200664, 2.631948437964387, 2.6910855750024782, 2.8385784160910417]
# result=[0.549, 0.598, 0.703, 0.644, 0.627, 0.623, 0.5, 0.505, 0.498, 0.402, 0.682, 0.7, 0.562, 0.574, 0.531, 0.541, 0.505, 0.539, 0.611, 0.595, 0.401, 0.472, 0.44, 0.417, 0.436, 0.551, 0.52, 0.537, 0.588, 0.563, 0.611, 0.592, 0.585, 0.609, 0.575, 0.935, 0.907, 0.878, 0.834, 0.914, 0.891, 0.919, 0.927, 0.93, 0.914, 0.752, 0.724, 0.673, 0.728, 0.769, 0.784, 0.809, 0.774, 0.818, 0.808, 0.801, 0.691, 0.66, 0.709, 0.711, 0.743, 0.755, 0.733, 0.753, 0.721, 0.739, 0.77, 0.779, 0.782, 0.809, 0.777, 0.486, 0.441, 0.496, 0.548, 0.579, 0.818, 0.835, 0.659, 0.657, 0.57, 0.683, 0.686, 0.697, 0.812, 0.868, 0.865, 0.837, 0.88, 0.844, 0.664, 0.559, 0.572, 0.543, 0.575, 0.579, 0.615, 0.601]
#
#plt.plot(result1,color='#7A86B6', linestyle='--',label='DDS',linewidth=3.0)
# with open("rd3.txt", "rb") as get_myprofile:
# result = pickle.load(get_myprofile)
# result = result[2:22]
# fps=[26.39655736305094, 49.50000000000001, 46.51048634540449, 49.30615105883378, 36.0, 45.0, 49.50000000000001, 45.0, 40.5, 36.0, 36.0, 40.5, 45.0, 49.50000000000001, 40.5, 58.06654576976233, 40.5, 46.428912262849295, 40.5, 49.50000000000001, 57.21879202141004, 54.35577472307389, 45.0, 49.48787186661471, 58.35926024484661, 50.99698733484224, 36.0, 36.0, 49.50000000000001, 51.11453041532847, 49.759406859609385, 40.5, 45.0, 59.89594683201966, 49.50000000000001, 57.21187171509123, 49.50000000000001, 49.50000000000001, 40.5, 40.5, 45.0, 40.5, 36.0, 40.5, 40.5, 36.0, 40.5, 36.0, 40.5, 45.0, 45.0, 40.5, 49.50000000000001, 45.0, 40.5, 49.50000000000001, 38.640386093335366, 36.0, 59.46389289176989, 45.0, 36.0, 36.0, 40.5, 49.50000000000001, 36.0, 45.0, 36.0, 45.0, 49.50000000000001, 44.16236187464277, 55.40574319440283, 57.0329947723272, 49.50000000000001, 57.79187863141113, 58.53349419465368, 36.0, 58.25246062466295, 50.561309602930805, 56.80384850638555, 58.91189939359693, 49.50000000000001, 57.723028193164545, 49.80490337314111, 34.873492976662355, 57.78651741245825, 45.0, 57.141411227528884, 51.50755729176175, 51.824624212215305, 59.098445707992205, 45.0, 50.68905857960714, 36.0, 49.50000000000001, 40.5, 50.68873186806705, 57.510990649761816, 49.50000000000001]
# acc=[0.49, 0.565, 0.689, 0.612, 0.427, 0.194, 0.538, 0.522, 0.566, 0.554, 0.256, 0.414, 0.539, 0.452, 0.485, 0.711, 0.657, 0.642, 0.667, 0.612, 0.368, 0.516, 0.377, 0.525, 0.55, 0.576, 0.432, 0.603, 0.547, 0.599, 0.684, 0.685, 0.684, 0.713, 0.65, 0.756, 0.677, 0.738, 0.747, 0.702, 0.697, 0.711, 0.654, 0.697, 0.718, 0.721, 0.661, 0.74, 0.731, 0.67, 0.752, 0.769, 0.711, 0.703, 0.694, 0.693, 0.706, 0.697, 0.692, 0.696, 0.707, 0.687, 0.709, 0.675, 0.706, 0.69, 0.737, 0.675, 0.726, 0.855, 0.617, 0.613, 0.567, 0.621, 0.687, 0.733, 0.683, 0.719, 0.729, 0.646, 0.643, 0.696, 0.711, 0.723, 0.661, 0.728, 0.777, 0.656, 0.728, 0.767, 0.437, 0.69, 0.801, 0.745, 0.724, 0.653, 0.726, 0.626]
#plt.plot(idx,fps1,color='#7A86B6', linestyle='--',label='Agent 1',linewidth=3.0,zorder=2)
# plt.annotate('', xy=(83.275, 25), xytext=(83.275, 30),
# arrowprops=dict(arrowstyle='<-', lw=2))
plt.ylim(0,300)
#plt.ylim(15,70)
plt.xlim(0,100)
plt.yticks([0,100,200,300],size=15)#设置大小及加粗
plt.xticks( size=15)
plt.axhline(210, color='black',linestyle='--')
plt.axvline(x=40, color='gray', linestyle='--')
plt.axvline(x=80, color='gray', linestyle='--')
plt.text(3, 245, 'SR Time', fontsize=20, color='black')
#plt.legend(loc="best",prop=font1)
#plt.legend( ncol=2,handlelength=1.3,handleheight=1,labelspacing=0.1, loc='upper right',prop=font1)
plt.xlabel("Quality",font2)
plt.ylabel("Latency(ms)",font2)
plt.tight_layout()
plt.savefig("sl_latency.svg")
plt.savefig("sl_latency.pdf")
plt.show()