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,27 @@
import pandas as pd
from plotly.graph_objs import Figure, Pie
from plotly.colors import qualitative
data = pd.DataFrame(data={
"product": ["oignon", "carotte", "pomme", "poire", "radis", "tomate"],
"category": ["légume", "légume", "fruit", "fruit", "légume", "fruit"],
"origin": ["Espagne", "France", "France", "France", "France", "Espagne"],
"price": [1.69, 2.49, 2.99, 1.79, 1.29, 2.99]
})
figure = Figure(
data=[Pie(
values=data["price"],
labels=data["product"].str.title(),
customdata=data[["category", "origin"]],
title="Prix",
textinfo="label+value",
texttemplate="<b>%{label}</b><br>%{value:.2f}€<br><em>%{customdata[0]}</em><br>%{customdata[1]}",
insidetextorientation="tangential")
],
layout={
"template": "seaborn",
"font": {"family": "Cabin", "size": 20},
"title": "Prix au kilo",
"piecolorway": qualitative.Prism
})
figure.show(renderer="browser")