Skip to content

Commit 39d95ee

Browse files
committed
removed plotWindow as already imported from Pose2Sim
1 parent d3fcf52 commit 39d95ee

File tree

1 file changed

+0
-53
lines changed

1 file changed

+0
-53
lines changed

Sports2D/Utilities/common.py

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
from importlib.metadata import version
2020
import subprocess
2121
from pathlib import Path
22-
import itertools as it
2322
import logging
2423
from collections import defaultdict
2524
import numpy as np
@@ -106,58 +105,6 @@
106105
(255, 0, 125), (255, 125, 0), (0, 125, 255), (0, 255, 125), (125, 0, 255), (125, 255, 0), (0, 255, 0)]
107106
thickness = 1
108107

109-
## CLASSES
110-
class plotWindow():
111-
'''
112-
Display several figures in tabs
113-
Taken from https://github.com/superjax/plotWindow/blob/master/plotWindow.py
114-
115-
USAGE:
116-
pw = plotWindow()
117-
f = plt.figure()
118-
plt.plot(x1, y1)
119-
pw.addPlot("1", f)
120-
f = plt.figure()
121-
plt.plot(x2, y2)
122-
pw.addPlot("2", f)
123-
'''
124-
def __init__(self, parent=None):
125-
self.app = QApplication.instance()
126-
if not self.app:
127-
self.app = QApplication(sys.argv)
128-
self.MainWindow = QMainWindow()
129-
self.MainWindow.setWindowTitle("Multitabs figure")
130-
self.canvases = []
131-
self.figure_handles = []
132-
self.toolbar_handles = []
133-
self.tab_handles = []
134-
self.current_window = -1
135-
self.tabs = QTabWidget()
136-
self.MainWindow.setCentralWidget(self.tabs)
137-
self.MainWindow.resize(1280, 720)
138-
self.MainWindow.show()
139-
140-
def addPlot(self, title, figure):
141-
new_tab = QWidget()
142-
layout = QVBoxLayout()
143-
new_tab.setLayout(layout)
144-
145-
figure.subplots_adjust(left=0.1, right=0.99, bottom=0.1, top=0.91, wspace=0.2, hspace=0.2)
146-
new_canvas = FigureCanvas(figure)
147-
new_toolbar = NavigationToolbar(new_canvas, new_tab)
148-
149-
layout.addWidget(new_canvas)
150-
layout.addWidget(new_toolbar)
151-
self.tabs.addTab(new_tab, title)
152-
153-
self.toolbar_handles.append(new_toolbar)
154-
self.canvases.append(new_canvas)
155-
self.figure_handles.append(figure)
156-
self.tab_handles.append(new_tab)
157-
158-
def show(self):
159-
self.app.exec_()
160-
161108
## FUNCTIONS
162109
def to_dict(d):
163110
'''

0 commit comments

Comments
 (0)