Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matthias Mayr
limbo
Commits
eaa58de1
Commit
eaa58de1
authored
Jul 06, 2017
by
Konstantinos Chatzilygeroudis
Browse files
Minor fixes in plotting scripts
parent
1b82388c
Changes
2
Hide whitespace changes
Inline
Side-by-side
waf_tools/benchmarks.py
View file @
eaa58de1
...
...
@@ -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
):
...
...
waf_tools/plot_bo_benchmarks.py
View file @
eaa58de1
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment