Commit 7c78c442 authored by Niels-Oliver Walkowski's avatar Niels-Oliver Walkowski
Browse files

move set title to plotting function

parent f147772e
......@@ -12,3 +12,5 @@ ToDo
[] gettter und setter für Frames.start setzen und das Rekursionsproblem lösen
[x] Bisher funktioniert nur der LightDark Contrast, andere Kontraste
implementieren
[] frame_range aus UnivariatePlot in Frames outsourcen und Folgen in allen
Klassen beseitigen. (wieder rekursives Aufrufproblem in __init__
......@@ -63,7 +63,6 @@ class Frames(object):
@frm_cnt.setter
def frm_cnt(self, nr):
count = self.count_frames()
print(count)
self.__frm_cnt = count
def get_frame_list(self):
......
......@@ -248,8 +248,6 @@ class BivariateSequence(View):
sum_mins = int(sum(hist_mins))
sum_maxs = int(sum(hist_maxs))
# print('LOG: {0:8d} min points in frame {1:5d}'.format(int(sum_mins), int(frm_nr)))
if int(total_value) == 0:
total_value = [(bin_nr, value) for bin_nr, value in
enumerate(hist_maxs) if
......
......@@ -8,7 +8,7 @@ import numpy as np
class SequencePlot(object):
"""Key class for visualizations with two axis"""
def __init__(self, view, width=40, height=5):
def __init__(self, view, width=40, height=3):
self.width = width
self.height = height
self._x = self.get_xpos(view) # outsourcen in Frames Class und dann hier löschen
......@@ -62,8 +62,6 @@ class SequencePlot(object):
ax.set_axis_bgcolor((1, 1, 1)) # TODO: gradient
chn_label = view._contrast
plt_title = ' Scatter Plot of the ' + chn_label + ' Channel in ' + view._frames.folder
ax.set_title(plt_title, {'fontsize': 14}, y=1.18)
ax.set_ylabel(chn_label, {'fontsize': 8})
ax.set_xlabel('Time', {'fontsize': 8}, y=0.5)
ax.yaxis.grid(False)
......@@ -75,11 +73,14 @@ class SequencePlot(object):
return (ax, axt)
def saveplt(self):
self.fig.tight_layout()
self.fig.set_size_inches(self.width, self.height)
def saveplt(self, title=False, fname='plot.png'):
if title:
self._ax.set_title(title, {'fontsize': 14}, y=1.18)
self.fig.savefig("testexp.png", dpi=200)
self.fig.set_size_inches(self.width, self.height)
self.fig.tight_layout()
self.fig.savefig(fname, dpi=400)
class MultivariatePlot(SequencePlot):
......
Markdown is supported
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