mg-pso-gui 0.1.206__py3-none-any.whl → 0.1.208__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.206.dist-info → mg_pso_gui-0.1.208.dist-info}/METADATA +1 -1
- {mg_pso_gui-0.1.206.dist-info → mg_pso_gui-0.1.208.dist-info}/RECORD +6 -6
- mgpsogui/util/GraphGenerator.py +56 -30
- {mg_pso_gui-0.1.206.dist-info → mg_pso_gui-0.1.208.dist-info}/WHEEL +0 -0
- {mg_pso_gui-0.1.206.dist-info → mg_pso_gui-0.1.208.dist-info}/entry_points.txt +0 -0
- {mg_pso_gui-0.1.206.dist-info → mg_pso_gui-0.1.208.dist-info}/top_level.txt +0 -0
@@ -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=31JxeBlcwazCmchQomi8sTFP0AS2AhHurEN2QGSMZ6w,25798
|
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.208.dist-info/METADATA,sha256=FE-5cXZia8Hh1SqZVXzzkctyeZUD5ymmiZ9_b-Jw7mU,9456
|
64
|
+
mg_pso_gui-0.1.208.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
|
65
|
+
mg_pso_gui-0.1.208.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
|
66
|
+
mg_pso_gui-0.1.208.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
|
67
|
+
mg_pso_gui-0.1.208.dist-info/RECORD,,
|
mgpsogui/util/GraphGenerator.py
CHANGED
@@ -7,6 +7,7 @@ import os
|
|
7
7
|
from PIL import Image, ImageTk
|
8
8
|
import customtkinter
|
9
9
|
import traceback
|
10
|
+
import math
|
10
11
|
|
11
12
|
theme_background_color = {
|
12
13
|
"Dark": 'rgba(42, 42, 42, 0)',
|
@@ -22,14 +23,14 @@ theme_background_color_html = {
|
|
22
23
|
|
23
24
|
theme_plot_color = {
|
24
25
|
"Dark": 'rgb(62, 62, 62)',
|
25
|
-
"Light": '
|
26
|
-
"Publication": '
|
26
|
+
"Light": 'rgba(245,245,255,255)',
|
27
|
+
"Publication": 'rgba(245,245,255,255)'
|
27
28
|
}
|
28
29
|
|
29
30
|
theme_grid_color = {
|
30
31
|
"Dark": 'rgb(72, 72, 72)',
|
31
|
-
"Light": 'rgb(
|
32
|
-
"Publication": 'rgb(
|
32
|
+
"Light": 'rgb(255, 255, 255)',
|
33
|
+
"Publication": 'rgb(255, 255, 255)'
|
33
34
|
}
|
34
35
|
|
35
36
|
theme_line_color = {
|
@@ -44,6 +45,20 @@ theme_font_color = {
|
|
44
45
|
"Publication": 'black'
|
45
46
|
}
|
46
47
|
|
48
|
+
theme_plot_color_pallet = [
|
49
|
+
"rgba(151, 209, 233, 255)",
|
50
|
+
"rgba(0, 120, 179, 255)",
|
51
|
+
"rgba(179, 223, 146, 255)",
|
52
|
+
"rgba(49, 169, 90, 255)",
|
53
|
+
"rgba(227, 136, 220, 255)",
|
54
|
+
"rgba(127, 0, 255, 255)",
|
55
|
+
"rgba(255, 128, 0, 255)",
|
56
|
+
"rgba(255, 99, 71, 255)",
|
57
|
+
"rgba(102, 205, 170, 255)",
|
58
|
+
"rgba(255, 215, 0, 255)",
|
59
|
+
"rgba(70, 130, 180, 255)"
|
60
|
+
]
|
61
|
+
|
47
62
|
def generate_graphs(HomePage):
|
48
63
|
|
49
64
|
try:
|
@@ -101,8 +116,10 @@ def best_cost_stacked(homepage, config, data, option_manager):
|
|
101
116
|
total_steps = len(config)
|
102
117
|
|
103
118
|
# Get unique values from the round_step column of the dataframe
|
119
|
+
pp = 0
|
104
120
|
for round_step in data.keys():
|
105
|
-
fig.add_trace(go.Scatter(x=data[round_step]["percent"], y=data[round_step]["best_cost"], name=round_step))
|
121
|
+
fig.add_trace(go.Scatter(x=data[round_step]["percent"], y=data[round_step]["best_cost"], name=round_step, marker_color=theme_plot_color_pallet[pp]))
|
122
|
+
pp += 1
|
106
123
|
|
107
124
|
fig.update_layout(
|
108
125
|
title="",
|
@@ -198,6 +215,7 @@ def best_cost_by_round(homepage, config, data, option_manager):
|
|
198
215
|
|
199
216
|
total_steps = len(config)
|
200
217
|
|
218
|
+
pp = 0
|
201
219
|
# Get unique values from the round_step column of the dataframe
|
202
220
|
for round_step in data.keys():
|
203
221
|
#for iteration in dataframe['round_step'].unique():
|
@@ -210,8 +228,9 @@ def best_cost_by_round(homepage, config, data, option_manager):
|
|
210
228
|
#step_index = ((iteration) % total_steps)
|
211
229
|
#round_index = ((iteration) // total_steps)
|
212
230
|
|
213
|
-
fig.add_trace(go.Scatter(x=np.array(data[round_step]['percent']) + (100 * round_index), y=data[round_step]['best_cost'], name=round_step))
|
214
|
-
|
231
|
+
fig.add_trace(go.Scatter(x=np.array(data[round_step]['percent']) + (100 * round_index), y=data[round_step]['best_cost'], name=round_step, marker_color=theme_plot_color_pallet[pp]))
|
232
|
+
pp += 1
|
233
|
+
|
215
234
|
#fig.add_trace(go.Scatter(x=df['completed_rounds'] + (df['total_rounds'] * round_index), y=df['best_cost'], name='Group ' + str(step_index + 1)))
|
216
235
|
|
217
236
|
|
@@ -298,12 +317,14 @@ def calibrated_params_by_round(homepage, config, list_of_objs, option_manager):
|
|
298
317
|
round += 1
|
299
318
|
|
300
319
|
# Get unique values from the round_step column of the dataframe
|
320
|
+
pp = 0
|
301
321
|
for key in datalines.keys():
|
302
322
|
# Get best_cost and completed rounds rows for this iteration
|
303
323
|
if key == 'step' or key == 'round':
|
304
324
|
continue
|
305
325
|
|
306
|
-
fig.add_trace(go.Scatter(x=datalines['round'], y=datalines[key], name=key))
|
326
|
+
fig.add_trace(go.Scatter(x=datalines['round'], y=datalines[key], name=key, marker_color=theme_plot_color_pallet[pp]))
|
327
|
+
pp += 1
|
307
328
|
|
308
329
|
fig.update_layout(
|
309
330
|
title="",
|
@@ -369,8 +390,8 @@ def custom_csv(homepage, option_manager):
|
|
369
390
|
if "Unit" in homepage.csv_data["data_attributes"]:
|
370
391
|
yy2_unit = homepage.csv_data["data_attributes"]["Unit"][val2]
|
371
392
|
|
372
|
-
fig.add_trace(go.Scatter(x=xx, y=yy, name=val))
|
373
|
-
fig.add_trace(go.Scatter(x=xx, y=yy2, name=val2, yaxis='y2'))
|
393
|
+
fig.add_trace(go.Scatter(x=xx, y=yy, name=val, marker_color=theme_plot_color_pallet[1]))
|
394
|
+
fig.add_trace(go.Scatter(x=xx, y=yy2, name=val2, yaxis='y2', marker_color=theme_plot_color_pallet[3]))
|
374
395
|
|
375
396
|
fig.update_layout(
|
376
397
|
title="",
|
@@ -452,8 +473,8 @@ def compare_csv(homepage, option_manager):
|
|
452
473
|
if "Unit" in homepage.csv_data["data_attributes"]:
|
453
474
|
yy2_unit = homepage.csv_data["data_attributes"]["Unit"][val2]
|
454
475
|
|
455
|
-
fig.add_trace(go.Scatter(x=xx, y=yy, name=val))
|
456
|
-
fig.add_trace(go.Scatter(x=xx2, y=yy2, name=val2, yaxis='y2'))
|
476
|
+
fig.add_trace(go.Scatter(x=xx, y=yy, name=val, marker_color=theme_plot_color_pallet[1]))
|
477
|
+
fig.add_trace(go.Scatter(x=xx2, y=yy2, name=val2, yaxis='y2', marker_color=theme_plot_color_pallet[3]))
|
457
478
|
|
458
479
|
fig.update_layout(
|
459
480
|
title="",
|
@@ -525,20 +546,20 @@ def sampling_csv(homepage, option_manager):
|
|
525
546
|
yy2_unit = ""
|
526
547
|
|
527
548
|
if (style == "Scatter"):
|
528
|
-
fig.add_trace(go.Scatter(x=xx, y=yy, name=val, mode='markers'))
|
529
|
-
fig.add_trace(go.Scatter(x=xx, y=yy2, name=val2, yaxis='y2', mode='markers'))
|
549
|
+
fig.add_trace(go.Scatter(x=xx, y=yy, name=val, mode='markers', marker_color=theme_plot_color_pallet[1]))
|
550
|
+
fig.add_trace(go.Scatter(x=xx, y=yy2, name=val2, yaxis='y2', mode='markers', marker_color=theme_plot_color_pallet[3]))
|
530
551
|
elif (style == "Bars"):
|
531
|
-
fig.add_trace(go.Bar(x=xx, y=yy, name=val))
|
532
|
-
fig.add_trace(go.Bar(x=xx, y=yy2, name=val2, yaxis='y2'))
|
552
|
+
fig.add_trace(go.Bar(x=xx, y=yy, name=val, marker_color=theme_plot_color_pallet[1]))
|
553
|
+
fig.add_trace(go.Bar(x=xx, y=yy2, name=val2, yaxis='y2', marker_color=theme_plot_color_pallet[3]))
|
533
554
|
elif (style == "Lines"):
|
534
|
-
fig.add_trace(go.Scatter(x=xx, y=yy, name=val))
|
535
|
-
fig.add_trace(go.Scatter(x=xx, y=yy2, name=val2, yaxis='y2'))
|
555
|
+
fig.add_trace(go.Scatter(x=xx, y=yy, name=val, marker_color=theme_plot_color_pallet[1]))
|
556
|
+
fig.add_trace(go.Scatter(x=xx, y=yy2, name=val2, yaxis='y2', marker_color=theme_plot_color_pallet[3]))
|
536
557
|
elif (style == "Area"):
|
537
|
-
fig.add_trace(go.Scatter(x=xx, y=yy, name=val, fill='tozeroy'))
|
538
|
-
fig.add_trace(go.Scatter(x=xx, y=yy2, name=val2, yaxis='y2', fill='tozeroy'))
|
558
|
+
fig.add_trace(go.Scatter(x=xx, y=yy, name=val, fill='tozeroy', marker_color=theme_plot_color_pallet[1]))
|
559
|
+
fig.add_trace(go.Scatter(x=xx, y=yy2, name=val2, yaxis='y2', fill='tozeroy', marker_color=theme_plot_color_pallet[3]))
|
539
560
|
elif (style == "Box"):
|
540
|
-
fig.add_trace(go.Box(x=xx, y=yy, name=val))
|
541
|
-
fig.add_trace(go.Box(x=xx, y=yy2, name=val2, yaxis='y2'))
|
561
|
+
fig.add_trace(go.Box(x=xx, y=yy, name=val, marker_color=theme_plot_color_pallet[1]))
|
562
|
+
fig.add_trace(go.Box(x=xx, y=yy2, name=val2, yaxis='y2', marker_color=theme_plot_color_pallet[3]))
|
542
563
|
|
543
564
|
fig.update_layout(
|
544
565
|
title="",
|
@@ -612,11 +633,14 @@ def matrix_editor(homepage, option_manager):
|
|
612
633
|
figures_per_row = 3
|
613
634
|
elif (total_figures == 7 or total_figures == 8):
|
614
635
|
figures_per_row = 4
|
615
|
-
elif (total_figures == 9
|
616
|
-
figures_per_row =
|
636
|
+
elif (total_figures == 9):
|
637
|
+
figures_per_row = 3
|
638
|
+
else:
|
639
|
+
figures_per_row = 4
|
617
640
|
|
618
|
-
fig_combined = make_subplots(rows=(total_figures
|
641
|
+
fig_combined = make_subplots(rows=(math.ceil(total_figures / figures_per_row)), cols=figures_per_row, shared_xaxes=False, shared_yaxes=False)
|
619
642
|
|
643
|
+
pp = 0
|
620
644
|
for parameter in figure_parameters:
|
621
645
|
name = parameter['name'].get()
|
622
646
|
|
@@ -638,15 +662,17 @@ def matrix_editor(homepage, option_manager):
|
|
638
662
|
yy_unit = ""
|
639
663
|
|
640
664
|
if (style == "Scatter"):
|
641
|
-
fig.add_trace(go.Scatter(x=yy, y=xx, name=val, mode='markers'))
|
665
|
+
fig.add_trace(go.Scatter(x=yy, y=xx, name=val, mode='markers', marker_color=theme_plot_color_pallet[pp]))
|
642
666
|
elif (style == "Bars"):
|
643
|
-
fig.add_trace(go.Bar(x=yy, y=xx, name=val))
|
667
|
+
fig.add_trace(go.Bar(x=yy, y=xx, name=val, marker_color=theme_plot_color_pallet[pp]))
|
644
668
|
elif (style == "Lines"):
|
645
|
-
fig.add_trace(go.Scatter(x=yy, y=xx, name=val))
|
669
|
+
fig.add_trace(go.Scatter(x=yy, y=xx, name=val, marker_color=theme_plot_color_pallet[pp]))
|
646
670
|
elif (style == "Area"):
|
647
|
-
fig.add_trace(go.Scatter(x=yy, y=xx, name=val, fill='tozeroy'))
|
671
|
+
fig.add_trace(go.Scatter(x=yy, y=xx, name=val, fill='tozeroy', marker_color=theme_plot_color_pallet[pp]))
|
648
672
|
elif (style == "Box"):
|
649
|
-
fig.add_trace(go.Box(x=yy, y=xx, name=val))
|
673
|
+
fig.add_trace(go.Box(x=yy, y=xx, name=val, marker_color=theme_plot_color_pallet[pp]))
|
674
|
+
|
675
|
+
pp += 1
|
650
676
|
|
651
677
|
fig.update_layout(
|
652
678
|
title="",
|
File without changes
|
File without changes
|
File without changes
|