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
Jan Zelenka
prasopes
Commits
4a89b4ce
Commit
4a89b4ce
authored
Sep 23, 2019
by
3Yan
Browse files
Manual annotation - fix
* fixed last commit
parent
53fbd3af
Changes
1
Hide whitespace changes
Inline
Side-by-side
prasopes/graphtools.py
View file @
4a89b4ce
...
...
@@ -104,14 +104,13 @@ def textedit_factory(axis, plot_data):
text
=
annotation
.
get_text
())
if
textdial
[
1
]
==
True
:
annotation
.
set_text
(
textdial
[
0
])
if
len
(
textdial
[
0
])
!=
0
:
annotation
.
set_bbox
(
ann_bbox
)
if
annotation
in
plot_data
[
'annotation'
]:
plot_data
[
'annotation'
].
remove
(
annotation
)
plot_data
[
'texts'
].
append
(
annotation
)
if
len
(
textdial
[
0
])
==
0
and
annotation
in
plot_data
[
'texts'
]:
plot_data
[
'texts'
].
remove
(
annotation
)
axis
.
figure
.
canvas
.
draw
()
elif
annotation
in
plot_data
[
'annotation'
]:
annotation
.
set_bbox
(
ann_bbox
)
plot_data
[
'annotation'
].
remove
(
annotation
)
plot_data
[
'texts'
].
append
(
annotation
)
axis
.
figure
.
canvas
.
draw
()
axis
.
figure
.
canvas
.
mpl_connect
(
'pick_event'
,
annpicked
)
...
...
@@ -298,7 +297,6 @@ def pop_plot(xdata, ydata, plot, plot_data, colornum=0, legend=None):
plot_data
[
'texts'
]
=
[
plot
.
annotate
(
a
.
get_text
(),
a
.
xy
,
picker
=
True
,
bbox
=
ann_bbox
)
for
a
in
oldtexts
]
plot_data
[
'texts'
]
=
oldtexts
if
"annotation"
in
plot_data
:
ann_spec
(
plot
,
plot_data
)
if
"xtics"
in
plot_data
:
...
...
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