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
53960fe8
Commit
53960fe8
authored
Oct 04, 2019
by
3Yan
Browse files
Manual annotation - fix5
* printing now does not disconnect annotations from the image
parent
85160f63
Changes
1
Show whitespace changes
Inline
Side-by-side
prasopes/imagetools.py
View file @
53960fe8
...
...
@@ -7,6 +7,7 @@ from PyQt5 import QtGui
from
PyQt5
import
QtPrintSupport
from
PyQt5
import
QtWidgets
from
pathlib
import
Path
import
copy
import
prasopes.graphtools
as
gt
import
prasopes.config
as
cf
...
...
@@ -25,13 +26,14 @@ def paint_image(mass_spec, spect, fn=None, painttarget=None):
printplot
.
set_xlim
(
spect
.
get_xlim
())
printplot
.
set_ylim
(
spect
.
get_ylim
())
data
=
[
line
.
get_data
()
for
line
in
spect
.
lines
]
texts
=
copy
.
copy
(
mass_spec
)
if
len
(
mass_spec
[
'headers'
])
!=
0
:
legend
=
spect
.
get_legend
().
get_texts
()
[
gt
.
pop_plot
(
*
line
,
printplot
,
mass_spec
,
i
,
legend
[
i
].
get_text
())
[
gt
.
pop_plot
(
*
line
,
printplot
,
texts
,
i
,
legend
[
i
].
get_text
())
for
i
,
line
in
enumerate
(
data
)]
printplot
.
legend
(
loc
=
2
)
else
:
[
gt
.
pop_plot
(
*
line
,
printplot
,
mass_spec
,
i
)
[
gt
.
pop_plot
(
*
line
,
printplot
,
texts
,
i
)
for
i
,
line
in
enumerate
(
data
)]
printplot
.
locator_params
(
nbins
=
xtics
,
axis
=
'x'
)
if
fn
not
in
(
None
,
[
None
]):
...
...
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