Bibliothèque Python de visualisation de données basée sur matplotlib, avec une API chaînable pour créer des graphiques à partir de DataFrames pandas.
Documentation ·
Galerie ·
Notebooks
Installation
pip install plutovizu
Ou avec uv :
uv add plutovizu
Dépendances : matplotlib, pandas, numpy, seaborn, scipy, pyfonts, drawarrow, bumplot, pypalettes… (Python ≥ 3.12).
Plus de 2 700 palettes pypalettes : chart.set_colors('Hiroshige').
Les polices Fira Sans (par défaut) et Inter sont incluses ; un graphique mesure
16 × 10 cm par défaut (figsize=cm(24, 12) pour une autre taille en centimètres).
Utilisation rapide
from plutovizu import Chart
import pandas as pd
df = pd.DataFrame({'categorie': ['A', 'B', 'C'], 'ventes': [120, 85, 200]})
(Chart(df)
.bar('categorie', 'ventes')
.labels(xlabel='Catégorie', ylabel='Ventes')
.grid()
.show())
Types de graphiques
| Méthode | Description |
|---|---|
line(x, y) |
Courbe (supporte plusieurs colonnes y) |
bar(x, y) |
Barres verticales ou horizontales |
scatter(x, y) |
Nuage de points |
histogram(column) |
Histogramme |
boxplot(columns) |
Boîte à moustaches |
pie(column) |
Camembert |
heatmap() |
Carte de chaleur (matrice de corrélation) |
area(x, y) |
Aire (empilée ou non) |
violin(columns) |
Violon |
ombrothermic(month, temp, precip) |
Diagramme ombrothermique (p=2T) |
regression(x, y, order) |
Régression avec équation, R² et bande de confiance |
mean_bar(x, y, hue, error) |
Moyennes ± SE / SD / IC 95 % (essais) |
interaction(x, trace, response) |
Graphique d'interaction (ANOVA à 2 facteurs) |
qqplot(column) |
Diagramme quantile-quantile (normalité) |
pca_biplot(columns, group) |
Biplot d'ACP |
dendrogram(labels) |
Classification hiérarchique |
ternary(a, b, c) |
Diagramme ternaire |
soil_texture(sand, silt, clay) |
Triangle des textures USDA (12 classes) |
clustermap(labels) |
Carte de chaleur + dendrogrammes |
circle_packing(values, labels, group) |
Cercles imbriqués (circlify) |
step, stem, band, timeline, eventplot |
Escalier, bâtons, bande, frise, événements |
errorbar, hist2d, bihistogram |
Barres d'erreur, histogramme 2D, histogrammes dos à dos |
confidence_ellipse, pivot_heatmap |
Ellipses de confiance, tableau croisé coloré |
donut, polar, radial_bar, progress_bar |
Anneau, polaire (rose des vents), barres radiales, progression |
contour, mesh, vector_field |
Courbes de niveau, grille colorée, champ de vecteurs |
scatter3d, line3d, surface, bar3d |
Graphiques 3D |
walter_lieth, climogram, emberger, ecoclimatogram |
Climatogramme, climogramme, climagramme d'Emberger, écoclimatogramme |
water_balance, degree_days |
Bilan hydrique, degrés-jours |
wind_rose, anomaly, climate_stripes |
Rose des vents, anomalies, bandes climatiques |
soil_profile, depth_profile, soil_properties |
Profil de sol, variable(s) selon la profondeur |
retention_curve, grain_size_curve, exchange_complex |
Pédologie : courbe pF, granulométrie, complexe d'échange |
infiltration_curve, isopleth |
Pédologie : infiltration (Philip, Horton), isoplèthes profondeur × temps |
map_points, choropleth, flow_map |
Map : points, zones, flux (pip install plutovizu[map]) |
density_map, field_map, route_map |
Map : densité, isolignes interpolées, itinéraires |
north_arrow, scale_bar, inset_map |
Éléments de carte : flèche du nord, échelle, situation |
glm_curve, response_curve, count_distribution, forest_plot |
Écologie : GLM (logistique, Poisson), réponse lissée, excès de zéros, effets |
ordination |
Écologie : AFC, CCA, ACP, RDA (triplot sites, espèces, variables) |
rank_abundance, accumulation, diversity |
Écologie : rang-abondance, accumulation / raréfaction, indices de diversité |
network, arc_diagram |
Graphes : réseau, mouvements entre lieux |
sankey, chord, venn, flowchart, sequence_diagram |
Diagrammes : flux, cordes, ensembles, logigrammes et organigrammes, séquences (à la Mermaid) |
waffle |
Gaufre : parts d'un total, ou évolution carré par carré |
shortest_path, spanning_tree, max_flow |
Recherche opérationnelle : plus court chemin, arbre couvrant, flot maximal |
critical_path, tsp_route |
Planification PERT / CPM, tournée du voyageur de commerce |
word_cloud(text) |
Nuage de mots (réponses ouvertes, entretiens) |
word_frequency(text, top, ngram) |
Mots ou expressions les plus cités |
likert(columns, order) |
Échelle de Likert (barres divergentes) |
code_matrix(case, code) |
Matrice des codes (codage qualitatif) |
seaborn(name, **kwargs) |
N'importe quel graphique seaborn (violinplot, relplot…) |
kde, ecdf, strip, swarm, boxen, pointplot, countplot, residplot |
Graphiques seaborn usuels |
pareto, control_chart, marimekko, bland_altman, raincloud |
Graphiques complexes : Pareto (80/20), carte de contrôle, Marimekko, Bland-Altman, nuage de pluie |
relplot, displot, catplot, lmplot, pairplot, jointplot |
Grilles seaborn (plusieurs panneaux) |
mean_bar(..., letters=True) ajoute les lettres du test de Tukey HSD ;
texture_class(sable, limon, argile) donne la classe USDA d'un sol.
Liste complète des 121 graphiques dans la galerie ; chaque graphique y a sa fiche : description, cas d'usage, structure du DataFrame attendu et paramètres, avant l'exemple.
Thèmes
Quinze thèmes maison pour sortir du style matplotlib classique :
pluto, editorial, paper, arctic, neon, blueprint, sunset, forest,
ocean, terminal, ink, pastel, sahel, accessible, prezi.
list_themes() les liste, DESCRIPTIONS les décrit. Les cinq styles seaborn sont aussi
disponibles (seaborn-darkgrid, seaborn-whitegrid…), et context='paper' | 'talk' | 'poster'
adapte la taille du texte : set_theme('pluto', context='talk').
Seize thèmes supplémentaires (wsj, economist, ft, nord, retro, vscode-dark…)
viennent du projet morethemes (MIT) :
pip install plutovizu[morethemes]
Le thème editorial est appliqué par défaut dès import plutovizu ;
set_theme(None) revient au style matplotlib d'origine.
from plutovizu import Chart, set_theme, theme_context
set_theme('pluto') # pour toute la session
Chart(df, theme='neon') # ce graphique seulement
with theme_context('paper'): # seulement dans ce bloc
Chart(df).line('x', 'y').show()
set_theme(None) # retour au style matplotlib
API — méthodes de personnalisation
chart = Chart(df, figsize=(12, 8))
# Graphique
chart.line('date', ['ventes', 'profit'], marker='o', linewidth=2)
# Apparence
chart.labels(xlabel='Date', ylabel='Montant', fontsize=12)
chart.grid(show=True, alpha=0.3, linestyle='--')
chart.set_legend(show=True, location='upper right')
chart.set_limits(xlim=(0, 100), ylim=(0, 500))
chart.rotate_labels(x_rotation=45)
chart.font(family='Times New Roman', size=12, weight='normal')
chart.subtitle('Sous le titre').caption('Source : …').background('#f6eee3') # infographie
# Couleurs
chart.set_colors('deep') # palette seaborn/matplotlib
chart.create_custom_palette('ma_palette', ['#FF5733', 'blue', 'green'])
chart.generate_gradient_palette('grad', 'blue', 'red', n_colors=8)
chart.preview_palette('Set1')
# Langue des textes : 'fr', 'en', 'es', 'ar' (dictionnaire intégré)
chart.translate('en')
chart.translate('de', from_='online') # tous les textes, toute langue : pip install translate
# Export
chart = Chart(df, figsize=(12, 8), dpi=200) # dpi : affichage et export
chart.tight_layout()
chart.save('graphique.png') # 400 dpi par défaut ; .pdf, .svg selon l'extension
chart.show()
fig, ax = chart.get_figure()
Polices, annotations, coins arrondis
Fira Sans (défaut) et Inter sont fournies ; load_font (pyfonts) charge aussi n'importe
quelle police Google Fonts. Les flèches courbes viennent de drawarrow.
from plutovizu import Chart, load_font
(Chart(df)
.bar('region', 'ventes')
.rounded(12) # coins arrondis : 8 points par défaut, 0 = vifs
.annotation('Record', xy=(2, 520), xytext=(0.5, 560), radius=-0.3)
.arrow((0.1, 0.9), (0.3, 0.7), coords='axes')
.title('Ventes', fontproperties=load_font('Inter', 'semibold'))
.show())
from plutovizu import get_fonts
# Lister toutes les polices disponibles
get_fonts()
# Filtrer
get_fonts(pattern='Arial')
# Depuis une instance Chart
chart.get_available_fonts(pattern='Times')
Chart.print_available_fonts(limit=20)
Diagramme ombrothermique
import pandas as pd
from plutovizu import Chart
climate = pd.DataFrame({
'Mois': ['Jan', 'Fév', 'Mar', 'Avr', 'Mai', 'Jun',
'Jul', 'Aoû', 'Sep', 'Oct', 'Nov', 'Déc'],
'Température (°C)': [24.1, 26.1, 26.6, 26.5, 26.1, 25.0,
23.9, 23.9, 24.3, 24.8, 24.9, 23.7],
'Précipitations (mm)': [16, 23.9, 86.7, 116.7, 92.9, 147.8,
143.2, 215.8, 167.1, 109.4, 30.3, 33]
})
(Chart(climate, figsize=(14, 8))
.ombrothermic('Mois', 'Température (°C)', 'Précipitations (mm)')
.font('Times New Roman', 13)
.grid(alpha=0.3)
.tight_layout()
.show())
Palettes disponibles
# Afficher toutes les palettes
Chart.print_available_palettes()
# Par catégorie : 'all', 'seaborn', 'matplotlib', 'custom'
Chart.print_available_palettes(category='seaborn', limit=10)
Développement
src/plutovizu/ code du package (chart.py : classe Chart, get_fonts)
tests/ tests pytest
docs/ documentation Quarto
examples/ notebooks de démonstration, un par thème (voir examples/README.md)
uv sync # installe le package en mode éditable + dépendances dev
uv run pytest # lance les tests
uv build # construit sdist + wheel dans dist/
uv run python docs/_vignettes.py # régénère les vignettes de la galerie
quarto render docs # génère la documentation
Metadata
Release files for plutovizu 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| plutovizu-0.1.0.tar.gz | 54.0 MB | Without provenance | Details for plutovizu-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| plutovizu-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for plutovizu-0.1.0-py3-none-any.whl |
Total release size: 56.3 MB
Release files / plutovizu-0.1.0.tar.gz
| Download URL | plutovizu-0.1.0.tar.gz |
|---|---|
| Size | 54.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
565f1f367e53041bf6f749cca863fc40c8c536a8567bdcafd14bd0d8d6ded5e8
|
|
BLAKE2b-256 checksum How to use checksums |
c5ef4592dfcde6d1d447fe64382aa788d1f34cf121d4a2dc3cab9f85b5c07364
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / plutovizu-0.1.0-py3-none-any.whl
| Download URL | plutovizu-0.1.0-py3-none-any.whl |
|---|---|
| Size | 2.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6fd22aa2492167a02a0a0bd5e65218b61033a750ccd8daa92a28648914cc7b5a
|
|
BLAKE2b-256 checksum How to use checksums |
5a416e3c977641afac22f01bcfb0260ec15be7e4d519e74adfe26310b810ef5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Security for plutovizu 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.