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
Hide whitespace changes
Inline
Side-by-side
prasopes/imagetools.py
View file @
53960fe8
...
@@ -7,6 +7,7 @@ from PyQt5 import QtGui
...
@@ -7,6 +7,7 @@ from PyQt5 import QtGui
from
PyQt5
import
QtPrintSupport
from
PyQt5
import
QtPrintSupport
from
PyQt5
import
QtWidgets
from
PyQt5
import
QtWidgets
from
pathlib
import
Path
from
pathlib
import
Path
import
copy
import
prasopes.graphtools
as
gt
import
prasopes.graphtools
as
gt
import
prasopes.config
as
cf
import
prasopes.config
as
cf
...
@@ -25,13 +26,14 @@ def paint_image(mass_spec, spect, fn=None, painttarget=None):
...
@@ -25,13 +26,14 @@ def paint_image(mass_spec, spect, fn=None, painttarget=None):
printplot
.
set_xlim
(
spect
.
get_xlim
())
printplot
.
set_xlim
(
spect
.
get_xlim
())
printplot
.
set_ylim
(
spect
.
get_ylim
())
printplot
.
set_ylim
(
spect
.
get_ylim
())
data
=
[
line
.
get_data
()
for
line
in
spect
.
lines
]
data
=
[
line
.
get_data
()
for
line
in
spect
.
lines
]
texts
=
copy
.
copy
(
mass_spec
)
if
len
(
mass_spec
[
'headers'
])
!=
0
:
if
len
(
mass_spec
[
'headers'
])
!=
0
:
legend
=
spect
.
get_legend
().
get_texts
()
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
)]
for
i
,
line
in
enumerate
(
data
)]
printplot
.
legend
(
loc
=
2
)
printplot
.
legend
(
loc
=
2
)
else
:
else
:
[
gt
.
pop_plot
(
*
line
,
printplot
,
mass_spec
,
i
)
[
gt
.
pop_plot
(
*
line
,
printplot
,
texts
,
i
)
for
i
,
line
in
enumerate
(
data
)]
for
i
,
line
in
enumerate
(
data
)]
printplot
.
locator_params
(
nbins
=
xtics
,
axis
=
'x'
)
printplot
.
locator_params
(
nbins
=
xtics
,
axis
=
'x'
)
if
fn
not
in
(
None
,
[
None
]):
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