first version of loading data
This commit is contained in:
@@ -4,11 +4,12 @@ import matplotlib
|
||||
matplotlib.use('Qt5Agg')
|
||||
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg
|
||||
from matplotlib.figure import Figure
|
||||
|
||||
import nixio as nix
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
from matplotlib.widgets import Slider
|
||||
import nixio as nix
|
||||
|
||||
from nixview.file_handler import FileHandler, DataView
|
||||
|
||||
|
||||
|
||||
@@ -323,8 +324,9 @@ class MplCanvas(FigureCanvasQTAgg):
|
||||
class PlotScreen(QWidget):
|
||||
close_signal = pyqtSignal()
|
||||
|
||||
def __init__(self, parent) -> None:
|
||||
def __init__(self, parent=None) -> None:
|
||||
super().__init__(parent=parent)
|
||||
self._file_handler = FileHandler()
|
||||
sc = MplCanvas(self, width=5, height=4, dpi=100)
|
||||
sc.axes.plot([0,1,2,3,4], [10,1,20,3,40])
|
||||
|
||||
@@ -335,9 +337,16 @@ class PlotScreen(QWidget):
|
||||
close_btn.clicked.connect(self.on_close)
|
||||
|
||||
self.layout().addWidget(close_btn)
|
||||
self._data_view = None
|
||||
|
||||
def on_close(self):
|
||||
self.close_signal.emit()
|
||||
|
||||
def plot(self, item):
|
||||
print("plot!", item)
|
||||
print("plot!", item)
|
||||
print(item.entity_type, item.shape)
|
||||
self._data_view = DataView(item, self._file_handler)
|
||||
self._data_view.request_more()
|
||||
print(self._data_view)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user