mg-pso-gui 0.1.210__py3-none-any.whl → 0.1.213__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mg_pso_gui-0.1.210.dist-info → mg_pso_gui-0.1.213.dist-info}/METADATA +1 -1
- {mg_pso_gui-0.1.210.dist-info → mg_pso_gui-0.1.213.dist-info}/RECORD +7 -7
- mgpsogui/gui/VisualizeTab/VisualizeTab.py +55 -1
- mgpsogui/util/GraphGenerator.py +2 -2
- {mg_pso_gui-0.1.210.dist-info → mg_pso_gui-0.1.213.dist-info}/WHEEL +0 -0
- {mg_pso_gui-0.1.210.dist-info → mg_pso_gui-0.1.213.dist-info}/entry_points.txt +0 -0
- {mg_pso_gui-0.1.210.dist-info → mg_pso_gui-0.1.213.dist-info}/top_level.txt +0 -0
@@ -21,7 +21,7 @@ mgpsogui/gui/SetupTab/StepView.py,sha256=C6DDinU9AgaUM1EOAHetFI4bE89ANJ247F0doks
|
|
21
21
|
mgpsogui/gui/SetupTab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
22
|
mgpsogui/gui/VisualizeTab/MatrixEditor.py,sha256=JPQmfljdddIwHtTKpFqUdk7hRzVdX-IKl4neOk3DsjM,3132
|
23
23
|
mgpsogui/gui/VisualizeTab/SideBar.py,sha256=MtZfDScNFN0fQ8DyPm6bZGJSrFRgT14fZeUq-qc61O8,21936
|
24
|
-
mgpsogui/gui/VisualizeTab/VisualizeTab.py,sha256=
|
24
|
+
mgpsogui/gui/VisualizeTab/VisualizeTab.py,sha256=JCm4qOe_l2vVTabBjGUHAK6fl21UQ4RhRLll_PIUFWI,6832
|
25
25
|
mgpsogui/gui/VisualizeTab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
26
26
|
mgpsogui/gui/images/IGOW 4 Logo.png,sha256=JixNXz5gOEj898VF-_PHthAlGU-6W-y9ucb4EVNPtjs,433752
|
27
27
|
mgpsogui/gui/images/collapse.png,sha256=yicb16LaY7Nl5q9V8HHlht-Fbg5xU-l4_LJ_Arfmu1c,2989
|
@@ -34,7 +34,7 @@ mgpsogui/gui/images/stop.png,sha256=JPuxXQerCGpLikcp7cAj3iLCOjULMYYZ2sZe0lArh68,
|
|
34
34
|
mgpsogui/gui/images/test.png,sha256=MUnVpRK-isxhEHzx4Q6Yh0M6FRZD1qvgCHH2XmiSBbk,3642
|
35
35
|
mgpsogui/gui/images/trash.png,sha256=j8cf0kWbJd-4Jp20lUVV1o1NSeQ4v1Ej4gfcIA3DVRQ,2958
|
36
36
|
mgpsogui/gui/images/up.png,sha256=AQvFWCUqSQNaQ1E6LKZ9zNfSvW6t4mgy8uswdg9T2Hg,2457
|
37
|
-
mgpsogui/util/GraphGenerator.py,sha256=
|
37
|
+
mgpsogui/util/GraphGenerator.py,sha256=dkrGl5rkKJdloi_Mm-TKw4gEddpFlTJxiF1HZEH8Pzc,28627
|
38
38
|
mgpsogui/util/PSORunner.py,sha256=ELpRgEpUiLV4hW-A-y4yzfkFN1BXgH7LZ0qlwWBRz3s,11012
|
39
39
|
mgpsogui/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
40
40
|
mgpsogui/util/debug.py,sha256=Swzny9_1S-CCONWGssj9iDoSpbwu5Vr4f95g_9L8bec,19759
|
@@ -60,8 +60,8 @@ mgpsogui/util/recosu/utils/trace_writer.py,sha256=V9BJlOjCbNYGoXGEk3CF5wjifBxvar
|
|
60
60
|
mgpsogui/util/recosu/utils/utils.py,sha256=QB8vftq3142ekG0ORjz0ZBHU5YknXbR0oTsrxrPAsF0,3951
|
61
61
|
mgpsogui/util/recosu/utils/plot/__init__.py,sha256=h1KjM7_tNDv351pcwt8A6Ibb1jhwWyx5Gbu-zj-sI3Q,71
|
62
62
|
mgpsogui/util/recosu/utils/plot/cost_steps.py,sha256=1Ce11AJyweWkmvjXPxEygzS-h8yVLmQEDLS53yjPLqQ,3779
|
63
|
-
mg_pso_gui-0.1.
|
64
|
-
mg_pso_gui-0.1.
|
65
|
-
mg_pso_gui-0.1.
|
66
|
-
mg_pso_gui-0.1.
|
67
|
-
mg_pso_gui-0.1.
|
63
|
+
mg_pso_gui-0.1.213.dist-info/METADATA,sha256=q1SRoqQHAafc-bm4NWTM4RlNyqrhWYY04R-IfnDWfEw,9456
|
64
|
+
mg_pso_gui-0.1.213.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
|
65
|
+
mg_pso_gui-0.1.213.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
|
66
|
+
mg_pso_gui-0.1.213.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
|
67
|
+
mg_pso_gui-0.1.213.dist-info/RECORD,,
|
@@ -4,6 +4,7 @@ from PIL import Image, ImageTk
|
|
4
4
|
import os
|
5
5
|
import platform
|
6
6
|
import subprocess
|
7
|
+
import shutil
|
7
8
|
|
8
9
|
from . import SideBar
|
9
10
|
|
@@ -27,7 +28,60 @@ def create_tab(self, tab):
|
|
27
28
|
subprocess.Popen(["xdg-open", file_path])
|
28
29
|
|
29
30
|
def export_graph():
|
30
|
-
|
31
|
+
|
32
|
+
info = self.option_manager.get_project_data()
|
33
|
+
folder = os.path.join(info['path'], info['name'])
|
34
|
+
|
35
|
+
if not os.path.exists(folder):
|
36
|
+
os.makedirs(folder)
|
37
|
+
|
38
|
+
html_file = os.path.join(folder, self.selected_graph_name + ".html")
|
39
|
+
json_file = os.path.join(folder, self.selected_graph_name + ".json")
|
40
|
+
png_file = os.path.join(folder, self.selected_graph_name + ".png")
|
41
|
+
pdf_file = os.path.join(folder, self.selected_graph_name + ".pdf")
|
42
|
+
|
43
|
+
# Make a directory call package
|
44
|
+
if not os.path.exists(os.path.join(folder, self.selected_graph_name + "_package")):
|
45
|
+
os.makedirs(os.path.join(folder, self.selected_graph_name + "_package"))
|
46
|
+
|
47
|
+
# Check if html_file exists and copy it to the package directory
|
48
|
+
if os.path.exists(html_file):
|
49
|
+
with open(html_file, 'r') as file:
|
50
|
+
data = file.read()
|
51
|
+
with open(os.path.join(folder, self.selected_graph_name + "_package", self.selected_graph_name + ".html"), 'w') as new_file:
|
52
|
+
new_file.write(data)
|
53
|
+
|
54
|
+
# Check if json_file exists and copy it to the package directory
|
55
|
+
if os.path.exists(json_file):
|
56
|
+
with open(json_file, 'r') as file:
|
57
|
+
data = file.read()
|
58
|
+
with open(os.path.join(folder, self.selected_graph_name + "_package", self.selected_graph_name + ".json"), 'w') as new_file:
|
59
|
+
new_file.write(data)
|
60
|
+
|
61
|
+
# Check if png_file exists and copy it to the package directory
|
62
|
+
if os.path.exists(png_file):
|
63
|
+
with open(png_file, 'rb') as file:
|
64
|
+
data = file.read()
|
65
|
+
with open(os.path.join(folder, self.selected_graph_name + "_package", self.selected_graph_name + ".png"), 'wb') as new_file:
|
66
|
+
new_file.write(data)
|
67
|
+
|
68
|
+
# Check if pdf_file exists and copy it to the package directory
|
69
|
+
if os.path.exists(pdf_file):
|
70
|
+
with open(pdf_file, 'rb') as file:
|
71
|
+
data = file.read()
|
72
|
+
with open(os.path.join(folder, self.selected_graph_name + "_package", self.selected_graph_name + ".pdf"), 'wb') as new_file:
|
73
|
+
new_file.write(data)
|
74
|
+
|
75
|
+
# Zip the package directory
|
76
|
+
shutil.make_archive(os.path.join(folder, self.selected_graph_name + "_package"), 'zip', os.path.join(folder, self.selected_graph_name + "_package"))
|
77
|
+
|
78
|
+
# Open the directory containing the package
|
79
|
+
if platform.system() == "Windows":
|
80
|
+
os.startfile(os.path.join(folder, self.selected_graph_name + "_package"))
|
81
|
+
elif platform.system() == "Darwin":
|
82
|
+
subprocess.Popen(["open", os.path.join(folder, self.selected_graph_name + "_package")])
|
83
|
+
else:
|
84
|
+
subprocess.Popen(["xdg-open", os.path.join(folder, self.selected_graph_name + "_package")])
|
31
85
|
|
32
86
|
def _resize_image(event):
|
33
87
|
self.graph_label.update_idletasks()
|
mgpsogui/util/GraphGenerator.py
CHANGED
@@ -670,7 +670,7 @@ def matrix_editor(homepage, option_manager):
|
|
670
670
|
all_figures = []
|
671
671
|
figure_parameters = option_manager.get_arguments()['figure_parameters']
|
672
672
|
|
673
|
-
color_list = ['#636EFA', '#EF553B', '#00CC96', '#AB63FA', '#FFA15A', '#19D3F3', '#FF6692', '#B6E880', '#FF97FF', '#FECB52']
|
673
|
+
#color_list = ['#636EFA', '#EF553B', '#00CC96', '#AB63FA', '#FFA15A', '#19D3F3', '#FF6692', '#B6E880', '#FF97FF', '#FECB52']
|
674
674
|
color_index = 0
|
675
675
|
color_dict = {}
|
676
676
|
|
@@ -766,7 +766,7 @@ def matrix_editor(homepage, option_manager):
|
|
766
766
|
for trace in fig.data:
|
767
767
|
|
768
768
|
if trace.name not in color_dict:
|
769
|
-
color_dict[trace.name] =
|
769
|
+
color_dict[trace.name] = theme_plot_color_pallet[color_index % len(theme_plot_color_pallet)]
|
770
770
|
color_index += 1
|
771
771
|
|
772
772
|
trace.marker.color = color_dict[trace.name]
|
File without changes
|
File without changes
|
File without changes
|