-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBaseAnalysis.py
More file actions
34 lines (26 loc) · 1.16 KB
/
BaseAnalysis.py
File metadata and controls
34 lines (26 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from tkinter import filedialog
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
import tkinter as tk
import matplotlib.pyplot as plt
from PlotWindow import PlotWindow
from PlotlyWindow import PlotlyWindow
from MultiPlotWindow import MultiPlotWindow
class BaseAnalysis:
def __init__(self):
pass
def display_plot(self, fig):
new_plot_window = PlotWindow(self.main_app, plot_title=self.plot_title.get())
new_plot_window.display_plot(fig)
return new_plot_window
def display_multiple_plots(self, figures, canvas_rows, canvas_columns):
new_plot_window = MultiPlotWindow(self.main_app, plot_title=self.plot_title.get())
new_plot_window.display_multiple_plots(figures, canvas_rows, canvas_columns)
return new_plot_window
def display_plotly_plot(self, fig):
new_plot_window = PlotlyWindow(self.main_app, plot_title=self.plot_title.get())
new_plot_window.display_plot(fig)
return new_plot_window
def display_refresh_plot(self, fig):
self.main_app.open_windows[-1].refresh_plot(fig)
def display_refresh_multiple_plots(self, figures, canvas_rows, canvas_columns):
self.main_app.open_windows[-1].refresh_plot(figures, canvas_rows, canvas_columns)