mg-pso-gui 0.1.204__py3-none-any.whl → 0.1.206__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mg-pso-gui
3
- Version: 0.1.204
3
+ Version: 0.1.206
4
4
  Summary: GUI for MG-PSO
5
5
  Author: Robert Cordingly
6
6
  Author-email: <rcording@uw.ed>
@@ -1,7 +1,7 @@
1
1
  mgpsogui/__init__.py,sha256=q7AfBjeJABnFtbsZnsObpUwaXKPDVYtz46G6MKXLF74,42
2
2
  mgpsogui/mgpsogui.py,sha256=NIZmyNcbwC8EgSwf1ubdMUSJscrIEgoD4jLYziqHQ-k,148
3
3
  mgpsogui/start.yaml,sha256=ZjCVLb-MLqAxrGRm9kA7_SDpa-45EuKIELNQ2QqCAiU,4713
4
- mgpsogui/gui/HomePage.py,sha256=S4vm9gtwoWjfbNmFSX5e-_l18ti0YIFulrH9a3v953s,22845
4
+ mgpsogui/gui/HomePage.py,sha256=L2Vj2B6BzdXvoi6CkLWgxvtrzRMPJlF2sfbB8VpCVyc,22925
5
5
  mgpsogui/gui/OptionManager.py,sha256=dtWY5jzNAaL6t3q7SLHiwoKQOYrAsMGE5UqwYdmPzF4,14829
6
6
  mgpsogui/gui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  mgpsogui/gui/PlatformTab/PlatformTab.py,sha256=q8x_tvVgSoyGINuQbivXRThF3gaSSfg8X_dsLSPv4F0,10492
@@ -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=_SiRDUvYJ7VUmMZ_VzylWP2tFygbLzWeUCGW3TU3yZM,3466
24
+ mgpsogui/gui/VisualizeTab/VisualizeTab.py,sha256=gLDuI6rS21rYZ9v-77qffmtTp3NS9DdohrMQgo_JZvY,3953
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=OyCPwIDkbRzNZiJQII3F76yTKj_EdeMiE8vaih-n5lE,22811
37
+ mgpsogui/util/GraphGenerator.py,sha256=Orr_OPne3GsE3StDtEbg87fK1Mu46k6iOBuHozXTjPg,24358
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.204.dist-info/METADATA,sha256=tdWt8lx-iN5HvTlUc5fXK6YG-19LCCGsH_ES9YttD4Q,9456
64
- mg_pso_gui-0.1.204.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
65
- mg_pso_gui-0.1.204.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
66
- mg_pso_gui-0.1.204.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
67
- mg_pso_gui-0.1.204.dist-info/RECORD,,
63
+ mg_pso_gui-0.1.206.dist-info/METADATA,sha256=4Jxvwcq9y9U9ZjGGjdyMu1L0-iawM4i65WkwGPG_9Cg,9456
64
+ mg_pso_gui-0.1.206.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
65
+ mg_pso_gui-0.1.206.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
66
+ mg_pso_gui-0.1.206.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
67
+ mg_pso_gui-0.1.206.dist-info/RECORD,,
mgpsogui/gui/HomePage.py CHANGED
@@ -66,6 +66,9 @@ class App(customtkinter.CTk):
66
66
  self.graph_selector_value = tk.StringVar()
67
67
  self.graph_selector_value.set("Best Cost Stacked")
68
68
 
69
+ self.graph_theme_value = tk.StringVar()
70
+ self.graph_theme_value.set("Dark")
71
+
69
72
  self.selected_csv = tk.StringVar()
70
73
  self.selected_csv.set("No files found...")
71
74
  self.open_file = "None"
@@ -25,6 +25,9 @@ def create_tab(self, tab):
25
25
  subprocess.Popen(["open", file_path])
26
26
  else:
27
27
  subprocess.Popen(["xdg-open", file_path])
28
+
29
+ def export_graph():
30
+ pass
28
31
 
29
32
  def _resize_image(event):
30
33
  self.graph_label.update_idletasks()
@@ -66,10 +69,17 @@ def create_tab(self, tab):
66
69
 
67
70
  # Create SideBar
68
71
  self.vis_sidebar = SideBar.SideBar(self.graph_sidebar, option_manager=self.option_manager, home_page=self, fg_color="transparent")
69
- self.vis_sidebar.grid(row=1, column=0, rowspan=8, padx=(0, 0), pady=(0, 0), sticky="nsew")
72
+ self.vis_sidebar.grid(row=1, column=0, rowspan=6, padx=(0, 0), pady=(0, 0), sticky="nsew")
70
73
 
74
+
75
+ self.graph_theme = customtkinter.CTkOptionMenu(self.graph_sidebar, values=["Dark", "Light", "Publication"], variable=self.graph_theme_value, command=self.update_graph)
76
+ self.graph_theme.grid(row=7, column=0, padx=(20, 20), pady=(20, 20), sticky="nsew")
77
+
78
+ self.graph_export = customtkinter.CTkButton(self.graph_sidebar, text="Export", command=export_graph)
79
+ self.graph_export.grid(row=8, column=0, padx=(20, 20), pady=(20, 20), sticky="nsew")
80
+
71
81
  # Add a button to call open_graph_in_browser
72
- self.graph_button = customtkinter.CTkButton(self.graph_sidebar, text="Open in Browser", command=open_graph_in_browser)
82
+ self.graph_button = customtkinter.CTkButton(self.graph_sidebar, text="Preview", command=open_graph_in_browser)
73
83
  self.graph_button.grid(row=9, column=0, padx=(20, 20), pady=(20, 20), sticky="nsew")
74
84
 
75
85
  self.graph_image_obj = Image.open(os.path.join("./images", "refresh_hd.png"))
@@ -8,7 +8,44 @@ from PIL import Image, ImageTk
8
8
  import customtkinter
9
9
  import traceback
10
10
 
11
+ theme_background_color = {
12
+ "Dark": 'rgba(42, 42, 42, 0)',
13
+ "Light": 'rgba(255, 255, 255, 0)',
14
+ "Publication": 'rgba(255, 255, 255, 0)'
15
+ }
16
+
17
+ theme_background_color_html = {
18
+ "Dark": '#2a2a2a',
19
+ "Light": '#ffffff',
20
+ "Publication": '#ffffff'
21
+ }
22
+
23
+ theme_plot_color = {
24
+ "Dark": 'rgb(62, 62, 62)',
25
+ "Light": 'rgb(242, 242, 242)',
26
+ "Publication": 'rgb(242, 242, 242)'
27
+ }
28
+
29
+ theme_grid_color = {
30
+ "Dark": 'rgb(72, 72, 72)',
31
+ "Light": 'rgb(242, 242, 242)',
32
+ "Publication": 'rgb(242, 242, 242)'
33
+ }
34
+
35
+ theme_line_color = {
36
+ "Dark": 'rgb(102, 102, 102)',
37
+ "Light": 'rgb(102, 102, 102)',
38
+ "Publication": 'rgb(102, 102, 102)'
39
+ }
40
+
41
+ theme_font_color = {
42
+ "Dark": 'white',
43
+ "Light": 'black',
44
+ "Publication": 'black'
45
+ }
46
+
11
47
  def generate_graphs(HomePage):
48
+
12
49
  try:
13
50
  selected_graph = HomePage.graph_selector_value.get()
14
51
  info = HomePage.option_manager.get_project_data()
@@ -18,16 +55,16 @@ def generate_graphs(HomePage):
18
55
 
19
56
  if (selected_graph == "Best Cost Stacked"):
20
57
  HomePage.selected_graph_name = "best_cost_stacked"
21
- best_cost_stacked(HomePage.running_config['steps'], HomePage.progress_data, HomePage.option_manager)
58
+ best_cost_stacked(HomePage, HomePage.running_config['steps'], HomePage.progress_data, HomePage.option_manager)
22
59
  elif (selected_graph == "Best Cost by Round"):
23
60
  HomePage.selected_graph_name = "best_cost_by_round"
24
- best_cost_by_round(HomePage.running_config['steps'], HomePage.progress_data, HomePage.option_manager)
61
+ best_cost_by_round(HomePage, HomePage.running_config['steps'], HomePage.progress_data, HomePage.option_manager)
25
62
  elif (selected_graph == "Iteration Table"):
26
63
  HomePage.selected_graph_name = "table"
27
- table(HomePage.running_config['steps'], HomePage.progress_data, HomePage.option_manager)
64
+ table(HomePage, HomePage.running_config['steps'], HomePage.progress_data, HomePage.option_manager)
28
65
  elif (selected_graph == "Calibrated Parameters"):
29
66
  HomePage.selected_graph_name = "calibrated_params_by_round"
30
- calibrated_params_by_round(HomePage.running_config['steps'], HomePage.calibration_data, HomePage.option_manager)
67
+ calibrated_params_by_round(HomePage, HomePage.running_config['steps'], HomePage.calibration_data, HomePage.option_manager)
31
68
  elif (selected_graph == "Custom CSV"):
32
69
  HomePage.selected_graph_name = "custom_csv"
33
70
  custom_csv(HomePage, HomePage.option_manager)
@@ -56,7 +93,9 @@ def generate_graphs(HomePage):
56
93
  print("Traceback:")
57
94
  traceback.print_exc()
58
95
 
59
- def best_cost_stacked(config, data, option_manager):
96
+ def best_cost_stacked(homepage, config, data, option_manager):
97
+ theme = homepage.graph_theme_value.get()
98
+
60
99
  fig = go.Figure()
61
100
 
62
101
  total_steps = len(config)
@@ -69,17 +108,17 @@ def best_cost_stacked(config, data, option_manager):
69
108
  title="",
70
109
  xaxis_title="Progress (% through Group)",
71
110
  yaxis_title="Best Cost",
72
- font=dict(color='white'),
73
- paper_bgcolor='rgba(42, 42, 42, 0)',
74
- plot_bgcolor='rgb(62, 62, 62)',
111
+ font=dict(color=theme_font_color[theme]),
112
+ paper_bgcolor=theme_background_color[theme],
113
+ plot_bgcolor=theme_plot_color[theme],
75
114
  xaxis=dict(
76
- gridcolor='rgb(72, 72, 72)',
115
+ gridcolor=theme_grid_color[theme],
77
116
  gridwidth=1
78
117
  ),
79
118
  yaxis=dict(
80
119
  range=[0, 0.6],
81
120
  autorange=True,
82
- gridcolor='rgb(72, 72, 72)',
121
+ gridcolor=theme_grid_color[theme],
83
122
  gridwidth=0.1
84
123
  )
85
124
  )
@@ -101,7 +140,9 @@ def best_cost_stacked(config, data, option_manager):
101
140
 
102
141
  return fig
103
142
 
104
- def table(config, dataframe, option_manager):
143
+ def table(homepage, config, dataframe, option_manager):
144
+ theme = homepage.graph_theme_value.get()
145
+
105
146
  # Create a plotly table with the values in the dataframe
106
147
  fig = go.Figure(data=[go.Table(
107
148
  header=dict(
@@ -119,17 +160,17 @@ def table(config, dataframe, option_manager):
119
160
  title="",
120
161
  xaxis_title="Iteration",
121
162
  yaxis_title="Best Cost",
122
- font=dict(color='white'),
123
- paper_bgcolor='rgba(42, 42, 42, 0)',
124
- plot_bgcolor='rgb(62, 62, 62)',
163
+ font=dict(color=theme_font_color[theme]),
164
+ paper_bgcolor=theme_background_color[theme],
165
+ plot_bgcolor=theme_plot_color[theme],
125
166
  xaxis=dict(
126
- gridcolor='rgb(72, 72, 72)',
167
+ gridcolor=theme_grid_color[theme],
127
168
  gridwidth=1
128
169
  ),
129
170
  yaxis=dict(
130
171
  range=[0, 0.6],
131
172
  autorange=True,
132
- gridcolor='rgb(72, 72, 72)',
173
+ gridcolor=theme_grid_color[theme],
133
174
  gridwidth=0.1
134
175
  )
135
176
  )
@@ -150,7 +191,9 @@ def table(config, dataframe, option_manager):
150
191
 
151
192
  return fig
152
193
 
153
- def best_cost_by_round(config, data, option_manager):
194
+ def best_cost_by_round(homepage, config, data, option_manager):
195
+ theme = homepage.graph_theme_value.get()
196
+
154
197
  fig = go.Figure()
155
198
 
156
199
  total_steps = len(config)
@@ -181,7 +224,7 @@ def best_cost_by_round(config, data, option_manager):
181
224
  y1=1,
182
225
  yref='paper',
183
226
  line=dict(
184
- color='rgb(102, 102, 102)',
227
+ color=theme_line_color[theme],
185
228
  width=2
186
229
  )
187
230
  )
@@ -199,17 +242,17 @@ def best_cost_by_round(config, data, option_manager):
199
242
  title="",
200
243
  xaxis_title="Progress (%)",
201
244
  yaxis_title="Best Cost",
202
- font=dict(color='white'),
203
- paper_bgcolor='rgba(42, 42, 42, 0)',
204
- plot_bgcolor='rgb(62, 62, 62)',
245
+ font=dict(color=theme_font_color[theme]),
246
+ paper_bgcolor=theme_background_color[theme],
247
+ plot_bgcolor=theme_plot_color[theme],
205
248
  xaxis=dict(
206
- gridcolor='rgb(72, 72, 72)',
249
+ gridcolor=theme_grid_color[theme],
207
250
  gridwidth=1
208
251
  ),
209
252
  yaxis=dict(
210
253
  range=[0, 0.6],
211
254
  autorange=True,
212
- gridcolor='rgb(72, 72, 72)',
255
+ gridcolor=theme_grid_color[theme],
213
256
  gridwidth=0.1
214
257
  )
215
258
  )
@@ -230,7 +273,9 @@ def best_cost_by_round(config, data, option_manager):
230
273
 
231
274
  return fig
232
275
 
233
- def calibrated_params_by_round(config, list_of_objs, option_manager):
276
+ def calibrated_params_by_round(homepage, config, list_of_objs, option_manager):
277
+ theme = homepage.graph_theme_value.get()
278
+
234
279
  fig = go.Figure()
235
280
 
236
281
  total_steps = len(config)
@@ -264,15 +309,15 @@ def calibrated_params_by_round(config, list_of_objs, option_manager):
264
309
  title="",
265
310
  xaxis_title="Round",
266
311
  yaxis_title="Particle Parameters",
267
- font=dict(color='white'),
268
- paper_bgcolor='rgba(42, 42, 42, 0)',
269
- plot_bgcolor='rgb(62, 62, 62)',
312
+ font=dict(color=theme_font_color[theme]),
313
+ paper_bgcolor=theme_background_color[theme],
314
+ plot_bgcolor=theme_plot_color[theme],
270
315
  xaxis=dict(
271
- gridcolor='rgb(72, 72, 72)',
316
+ gridcolor=theme_grid_color[theme],
272
317
  gridwidth=1
273
318
  ),
274
319
  yaxis=dict(
275
- gridcolor='rgb(72, 72, 72)',
320
+ gridcolor=theme_grid_color[theme],
276
321
  gridwidth=0.1
277
322
  )
278
323
  )
@@ -294,6 +339,8 @@ def calibrated_params_by_round(config, list_of_objs, option_manager):
294
339
  return fig
295
340
 
296
341
  def custom_csv(homepage, option_manager):
342
+ theme = homepage.graph_theme_value.get()
343
+
297
344
  fig = go.Figure()
298
345
 
299
346
  data = homepage.csv_data["data"]
@@ -329,17 +376,17 @@ def custom_csv(homepage, option_manager):
329
376
  title="",
330
377
  xaxis_title=x,
331
378
  yaxis_title=val,
332
- font=dict(color='white'),
333
- paper_bgcolor='rgba(42, 42, 42, 0)',
334
- plot_bgcolor='rgb(62, 62, 62)',
379
+ font=dict(color=theme_font_color[theme]),
380
+ paper_bgcolor=theme_background_color[theme],
381
+ plot_bgcolor=theme_plot_color[theme],
335
382
  xaxis=dict(
336
- gridcolor='rgb(72, 72, 72)',
383
+ gridcolor=theme_grid_color[theme],
337
384
  gridwidth=1
338
385
  ),
339
386
  yaxis=dict(
340
387
  title=val + " (" + str(yy_unit) + ")",
341
388
  autorange=True,
342
- gridcolor='rgb(72, 72, 72)',
389
+ gridcolor=theme_grid_color[theme],
343
390
  gridwidth=0.1
344
391
  ),
345
392
  yaxis2=dict(
@@ -366,6 +413,8 @@ def custom_csv(homepage, option_manager):
366
413
  return fig
367
414
 
368
415
  def compare_csv(homepage, option_manager):
416
+ theme = homepage.graph_theme_value.get()
417
+
369
418
  fig = go.Figure()
370
419
 
371
420
  data = homepage.csv_data["data"]
@@ -410,17 +459,17 @@ def compare_csv(homepage, option_manager):
410
459
  title="",
411
460
  xaxis_title=x,
412
461
  yaxis_title=val,
413
- font=dict(color='white'),
414
- paper_bgcolor='rgba(42, 42, 42, 0)',
415
- plot_bgcolor='rgb(62, 62, 62)',
462
+ font=dict(color=theme_font_color[theme]),
463
+ paper_bgcolor=theme_background_color[theme],
464
+ plot_bgcolor=theme_plot_color[theme],
416
465
  xaxis=dict(
417
- gridcolor='rgb(72, 72, 72)',
466
+ gridcolor=theme_grid_color[theme],
418
467
  gridwidth=1
419
468
  ),
420
469
  yaxis=dict(
421
470
  title=val + " (" + str(yy_unit) + ")",
422
471
  autorange=True,
423
- gridcolor='rgb(72, 72, 72)',
472
+ gridcolor=theme_grid_color[theme],
424
473
  gridwidth=0.1
425
474
  ),
426
475
  yaxis2=dict(
@@ -447,6 +496,8 @@ def compare_csv(homepage, option_manager):
447
496
  return fig
448
497
 
449
498
  def sampling_csv(homepage, option_manager):
499
+ theme = homepage.graph_theme_value.get()
500
+
450
501
  fig = go.Figure()
451
502
 
452
503
  style = homepage.figure_style.get()
@@ -493,17 +544,17 @@ def sampling_csv(homepage, option_manager):
493
544
  title="",
494
545
  xaxis_title=x,
495
546
  yaxis_title=val,
496
- font=dict(color='white'),
497
- paper_bgcolor='rgba(42, 42, 42, 0)',
498
- plot_bgcolor='rgb(62, 62, 62)',
547
+ font=dict(color=theme_font_color[theme]),
548
+ paper_bgcolor=theme_background_color[theme],
549
+ plot_bgcolor=theme_plot_color[theme],
499
550
  xaxis=dict(
500
- gridcolor='rgb(72, 72, 72)',
551
+ gridcolor=theme_grid_color[theme],
501
552
  gridwidth=1
502
553
  ),
503
554
  yaxis=dict(
504
555
  title=val,
505
556
  autorange=True,
506
- gridcolor='rgb(72, 72, 72)',
557
+ gridcolor=theme_grid_color[theme],
507
558
  gridwidth=0.1
508
559
  ),
509
560
  yaxis2=dict(
@@ -530,6 +581,8 @@ def sampling_csv(homepage, option_manager):
530
581
  return fig
531
582
 
532
583
  def matrix_editor(homepage, option_manager):
584
+ theme = homepage.graph_theme_value.get()
585
+
533
586
  style = homepage.figure_style.get()
534
587
  data = homepage.csv_data
535
588
  x = homepage.csv_x_selector.get()
@@ -562,7 +615,7 @@ def matrix_editor(homepage, option_manager):
562
615
  elif (total_figures == 9 or total_figures == 10):
563
616
  figures_per_row = 5
564
617
 
565
- fig_combined = make_subplots(rows=(total_figures // figures_per_row) + 1, cols=figures_per_row, shared_xaxes=False, shared_yaxes=False)
618
+ fig_combined = make_subplots(rows=(total_figures // figures_per_row), cols=figures_per_row, shared_xaxes=False, shared_yaxes=False)
566
619
 
567
620
  for parameter in figure_parameters:
568
621
  name = parameter['name'].get()
@@ -574,43 +627,42 @@ def matrix_editor(homepage, option_manager):
574
627
  val = parameter['value'].get()
575
628
 
576
629
  xx = None
577
- if x == "time":
578
- xx = pd.to_datetime(data["time"], format='%Y-%m-%d', errors='coerce')
579
- elif x == "date":
580
- xx = pd.to_datetime(data["date"], format='%d-%m-%Y', errors='coerce')
581
- else:
582
- xx = pd.to_numeric(data[x], errors="coerce")
583
-
630
+ #if x == "time":
631
+ # xx = pd.to_datetime(data["time"], format='%Y-%m-%d', errors='coerce')
632
+ #elif x == "date":
633
+ # xx = pd.to_datetime(data["date"], format='%d-%m-%Y', errors='coerce')
634
+ #else:
635
+ xx = pd.to_numeric(data[x], errors="coerce")
584
636
  yy = pd.to_numeric(data[val], errors="coerce")
585
637
 
586
638
  yy_unit = ""
587
639
 
588
640
  if (style == "Scatter"):
589
- fig.add_trace(go.Scatter(x=xx, y=yy, name=val, mode='markers'))
641
+ fig.add_trace(go.Scatter(x=yy, y=xx, name=val, mode='markers'))
590
642
  elif (style == "Bars"):
591
- fig.add_trace(go.Bar(x=xx, y=yy, name=val))
643
+ fig.add_trace(go.Bar(x=yy, y=xx, name=val))
592
644
  elif (style == "Lines"):
593
- fig.add_trace(go.Scatter(x=xx, y=yy, name=val))
645
+ fig.add_trace(go.Scatter(x=yy, y=xx, name=val))
594
646
  elif (style == "Area"):
595
- fig.add_trace(go.Scatter(x=xx, y=yy, name=val, fill='tozeroy'))
647
+ fig.add_trace(go.Scatter(x=yy, y=xx, name=val, fill='tozeroy'))
596
648
  elif (style == "Box"):
597
- fig.add_trace(go.Box(x=xx, y=yy, name=val))
649
+ fig.add_trace(go.Box(x=yy, y=xx, name=val))
598
650
 
599
651
  fig.update_layout(
600
652
  title="",
601
- xaxis_title=x,
602
- yaxis_title=val,
603
- font=dict(color='white'),
604
- paper_bgcolor='rgba(42, 42, 42, 0)',
605
- plot_bgcolor='rgb(62, 62, 62)',
653
+ xaxis_title=val,
654
+ yaxis_title=x,
655
+ font=dict(color=theme_font_color[theme]),
656
+ paper_bgcolor=theme_background_color[theme],
657
+ plot_bgcolor=theme_plot_color[theme],
606
658
  xaxis=dict(
607
- gridcolor='rgb(72, 72, 72)',
659
+ gridcolor=theme_grid_color[theme],
608
660
  gridwidth=1
609
661
  ),
610
662
  yaxis=dict(
611
- title=val,
663
+ title=x,
612
664
  autorange=True,
613
- gridcolor='rgb(72, 72, 72)',
665
+ gridcolor=theme_grid_color[theme],
614
666
  gridwidth=0.1
615
667
  )
616
668
  )
@@ -650,9 +702,9 @@ def matrix_editor(homepage, option_manager):
650
702
  fig = fig_combined
651
703
  fig.update_layout(
652
704
  title="",
653
- font=dict(color='white'),
654
- paper_bgcolor='rgba(42, 42, 42, 0)',
655
- plot_bgcolor='rgb(62, 62, 62)'
705
+ font=dict(color=theme_font_color[theme]),
706
+ paper_bgcolor=theme_background_color[theme],
707
+ plot_bgcolor=theme_plot_color[theme]
656
708
  )
657
709
 
658
710
  if not os.path.exists(folder):