Commit 21306fff authored by André Anjos's avatar André Anjos 💬

Merge branch 'plot_update' into 'master'

Added colors to the basic plot



See merge request !8
parents e53d809e 0c8f9402
Pipeline #1202 skipped
......@@ -55,6 +55,18 @@ class Plotter(baselib.Plotter):
if self.det:
self.ylabel = "False Negatives (False Non-Match Rate), in %"
# These are the "Tableau 20" colors as RGB.
self.tableau20 = [(31.119.180), (152.223.138), (140.86.75), (199.199.199),
(174.199.232), (214.39.40), (196.156.148), (188.189.34),
(255.127.14), (255.152.150), (227.119.194), (219.219.141),
(255.187.120), (148.103.189), (247.182.210), (23.190.207),
(44.160.44), (197.176.213), (127.127.127), (158.218.229)]
# Scale the RGB values to the [0, 1] range, which is the format matplotlib accepts.
for i in range(len(self.tableau20)):
r, g, b = self.tableau20[i]
self.tableau20[i] = (r / 255., g / 255., b / 255.)
return True
......@@ -78,7 +90,7 @@ class Plotter(baselib.Plotter):
number_of_positives = []
number_of_negatives = []
for xp_label, xp_data in inputs:
for scatter in xp_data.data:
......@@ -109,7 +121,10 @@ class Plotter(baselib.Plotter):
# the line attributes
if self.line_attributes:
args.append(self.line_attributes[len(label)%len(self.line_attributes)])
else:
args.append('color')
args.append(self.tableau20[len(label) % len(self.tableau20)])
lines = ax.plot(*args)
if len(lines) > 1:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment