2025.42 changes

This commit is contained in:
2025-10-24 22:29:15 +02:00
parent d0bcfcf8f1
commit e4579e4887
24 changed files with 699 additions and 352 deletions

View File

@@ -0,0 +1,20 @@
import pandas as pd
from plotly.graph_objs import Figure, Bar
data = pd.DataFrame(data={
"product": ["pomme", "poire", "banane", "pêche"],
"price": [1.99, 2.49, 2.99, 3.49], "wpu": [200, 180, 140, 200]
})
figure = Figure([
Bar(name="Prix", x=data["product"], y=data["price"], yaxis="y1", offsetgroup=1, texttemplate="%{y:.2f}"),
Bar(name="Poids", x=data["product"], y=data["wpu"], yaxis="y2", offsetgroup=2, texttemplate="%{y:.2f}g"),
])
# Afficher le dernier graphique généré
figure.layout.update({
"template": "seaborn",
"title": "Prix et poids unitaires",
"font": {"family": "Cabin", "size": 13},
"yaxis1": {"title": "Prix (€)", "color": "red"},
"yaxis2": {"title": "Poids (g)", "overlaying": "y1", "side": "right"}
})
figure.show(renderer="browser")