Spaces:
Sleeping
Sleeping
Update dashboard.py
Browse files- dashboard.py +8 -6
dashboard.py
CHANGED
@@ -390,13 +390,15 @@ def create_overlay_plots(df):
|
|
390 |
max_y=max(df[obj_column])
|
391 |
curve = hv.Curve((df.index, np.log1p(df[obj_column])), 'Time', 'Occurrence Ratio', label=obj_column).opts(show_legend=True)
|
392 |
curves.append(curve)
|
|
|
|
|
|
|
|
|
|
|
|
|
393 |
overlay = hv.Overlay(curves).opts(
|
394 |
opts.Overlay(bgcolor='white',
|
395 |
-
|
396 |
-
border_line_color='black', # Border color around the plot
|
397 |
-
axis_label_color='black', # Set axis label color to black
|
398 |
-
axis_label_text_font_size='10pt', # Set axis label font size
|
399 |
-
|
400 |
show_legend=True,
|
401 |
legend_position='top_left',
|
402 |
legend_opts={
|
@@ -412,7 +414,7 @@ def create_overlay_plots(df):
|
|
412 |
height=700,
|
413 |
legend_offset=(0, 0),
|
414 |
legend_cols=8,
|
415 |
-
hooks=[lambda p, _: p.state.update(border_fill_color='white')]
|
416 |
),
|
417 |
opts.Curve(
|
418 |
show_grid=True
|
|
|
390 |
max_y=max(df[obj_column])
|
391 |
curve = hv.Curve((df.index, np.log1p(df[obj_column])), 'Time', 'Occurrence Ratio', label=obj_column).opts(show_legend=True)
|
392 |
curves.append(curve)
|
393 |
+
|
394 |
+
def hook(plot, element):
|
395 |
+
plot.handles['xaxis'].axis_label_text_color = 'black'
|
396 |
+
plot.handles['yaxis'].axis_label_text_color = 'black'
|
397 |
+
|
398 |
+
|
399 |
overlay = hv.Overlay(curves).opts(
|
400 |
opts.Overlay(bgcolor='white',
|
401 |
+
#padding=-0.1,
|
|
|
|
|
|
|
|
|
402 |
show_legend=True,
|
403 |
legend_position='top_left',
|
404 |
legend_opts={
|
|
|
414 |
height=700,
|
415 |
legend_offset=(0, 0),
|
416 |
legend_cols=8,
|
417 |
+
hooks=[lambda p, _: p.state.update(border_fill_color='white'), hook]
|
418 |
),
|
419 |
opts.Curve(
|
420 |
show_grid=True
|