Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
uahil
CPUnetPLOT
Commits
d88a4c23
Commit
d88a4c23
authored
Aug 28, 2014
by
Mario Hock
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Legend: Absolute offset also in area plots (CPU)
parent
672befef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
plot_cpu.py
plot_cpu.py
+5
-1
No files found.
plot_cpu.py
View file @
d88a4c23
...
...
@@ -2,6 +2,7 @@
from
collections
import
defaultdict
from
operator
import
itemgetter
from
matplotlib
import
transforms
import
numpy
import
copy
...
...
@@ -108,7 +109,10 @@ def plot_area_chart(ax, cnl_file, cols, legend_outside=True, legend_title=None):
# Legend
if
(
legend_outside
):
l
=
ax
.
legend
(
bbox_to_anchor
=
(
1.2
,
1.02
),
fancybox
=
True
,
shadow
=
True
,
title
=
legend_title
)
offset
=
transforms
.
ScaledTranslation
(
20
,
0
,
transforms
.
IdentityTransform
())
trans
=
ax
.
transAxes
+
offset
l
=
ax
.
legend
(
loc
=
'upper left'
,
bbox_to_anchor
=
(
1.0
,
1.02
),
fancybox
=
True
,
shadow
=
True
,
title
=
legend_title
)
else
:
l
=
ax
.
legend
(
loc
=
0
)
...
...
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