-
Notifications
You must be signed in to change notification settings - Fork 0
/
plot_size_FPR.py
46 lines (32 loc) · 1.05 KB
/
plot_size_FPR.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
import pandas as pd
import argparse
import matplotlib.pyplot as plt
from datetime import datetime
from progress.bar import Bar
import warnings
warnings.filterwarnings("ignore")
# Arguments
parser = argparse.ArgumentParser()
parser.add_argument("--file_names", nargs="+", action="store", dest="file_names", type=str, required=True,
help="file names to display")
args = parser.parse_args()
names = args.file_names
bar = Bar('Plotting distributions ', max=len(names))
for name in names:
data = pd.read_csv(f'./data/plots/{name}')
# Plot distribution of Keys
bar.next()
x = data["size"]
x = x.div(1000)
y = data["false_positive_rating"]
plt.plot(x, y, linestyle='dashed', marker='x')
#plt.plot(x, y, linestyle='dashed', marker='x')
plt.yscale("log")
plt.legend(names)
#plt.axis((50,1550,0.0005,0.5))
plt.xlabel('Size (Kb)')
plt.ylabel('False Positive Rate (%)')
now = datetime.now() # current date and time
date_time = now.strftime("%m-%d-%Y-%H:%M:%S")
plt.savefig(f'./graphs/fpr_size_{date_time}.png')
bar.finish()