Commit eaa58de1 authored by Konstantinos Chatzilygeroudis's avatar Konstantinos Chatzilygeroudis
Browse files

Minor fixes in plotting scripts

parent 1b82388c
......@@ -4,7 +4,13 @@ import subprocess
import time
import threading
from waflib import Logs
import plot_bo_benchmarks
plotting_ok = True
try:
import plot_bo_benchmarks
except:
plotting_ok = False
Logs.pprint('YELLOW', 'YELLOW: Could not import plot_bo_benchmarks! Will not plot anything!')
json_ok = True
try:
......@@ -40,8 +46,9 @@ def run_bo_benchmarks(ctx):
Logs.pprint('NORMAL', '%s Running: %s for the %s th time %s' % (HEADER, fname, str(i), NC))
s="cd " + directory +";./" + fname
retcode = subprocess.call(s, shell=True, env=None)
# plot all
plot_bo_benchmarks.plot_all()
# plot all if possible
if plotting_ok:
plot_bo_benchmarks.plot_all()
def compile_regression_benchmarks(bld, json_file):
......
......@@ -51,25 +51,26 @@ def custom_boxes(ax, bp):
boxPolygon = Polygon(boxCoords, facecolor = colors[i % len(colors)], linewidth=0)
ax.add_patch(boxPolygon)
for i in range(0, len(bp['boxes'])):
bp['boxes'][i].set_color(colors[i])
# we have two whiskers!
bp['whiskers'][i*2].set_color(colors[i])
bp['whiskers'][i*2 + 1].set_color(colors[i])
bp['whiskers'][i*2].set_linewidth(2)
bp['whiskers'][i*2 + 1].set_linewidth(2)
# top and bottom fliers
bp['fliers'][i * 2].set(markerfacecolor=colors[i],
marker='o', alpha=0.75, markersize=6,
markeredgecolor='none')
bp['fliers'][i * 2 + 1].set(markerfacecolor=colors[i],
marker='o', alpha=0.75, markersize=6,
markeredgecolor='none')
bp['medians'][i].set_color('black')
bp['medians'][i].set_linewidth(2)
# and 4 caps to remove
for c in bp['caps']:
c.set_linewidth(0)
for i in range(0, len(bp['boxes'])):
c_i = colors[i%len(colors)]
bp['boxes'][i].set_color(c_i)
# we have two whiskers!
bp['whiskers'][i*2].set_color(c_i)
bp['whiskers'][i*2 + 1].set_color(c_i)
bp['whiskers'][i*2].set_linewidth(2)
bp['whiskers'][i*2 + 1].set_linewidth(2)
# top and bottom fliers
bp['fliers'][i*2].set(markerfacecolor=c_i,
marker='o', alpha=0.75, markersize=6,
markeredgecolor='none')
bp['fliers'][i * 2 + 1].set(markerfacecolor=c_i,
marker='o', alpha=0.75, markersize=6,
markeredgecolor='none')
bp['medians'][i].set_color('black')
bp['medians'][i].set_linewidth(2)
# and 4 caps to remove
for c in bp['caps']:
c.set_linewidth(0)
# plot a single function
......
Supports Markdown
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