Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
uyegy
CPUnetPLOT
Commits
1f207d8b
Commit
1f207d8b
authored
Oct 14, 2014
by
Mario Hock
Browse files
Fix: cnl_plot crashed when no comment was given
parent
6fe3dcf0
Changes
1
Show whitespace changes
Inline
Side-by-side
cnl_plot.py
View file @
1f207d8b
...
@@ -292,8 +292,9 @@ if __name__ == "__main__":
...
@@ -292,8 +292,9 @@ if __name__ == "__main__":
## Plot with matplotlib.
## Plot with matplotlib.
## Draw comment on the figure (use absolute positioning).
## Draw comment on the figure (use absolute positioning).
if
(
not
args
.
no_comment
):
comment
=
cnl_file
.
get_comment
()
t
=
matplotlib
.
text
.
Text
(
10
,
10
,
"Comment: "
+
cnl_file
.
get_comment
(),
figure
=
fig
)
if
(
comment
and
not
args
.
no_comment
):
t
=
matplotlib
.
text
.
Text
(
10
,
10
,
"Comment: "
+
comment
,
figure
=
fig
)
fig
.
texts
.
append
(
t
)
fig
.
texts
.
append
(
t
)
...
...
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