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
5f68546b
Commit
5f68546b
authored
Apr 05, 2018
by
Jean-Baptiste Mouret
Browse files
fix the flier & box colors in plot_bo_benchmarks
parent
a295f476
Changes
1
Hide whitespace changes
Inline
Side-by-side
waf_tools/plot_bo_benchmarks.py
View file @
5f68546b
...
...
@@ -107,7 +107,7 @@ def custom_ax(ax):
ax
.
grid
(
axis
=
'x'
,
color
=
"0.9"
,
linestyle
=
'-'
)
def
custom_boxes
(
ax
,
bp
):
for
i
in
range
(
len
(
bp
[
'boxes'
])):
for
i
in
range
(
0
,
len
(
bp
[
'boxes'
])):
box
=
bp
[
'boxes'
][
i
]
box
.
set_linewidth
(
0
)
boxX
=
[]
...
...
@@ -120,21 +120,17 @@ def custom_boxes(ax, bp):
ax
.
add_patch
(
boxPolygon
)
for
i
in
range
(
0
,
len
(
bp
[
'boxes'
])):
c_i
=
colors
[
i
%
len
(
colors
)]
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
if
(
i
*
2
+
1
<
len
(
bp
[
'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
[
'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
)
# ... and one set of fliers
bp
[
'fliers'
][
i
].
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
...
...
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