2025.46 changes

This commit is contained in:
2025-11-15 18:20:01 +01:00
parent c45c6e9f2d
commit cb516edca4
8 changed files with 132 additions and 32 deletions

View File

@@ -1,5 +1,5 @@
import pandas as pd
from plotly.graph_objs import Figure, Bar, Scatter
from plotly.graph_objs import Figure, Bar
data = pd.DataFrame(
data={
@@ -8,13 +8,21 @@ data = pd.DataFrame(
"weight": [250, 300, 200, 400, 500, 600],
}
)
figure: Figure = Figure(data=[Bar(name="Prix", x=data["product"], y=data["price"])])
figure.add_hrect(y0=2.75, y1=4.5, fillcolor="gray", opacity=0.25, layer="below")
figure: Figure = Figure(data=[])
figure.add_hrect(
y0=2.75,
y1=4.5,
fillcolor="gray",
opacity=0.25,
layer="below",
)
figure.add_trace(Bar(name="Prix", x=data["product"], y=data["price"]))
figure.add_annotation(text="Zone de prix spéciale", xref="paper", yref="paper", x=0.5, y=0.5, xanchor="center", yanchor="middle", showarrow=False, font={"family": "Cabin", "size": 20})
figure.update_layout(
template="seaborn",
title="Prix et poids unitaires",
font={"family": "Cabin", "size": 13},
xaxis={"title": "Produit", "showgrid": False},
yaxis={"title": "Prix (€)", "showgrid": False}
yaxis={"title": "Prix (€)", "showgrid": False},
)
figure.show(renderer="browser")