From f03faecf46b1957400d572cccaba77ddf7d64f64 Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Sun, 7 Dec 2025 20:53:35 +0000 Subject: [PATCH] feat(plotly): improve line-basic implementation - Remove unnecessary pandas import (use simple lists) - Disable legend for single series (per quality criteria) - Increase font sizes for better readability at 4800x2700px - Increase line width from 2 to 3 for better visibility - Adjust margins for proper layout --- plots/plotly/scatter/line-basic/default.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) 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