Commit 51a63d62 authored by Yan's avatar Yan
Browse files

Minor fix of DRL

parent d777f9bd
......@@ -72,7 +72,7 @@ def update_profile(pt, row, dataset):
xmin, xmax = limits[widest][0]
xex = max((xmax-xmin)*0.25,0.20)
spectrum.set_xlim(xmin-xex, xmax+xex)
ymax = max([lim[1] for lim in limits],1)
ymax = max(*[lim[1] for lim in limits],1)
spectrum.set_ylim(ymax*-0.1, ymax*1.2)
......@@ -521,11 +521,11 @@ def export_drlspectrum(parent, fn, ds, drls):
save_drlconfig(drls, parent, exp_f_name[2])
def print_graph(labels, ds, drls):
def print_graph(ds, drls):
printfig = Figure(figsize=(5, 2), dpi=100)
printplot = printfig.add_subplot(111)
printcanvas = FigureCanvas(printfig)
gt.pop_plot(printplot, labels)
gt.pop_plot(0, 0, printplot, drls['graphlabels'])
update_drlspectrum(ds, drls, printplot)
widget = QtWidgets.QDialog(None, windowTitle='Print preview')
layout = QtWidgets.QVBoxLayout(widget)
......@@ -725,8 +725,7 @@ def main_window(parent, ds, filename, cache, update_signal):
main_widget, ds, drls, chromplot))
drl_save.clicked.connect(lambda: save_drlconfig(
drls, main_widget))
drl_print.clicked.connect(lambda: print_graph(
graphlabels, ds, drls))
drl_print.clicked.connect(lambda: print_graph(ds, drls))
drl_export.clicked.connect(lambda: export_drlspectrum(
main_widget, filename, ds, drls))
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