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
bob
bob.pad.base
Commits
be3d9fe6
Commit
be3d9fe6
authored
Jul 09, 2018
by
Amir MOHAMMADI
Browse files
Respect the --no-disp-legend option
parent
0b85f0c6
Pipeline
#21733
canceled with stage
in 21 minutes and 53 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/pad/base/script/vuln_figure.py
View file @
be3d9fe6
...
...
@@ -222,11 +222,12 @@ class Epsc(VulnPlot):
self
.
_fixed_params
=
fixed_params
or
[
0.5
]
self
.
_titles
=
ctx
.
meta
.
get
(
'titles'
,
[])
*
2
self
.
_legend_loc
=
self
.
_legend_loc
or
'upper center'
self
.
_disp_legend
=
ctx
.
meta
.
get
(
'disp_legend'
,
True
)
self
.
_eval
=
True
# always eval data with EPC
self
.
_split
=
False
self
.
_nb_figs
=
1
self
.
_sampling
=
ctx
.
meta
.
get
(
'sampling'
,
5
)
mpl
.
grid
(
True
)
mpl
.
rcParams
[
'axes.grid'
]
=
True
self
.
_axis1
=
None
self
.
_axis2
=
None
...
...
@@ -355,10 +356,12 @@ class Epsc(VulnPlot):
idx
==
self
.
n_systems
-
1
:
# all plots share same legends
lines
,
labels
=
self
.
_axis1
.
get_legend_handles_labels
()
mpl
.
gcf
().
legend
(
lines
,
labels
,
loc
=
self
.
_legend_loc
,
fancybox
=
True
,
mode
=
"expand"
,
framealpha
=
0.5
,
ncol
=
self
.
_nlegends
,
bbox_to_anchor
=
(
0.
,
1.12
,
1.
,
.
102
)
)
if
self
.
_disp_legend
:
mpl
.
gcf
().
legend
(
lines
,
labels
,
loc
=
self
.
_legend_loc
,
fancybox
=
True
,
mode
=
"expand"
,
framealpha
=
0.5
,
ncol
=
self
.
_nlegends
,
bbox_to_anchor
=
(
0.
,
1.12
,
1.
,
.
102
)
)
mpl
.
tight_layout
()
self
.
_pdf_page
.
savefig
(
bbox_inches
=
'tight'
)
...
...
Write
Preview
Markdown
is supported
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