Creare un Grafico in Python
(https://i.postimg.cc/13P4PR1b/python-7be70baaac.png) (https://postimages.org/)
Ecco un semplicissimo grafico scritto in Python:
Come esempio ho preso i membri dello staff della nostra Community, ma il codice può essere modificato a piacimento, secondo le vostre esigenze.
import pygal
# https://ubuntucommunityitalia.altervista.org
# Ubuntu Community Forum
# python for the win!
data = [
["Giuseppe", 151],
["polverizzatore", 59],
["Leonida29", 76],
["Mil-F", 49],
["Valerio", 5],
["Ubuntu Community Italia", 59],
]
# Make a Pygal chart
pie_chart = pygal.Pie()
# add a title
pie_chart.title = "Post membri dello staff"
# add the data
for label, data_points in data:
pie_chart.add(label, data_points)
# Render the chart
pie_chart.render()