diff --git a/plots/plotly/scatter/line-basic/default.py b/plots/plotly/scatter/line-basic/default.py index dff4e3245a..9ad9dfcff4 100644 --- a/plots/plotly/scatter/line-basic/default.py +++ b/plots/plotly/scatter/line-basic/default.py @@ -3,29 +3,27 @@ Library: plotly """ -import pandas as pd import plotly.graph_objects as go # Data -data = pd.DataFrame({"time": [1, 2, 3, 4, 5, 6, 7], "value": [10, 15, 13, 18, 22, 19, 25]}) +time = [1, 2, 3, 4, 5, 6, 7] +value = [10, 15, 13, 18, 22, 19, 25] # Create plot fig = go.Figure() -fig.add_trace( - go.Scatter(x=data["time"], y=data["value"], mode="lines", line={"color": "#306998", "width": 2}, name="Value") -) +fig.add_trace(go.Scatter(x=time, y=value, mode="lines", line={"color": "#306998", "width": 3})) # Layout fig.update_layout( - title={"text": "Basic Line Plot", "font": {"size": 20}}, + title={"text": "Basic Line Plot", "font": {"size": 36}}, xaxis_title="Time", yaxis_title="Value", template="plotly_white", - xaxis={"title_font": {"size": 20}, "tickfont": {"size": 16}, "showgrid": True, "gridcolor": "rgba(0,0,0,0.1)"}, - yaxis={"title_font": {"size": 20}, "tickfont": {"size": 16}, "showgrid": True, "gridcolor": "rgba(0,0,0,0.1)"}, - legend={"font": {"size": 16}}, - margin={"l": 80, "r": 40, "t": 80, "b": 60}, + showlegend=False, + xaxis={"title_font": {"size": 28}, "tickfont": {"size": 22}, "showgrid": True, "gridcolor": "rgba(0,0,0,0.1)"}, + yaxis={"title_font": {"size": 28}, "tickfont": {"size": 22}, "showgrid": True, "gridcolor": "rgba(0,0,0,0.1)"}, + margin={"l": 80, "r": 40, "t": 100, "b": 80}, ) # Save