From 5c0ddf8674bd813eacf4b5b0f2c3444ee7160834 Mon Sep 17 00:00:00 2001 From: ronjakrg Date: Mon, 18 Nov 2024 00:18:31 +0100 Subject: [PATCH] set plotly_protzilla as default template --- protzilla/utilities/plot_template.py | 41 ++++++++++++++-------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/protzilla/utilities/plot_template.py b/protzilla/utilities/plot_template.py index 57ac7d8f..fc55b8de 100644 --- a/protzilla/utilities/plot_template.py +++ b/protzilla/utilities/plot_template.py @@ -3,27 +3,28 @@ from protzilla.constants.colors import PROTZILLA_DISCRETE_COLOR_OUTLIER_SEQUENCE -pio.templates["plotly_protzilla"] = go.layout.Template( - layout = { - "title": { - "font": { - "size": 16, - "family": "Arial", - }, - "y": 0.98, - "x": 0.5, - "xanchor": "center", - "yanchor": "top", - }, + +layout = go.Layout( + title={ "font": { - "size": 14, + "size": 16, "family": "Arial" }, - "colorway": PROTZILLA_DISCRETE_COLOR_OUTLIER_SEQUENCE, - "plot_bgcolor": "white", - "yaxis": { - "gridcolor": "lightgrey", - "zerolinecolor": "lightgrey", - }, + "y": 0.98, + "x": 0.5, + "xanchor": "center", + "yanchor": "top" + }, + font={ + "size": 14, + "family": "Arial" + }, + colorway= PROTZILLA_DISCRETE_COLOR_OUTLIER_SEQUENCE, + plot_bgcolor="white", + yaxis={ + "gridcolor": "lightgrey", + "zerolinecolor": "lightgrey" } -) \ No newline at end of file +) +pio.templates["plotly_protzilla"] = go.layout.Template(layout=layout) +pio.templates.default = "plotly_protzilla" \ No newline at end of file