Commit 53960fe8 authored by 3Yan's avatar 3Yan
Browse files

Manual annotation - fix5

* printing now does not disconnect annotations from the image
parent 85160f63
......@@ -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):
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)]
[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]):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment