SeraPlot is a complete data toolkit written in Rust. The same engine powers your visualizations, your machine learning, and the way you ship results to other people.
Pillar
What you get
Plot
57 chart types — 33 in 2D, 17 in 3D (WebGL), 2 maps. Built-in themes, palettes, animation, zoom, crosshair, export.
Train
Scikit-learn-compatible ML in Rust — DBSCAN, K-Means, RandomForest, GradientBoosting, SVM, PCA, GridSearchCV, train/test split. 1.3× to 686× faster.
Stream & scale
Live updates, downsampling for millions of points, drift detection, AutoML, diff mode, facet grids.
Ship
Self-contained 21 KB HTML — no CDN, no backend, works offline, by email, in S3, in PDFs, in Notion, in air-gapped CI.
As you’ve probably understood by now, Seraplot is a tool designed to be extremely customizable, while also being much faster and more resource-efficient than existing solutions. It also provides a wide range of helpful features, such as the Seraplot extension for VSCode, which allows you to generate plots or ML methods very quickly and live, between each save of your scripts.
In addition, Seraplot is available across multiple languages such as: JS/TS, C (C# & C++), Java, Rust, Python, R & Scala. The main goal is to be highly accessible: from one language to another, the commands remain the same for greater simplicity.
In summary, Seraplot is a much more practical and independent tool that enables the generation of 2D & 3D plots, while also aiming to provide machine learning-related methods that you will find throughout the documentation. More surprises await you, such as the ability to choose different themes, a chunk system in case of crashes to resume from the error point, and even multiple aliases to use the same method (e.g., sp.build_bar_chart / sp.bar_chart / sp.bar / sp.bars).
Same code, same random data, same machine. Full HTML output timed.
import seraplot as sp
categories = ["Electronics", "Clothing", "Food", "Books", "Sports", "Toys", "Health", "Auto"]
data = [...] # 1000 pre-generated lists
for i in range(1000):
sp.bar(f"Report #{i+1}", categories, data[i]).html
1000 charts in 6 ms — 6 µs/chart
import plotly.graph_objects as go
categories = ["Electronics", "Clothing", "Food", "Books", "Sports", "Toys", "Health", "Auto"]
data = [...] # same 1000 pre-generated lists
for i in range(1000):
fig = go.Figure(data=[go.Bar(x=categories, y=data[i])])
fig.update_layout(title=f"Report #{i+1}", template="plotly_dark")
fig.to_html(full_html=True, include_plotlyjs="cdn")
1000 charts in 37,023 ms — 6,170× slower
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
categories = ["Electronics", "Clothing", "Food", "Books", "Sports", "Toys", "Health", "Auto"]
data = [...] # same 1000 pre-generated lists
for i in range(1000):
fig, ax = plt.subplots(figsize=(9, 5))
ax.bar(categories, data[i])
ax.set_title(f"Report #{i+1}")
fig.savefig(f"chart_{i}.png")
plt.close()
SeraPlot is not a wrapper around Plotly, Chart.js, or D3.
It is a Rust-native rendering engine that generates minimal HTML + JS per chart.
A Pie chart gets Pie JS. A Bar chart gets Bar JS. Nothing else is bundled.
Plotly returns 4.7 MB per request. Matplotlib requires disk I/O and returns a static PNG.
SeraPlot returns 21 KB of interactive HTML directly from RAM.
« Tout tracer. Tout entraîner. Partout déployer. »
SeraPlot est une boîte à outils data complète écrite en Rust. Le même moteur propulse vos visualisations, votre machine learning, et la façon dont vous livrez les résultats à vos collègues.
Pilier
Ce que vous obtenez
Tracer
57 types de graphiques — 33 en 2D, 17 en 3D (WebGL), 2 cartes. Thèmes intégrés, palettes, animations, zoom, crosshair, export.
Entraîner
ML compatible scikit-learn en Rust — DBSCAN, K-Means, RandomForest, GradientBoosting, SVM, PCA, GridSearchCV, train/test split. De 1,3× à 686× plus rapide.
Streamer & passer à l'échelle
Mises à jour en direct, downsampling pour des millions de points, détection de drift, AutoML, mode diff, grilles de facettes.
Déployer
HTML autonome de 21 Ko — pas de CDN, pas de backend, fonctionne hors-ligne, par e-mail, sur S3, dans des PDF, dans Notion, en CI isolée.
Extension VS Code native — aperçu en direct, galerie, studio de thèmes, snippets, détection automatique des labels / values depuis votre code.
Persister & exporter
Export HTML, PNG, SVG, PDF, pickle. Rechargement des modèles ML entraînés. Sortie compatible CSP.
Rester accessible
SVG balisé a11y, HTML sémantique, navigation clavier, formatage numérique localisé.
Une seule librairie remplace : matplotlib + plotly + dash + streamlit + seaborn + une partie de scikit-learn — avec un seul pip install et zéro dépendance d'exécution.
Comme vous l’aurez compris en arrivant jusqu’ici, Seraplot est un outil qui a pour objectif d’être extrêmement personnalisable, mais aussi beaucoup plus rapide et moins gourmand que ce qui existe déjà, en plus de proposer tout un panel d’aides, comme l’extension Seraplot dans VSCode, qui vous permettra de générer des plots ou des méthodes ML très rapidement et en live, entre chaque sauvegarde de vos scripts.
En plus de cela, Seraplot se voit distribué dans différents langages comme : JS/TS, C (C# & C++), Java, Rust, Python, R & Scala. L’objectif étant vraiment d’être ultra accessible : d’un langage à un autre, les commandes restent les mêmes pour plus de simplicité.
Pour résumer, Seraplot est un outil beaucoup plus pratique de ce qui existe déjà et complétement indépendant, en plus de compilé différente fonctionnalitée. En autre il permet la génération de plots 2D & 3D, mais aussi qui tend à proposer des méthodes liées au ML, que vous pourrez retrouver au cours de votre documentation. D’autres surprises vous attendent, que ce soit la possibilité de choisir différents thèmes, ou bien le système de chunks en cas de crash pour reprendre au point d’erreur, ou encore pour n'en citer que un dernier, le fait d’avoir différents alias pour utiliser une même méthode (ex : sp.build_bar_chart / sp.bar_chart / sp.bar / sp.bars).
Même code, mêmes données aléatoires, même machine. Sortie HTML complète chronométrée.
import seraplot as sp
categories = ["Électronique", "Vêtements", "Alimentation", "Livres", "Sport", "Jouets", "Santé", "Auto"]
data = [...]
for i in range(1000):
sp.bar(f"Rapport #{i+1}", categories, data[i]).html
1 000 graphiques en 6 ms — 6 µs/graphique
import plotly.graph_objects as go
categories = ["Électronique", "Vêtements", "Alimentation", "Livres", "Sport", "Jouets", "Santé", "Auto"]
data = [...]
for i in range(1000):
fig = go.Figure(data=[go.Bar(x=categories, y=data[i])])
fig.update_layout(title=f"Rapport #{i+1}", template="plotly_dark")
fig.to_html(full_html=True, include_plotlyjs="cdn")
1 000 graphiques en 37 023 ms — 6 170× plus lent
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
categories = ["Électronique", "Vêtements", "Alimentation", "Livres", "Sport", "Jouets", "Santé", "Auto"]
data = [...]
for i in range(1000):
fig, ax = plt.subplots(figsize=(9, 5))
ax.bar(categories, data[i])
ax.set_title(f"Rapport #{i+1}")
fig.savefig(f"chart_{i}.png")
plt.close()
Plotly retourne 4,7 Mo par requête. Matplotlib nécessite des I/O disque et retourne un PNG statique.
SeraPlot retourne 21 Ko de HTML interactif directement depuis la RAM.
SeraPlot ships as a compiled Rust extension (.pyd / .so) bundled in the wheel. There is no compiler required on the user side — the binary is pre-built for each platform.
SeraPlot has zero required Python dependencies. The Rust extension is entirely self-contained — the HTML output embeds its own JavaScript inline and does not load anything from a CDN.
🌐 Works offlineCharts render in air-gapped environments, emails, PDF exports via browser print — no CDN, no internet.
🔒 No conflictsZero dependency on numpy, pandas, or scipy — nothing to conflict with your existing stack.
🚀 All platformsPre-built wheels for Windows, Linux, and macOS. No compiler, no Rust toolchain needed.
SeraPlot se distribue sous forme d'extension Rust compilée (.pyd / .so) incluse dans le wheel. Aucun compilateur n'est requis côté utilisateur — le binaire est pré-compilé pour chaque plateforme.
SeraPlot n'a aucune dépendance Python requise. L'extension Rust est entièrement autonome — le HTML embarque son propre JavaScript sans rien charger depuis un CDN.
🌐 Fonctionne hors ligneLes graphiques se génèrent en environnement isolé, dans les e-mails, en impression PDF — sans CDN ni internet.
🔒 Zéro conflitAucune dépendance sur numpy, pandas ou scipy — rien qui puisse entrer en conflit avec votre stack.
🚀 Toutes plateformesWheels pré-compilés pour Windows, Linux et macOS. Aucun compilateur, aucune toolchain Rust requise.
SeraPlot is a unified plotting library that ships the same API to nine languages. Pick your stack, install one package, and render an interactive chart with three lines of code.
SeraPlot est une bibliothèque graphique unifiée qui expose la même API dans neuf langages. Choisissez votre stack, installez un seul paquet, et générez un graphique interactif en trois lignes.
Every Chart object returned by SeraPlot supports the same fluent API. Set defaults once with sp.config() and tweak per chart with chainable methods. All methods return a new Chart, so chaining is always safe.
Fluent APIGlobal + per-chart override60+ chart typesPlotly-compatible value labels
Tip: works on every chart that emits data-v attributes — bars, lollipops, scatter, pie, treemap, line markers… Format strings follow d3 / Plotly conventions: ".2s", ".0f", ".1%".
Pass a list of annotation dicts to any chart builder. Coordinates default to fractional canvas space (0.0 - 1.0); set "frac": false to use raw pixels. Supported kind values: "hline", "vline", "line", "arrow", "rect", "text".
Compose any number of pre-built charts into a responsive CSS-grid layout, each chart hosted in its own iframe. sp.build_grid is an identical alias. cell_height defaults to the chart's own height attribute.
bar = sp.build_bar_chart("Q-Sales", labels=["Q1","Q2","Q3","Q4"], values=[120,180,150,210])
line = sp.build_line_chart("Trend", labels=months, values=sales)
pie = sp.build_pie_chart("Mix", labels=["A","B","C"], values=[40,35,25])
Build a navigable HTML carousel with previous / next buttons and an auto-advance progress bar - perfect for telling a story without a slide deck.
slides = [sp.build_bar_chart(f"Slide {i+1}", labels=["A","B"], values=[i, i+1]) for i in range(4)]
show = sp.build_slideshow(slides, interval_ms=2200, title="Quarterly Story")
show.show()
Tout objet Chart renvoyé par SeraPlot expose la même API fluide. Définis les valeurs par défaut une fois avec sp.config(), ajuste chart par chart avec des méthodes chaînées. Toutes les méthodes retournent un nouveau Chart : le chaînage est toujours sûr.
API fluideGlobal + override par chart60+ types de graphiquesÉtiquettes Plotly
Astuce : fonctionne sur tous les charts qui exposent data-v — barres, lollipops, scatter, pie, treemap, marqueurs de ligne… Les formats suivent d3 / Plotly : ".2s", ".0f", ".1%".
Passe une liste de dictionnaires d annotations a n importe quel builder. Coordonnees fractionnaires par defaut (0.0 - 1.0) ; mets "frac": false pour utiliser des pixels. Valeurs supportees pour kind : "hline", "vline", "line", "arrow", "rect", "text".
Empile N charts deja construits dans une grille CSS responsive, chaque chart isole dans son iframe. sp.build_grid est un alias identique. cell_height utilise par defaut la hauteur detectee dans le chart.
bar = sp.build_bar_chart("Ventes-Q", labels=["Q1","Q2","Q3","Q4"], values=[120,180,150,210])
line = sp.build_line_chart("Tendance", labels=mois, values=ventes)
pie = sp.build_pie_chart("Mix", labels=["A","B","C"], values=[40,35,25])
Construit un carrousel HTML navigable avec boutons precedent/suivant et barre de progression - parfait pour raconter une histoire sans presentation externe.
slides = [sp.build_bar_chart(f"Slide {i+1}", labels=["A","B"], values=[i, i+1]) for i in range(4)]
show = sp.build_slideshow(slides, interval_ms=2200, title="Histoire trimestrielle")
show.show()
sp.bar() is the unified entry point for the entire bar-chart family. The variant keyword selects the rendering strategy — all other arguments remain consistent across variants.
sp.line() is the unified entry point for the entire line-chart family. The variant keyword selects the rendering strategy — every other argument is shared across variants.
sp.line() est le point d'entrée unifié pour toute la famille de graphiques en ligne. Le mot-clé variant sélectionne la stratégie de rendu — tous les autres arguments sont partagés entre les variantes.
sp.scatter() is the unified entry point for the entire scatter family. The variant keyword selects the rendering strategy — every other argument keeps the same name across variants. Scatter plots are the canonical way to display the joint distribution of two numeric variables; SeraPlot adds optional grouping, continuous color, distinct marker shapes, on-point labels and OLS regression — all in pure Rust SVG, thousands of times faster than Plotly.
sp.scatter() est le point d'entrée unifié de toute la famille scatter. Le mot-clé variant sélectionne la stratégie de rendu — tous les autres arguments gardent le même nom d'une variante à l'autre. Les nuages de points sont la façon canonique d'afficher la distribution conjointe de deux variables numériques ; SeraPlot ajoute groupement optionnel, couleur continue, formes de marqueurs distinctes, étiquettes sur les points et régression OLS — le tout en SVG Rust pur, des milliers de fois plus rapide que Plotly.
sp.bubble() is the unified entry point for the entire bubble-chart family. The variant keyword selects the rendering strategy — all other arguments remain consistent across variants. A bubble chart extends a 2D scatter plot with a third numeric dimension represented as bubble area (not radius), following best practices for perceptual accuracy.
sp.bubble() est le point d'entrée unique de toute la famille des graphiques à bulles. Le paramètre variant choisit la stratégie de rendu — tous les autres arguments restent cohérents entre variantes. Une bulle représente une troisième dimension via son aire (et non son rayon), pour une lecture perceptive correcte.
sp.histogram() is the unified entry point for the entire histogram family. The variant keyword selects the rendering strategy — every other argument keeps the same name across variants. Histograms are the canonical way to visualize the distribution of a single numeric variable; SeraPlot adds horizontal layout, density normalization, cumulative distribution, stacked groups, A/B overlay and step outline — all in pure Rust SVG, thousands of times faster than Plotly.
sp.histogram() est le point d'entrée unifié de toute la famille histogramme. Le mot-clé variant sélectionne la stratégie de rendu — tous les autres arguments gardent le même nom d'une variante à l'autre. Les histogrammes sont la façon canonique de visualiser la distribution d'une variable numérique ; SeraPlot ajoute layout horizontal, normalisation densité, distribution cumulative, groupes empilés, superposition A/B et contour en escalier — le tout en SVG Rust pur, des milliers de fois plus rapide que Plotly.
sp.heatmap() is the unified entry point for the entire heatmap family. The variant keyword selects the rendering strategy — every other argument stays consistent across variants. Cell colors are computed in pure Rust, no NumPy required. The matrix is passed as a flat list of length len(labels) * len(col_labels) (row-major).
sp.heatmap() est le point d'entrée unique pour toute la famille des cartes de chaleur. Le paramètre variant sélectionne la stratégie de rendu — annotée, catégorielle, log, contour, clustering hiérarchique, etc. — tout en partageant la même API de base.
sp.pie() is the unified entry point for the entire pie-chart family. The variant keyword selects the rendering strategy — all other arguments remain consistent across variants.
sp.pie() est le point d'entrée unique pour toute la famille des camemberts. Le paramètre variant sélectionne la stratégie de rendu — donut, éclaté, KPI, semi-cercle ou imbriqué — tout en conservant la même API simple.
sp.boxplot() is the unified entry point for the entire box-plot family. The variant keyword selects the rendering strategy — every other argument stays consistent across variants. Quartiles, 1.5×IQR whiskers and outliers are computed in pure Rust without NumPy or pandas.
sp.boxplot() est le point d'entrée unique pour toute la famille des boîtes à moustaches. Le paramètre variant sélectionne la stratégie de rendu — tous les autres arguments restent identiques entre les variantes. Quartiles, moustaches 1,5×IQR et valeurs aberrantes sont calculés en pur Rust, sans NumPy ni pandas.
sp.violin() is the unified entry point for the entire violin-plot family. The variant keyword selects the rendering strategy — every other argument stays consistent across variants. The kernel-density estimation, quartiles and statistics are computed in pure Rust, no NumPy or pandas required.
sp.violin() est le point d'entrée unique pour toute la famille des violons. Le paramètre variant sélectionne la stratégie de rendu — tous les autres arguments restent identiques entre les variantes. L'estimation de densité par noyau (KDE), les quartiles et les statistiques sont calculés en pur Rust, sans NumPy ni pandas.
sp.kde() is the unified entry point for the entire Kernel Density Estimate family. The variant keyword selects the rendering strategy — every other argument keeps the same name across variants. KDE produces a smooth, continuous density estimate from a sample of points using a Gaussian kernel with Scott's rule for automatic bandwidth selection. SeraPlot renders the curves as pure Rust SVG, with native multi-series, normalization, CDF, rug, histogram overlay and gradient fills.
sp.kde() est le point d'entrée unifié pour toute la famille KDE (Kernel Density Estimate). Le mot-clé variant sélectionne la stratégie de rendu — tous les autres arguments conservent le même nom d'une variante à l'autre. La KDE produit une estimation de densité continue lissée à partir d'un échantillon de points avec un noyau gaussien et la règle de Scott pour le choix automatique de la bande passante. SeraPlot rend les courbes en SVG Rust natif, avec multi-séries, normalisation, CDF, rug, histogramme superposé et remplissage en dégradé.
sp.ridgeline() is the unified entry point for the entire ridgeline family — also known as joyplot. The variant keyword selects the rendering strategy — every other argument keeps the same name across variants. A ridgeline plot stacks one KDE curve per category along a shared X axis with a controllable vertical overlap, making it ideal to compare distributions across many groups (years, regions, segments…). SeraPlot renders everything in pure Rust SVG, with quartile/mean overlays, rug ticks, gradient fills and a built-in viridis colormap.
sp.ridgeline() est le point d'entrée unifié pour toute la famille ridgeline — aussi appelé joyplot. Le mot-clé variant sélectionne la stratégie de rendu — tous les autres arguments conservent le même nom d'une variante à l'autre. Un ridgeline empile une courbe KDE par catégorie sur un axe X partagé avec un recouvrement vertical réglable, idéal pour comparer des distributions à travers plusieurs groupes (années, régions, segments…). SeraPlot rend tout en SVG Rust natif, avec marqueurs quartiles/moyenne, ticks rug, dégradés et palette viridis intégrée.
sp.radar() is the unified entry point for the entire radar / spider / star chart family. The variant keyword selects the rendering strategy — every other argument keeps the same name across variants. Radar charts are ideal for multivariate comparison across 3+ axes — performance profiles, KPIs, skill maps, scoring systems. SeraPlot draws everything in pure Rust SVG with concentric grid rings, axis lines, automatic ring tick labels, optional legend and per-series palette colors. The polar-bar variant turns the chart into a categorical polar histogram, the stacked variant builds a cumulative composition view.
sp.radar() est le point d'entrée unifié pour toute la famille radar / spider / star. Le mot-clé variant sélectionne la stratégie de rendu — tous les autres arguments conservent le même nom d'une variante à l'autre. Le radar est idéal pour comparer plusieurs séries sur 3 axes ou plus — profils de performance, KPI, cartographie de compétences, systèmes de notation. SeraPlot dessine tout en SVG Rust natif avec anneaux de grille concentriques, axes, labels automatiques de graduation, légende optionnelle et couleurs de palette par série. La variante polar_bar transforme le radar en histogramme polaire catégoriel, la variante stacked construit une vue de composition cumulative.
sp.slope() renders the entire slope-chart family: two parallel value axes (left / right) with one connector per row. The variant keyword swaps the connector style without changing any other parameter. Slope charts excel at before/after comparisons, A/B test outcomes, ranking shifts, KPI changes between periods, and any pair-wise change across many entities.
sp.slope() produit toute la famille des slope charts : deux axes de valeurs parallèles (gauche / droite) avec un connecteur par ligne. Le mot-clé variant permute le style du connecteur sans changer aucun autre paramètre. Idéal pour comparer avant/après, résultats A/B, changements de classement, KPI entre périodes, et toute évolution par paire sur de nombreuses entités.
sp.funnel() renders the entire funnel-chart family: a stacked sequence of stages where each step’s width encodes a value. The variant keyword switches the geometry without changing any other parameter. Funnels are the standard for conversion analytics (visitors → signups → paid), recruiting pipelines, sales pipelines, process drop-off and any descending-cohort analysis.
sp.funnel() produit toute la famille des entonnoirs : une séquence d’étapes empilées dont la largeur encode une valeur. Le mot-clé variant permute la géométrie sans changer aucun autre paramètre. Standard pour l’analyse de conversion (visiteurs → inscrits → payants), pipelines de recrutement, pipelines commerciaux, fuites de processus et toute analyse de cohorte décroissante.
sp.waterfall() renders the entire waterfall-chart family: a sequence of bars where each step adds (positive) or subtracts (negative) from a running total. The variant keyword selects the geometry without touching any other parameter. Waterfalls are the standard for P&L bridges, variance analysis, cohort decomposition, fee/tax breakdowns and any "from A to B, what changed?" narrative.
Totals — set a value to 0 and use a label containing total, net, final, gross or ebitda to mark a subtotal bar; it is rendered with the totals color and anchored on the running sum.
sp.waterfall() rassemble toute la famille des graphiques waterfall : une suite de barres ou chaque etape ajoute (positif) ou retranche (negatif) au cumul courant. Le mot-cle variant change la geometrie sans toucher aux autres parametres. Les waterfalls sont la reference pour les ponts de P&L, l analyse d ecarts, la decomposition de cohortes, le detail des frais/taxes et tout recit du type "de A vers B, qu est-ce qui a change ?".
Totaux — mettez la valeur a 0 et utilisez un libelle contenant total, net, final, gross ou ebitda pour marquer une barre de sous-total ; elle est rendue avec la couleur des totaux et ancree sur le cumul courant.
sp.sunburst() is the unified entry point for the entire sunburst-chart family. A sunburst represents a hierarchy as concentric rings: the innermost ring is the root, each outer ring is a deeper level, and angular size encodes value. The variant keyword selects the visual style without changing any other parameter. Sunbursts are the standard for visualizing nested taxonomies (org charts, file systems, market segmentation, expense categories, phylogenetic trees) and outperform classic pie charts as soon as a real hierarchy exists.
Hierarchy encoding — labels lists every node, parents gives the parent label of each node ("" for a root). Leaf values are taken from values; internal node values are auto-rolled-up from descendants when set to 0.
sp.sunburst() est le point d entree unifie pour toute la famille des graphiques sunburst. Un sunburst represente une hierarchie sous forme d anneaux concentriques : l anneau interieur est la racine, chaque anneau exterieur est un niveau plus profond, et l angle code la valeur. Le mot-cle variant change le style sans toucher aux autres parametres. Les sunbursts sont la reference pour visualiser des taxonomies imbriquees (organigrammes, systemes de fichiers, segmentation marche, categories de depenses, arbres phylogenetiques) et surpassent le camembert des qu une vraie hierarchie existe.
Encodage de la hierarchie — labels liste tous les noeuds, parents donne le libelle du parent de chaque noeud ("" pour une racine). Les valeurs des feuilles viennent de values ; les noeuds internes a 0 sont calcules automatiquement comme la somme de leurs descendants.
sp.treemap() is the unified entry point for the entire treemap-chart family. A treemap divides a rectangle into proportional sub-rectangles whose area encodes value; when a parents list is given the layout becomes hierarchical (each parent gets its own block, leaves are squarified within). The variant keyword switches the visual style without touching the data. Treemaps are the standard for visualizing budgets, market cap, disk usage, portfolio weights, file systems and any 'whole = sum of parts' breakdown.
Hierarchical mode — pass parents (one parent label per leaf, can be empty string "" for a flat treemap). Internal totals are auto-computed from leaves. Sort leaves with the sort_order parameter ("desc" recommended).
sp.treemap() est le point d entree unifie pour toute la famille treemap. Un treemap decoupe un rectangle en sous-rectangles proportionnels dont l aire code la valeur ; lorsqu une liste parents est fournie le rendu devient hierarchique (chaque parent recoit son propre bloc, les feuilles y sont squarifiees). Le mot-cle variant change le style sans toucher aux donnees. Les treemaps sont la reference pour visualiser budgets, capitalisations boursieres, occupation disque, poids de portefeuille, systemes de fichiers et toute decomposition 'tout = somme des parties'.
Mode hierarchique — passez parents (un libelle parent par feuille, chaine vide "" pour un treemap plat). Les totaux internes sont auto-calcules. Triez les feuilles avec sort_order ("desc" recommande).
sp.candlestick() is the unified entry point for the entire candlestick-chart family. A candlestick chart shows OHLC (Open, High, Low, Close) bars over time and is the de facto standard for financial markets, crypto, commodities, energy spot prices and any time-series with intra-period spread. The variant keyword switches the visual style without touching the data — including derived views like Heikin-Ashi smoothing, close-only line, mountain area and high-low range bars.
Color convention — by default green = up (close >= open) and red = down. Override with palette=[up_color, down_color]. Bars are rendered left-to-right in input order; use sort_order="asc" to sort by close price.
sp.candlestick() est le point d entree unifie pour toute la famille des chandeliers. Un graphique en chandeliers affiche des barres OHLC (Ouverture, Haut, Bas, Cloture) dans le temps et constitue le standard de fait pour les marches financiers, la crypto, les matieres premieres, le spot energie et toute serie temporelle avec spread intra-periode. Le mot-cle variant change le style sans toucher aux donnees — y compris des vues derivees comme le lissage Heikin-Ashi, la ligne de cloture, l aire mountain et les barres haut-bas.
Convention de couleur — par defaut vert = hausse (close >= open) et rouge = baisse. Surchargez avec palette=[couleur_hausse, couleur_baisse]. Les barres sont rendues de gauche a droite dans l ordre d entree ; sort_order="asc" pour trier par prix de cloture.
sp.dumbbell() is the unified entry point for the dumbbell-chart family. Each row plots two values - typically a before and an after - linked by a connector, making it the chart of choice for change, gap or comparison-over-time analyses (salary equity, turnaround KPIs, A/B uplifts, etc.). The variant keyword switches the visual treatment without touching the data.
sp.dumbbell() est le point d entree unique pour la famille dumbbell. Chaque ligne montre deux valeurs - typiquement avant/apres - reliees par un connecteur, ce qui en fait le choix naturel pour visualiser un changement, un ecart ou une evolution (equite salariale, KPIs de redressement, uplifts A/B, etc.). Le mot-cle variant change le style visuel sans toucher aux donnees.
sp.bullet() is the unified entry point for the bullet-chart family. Inspired by Edward Tufte, a bullet packs an actual value, a target, qualitative ranges and a scale into a single horizontal row - perfect for KPI dashboards where space is precious. The variant keyword switches the visual treatment (zones, traffic light, thermometer, progress pill, dot, ghost-bar comparison) without touching the data.
sp.bullet() est le point d entree unique pour la famille bullet. Inspire par Edward Tufte, le bullet condense valeur, cible, zones qualitatives et echelle dans une seule ligne horizontale - parfait pour des dashboards KPIs serres. Le mot-cle variant change l aspect (zones, feu tricolore, thermometre, pillule de progression, point, comparaison par barre fantome) sans toucher aux donnees.
sp.gauge() is the unified entry point for the gauge family. A gauge maps a single scalar to a colored arc with optional thresholds - perfect for status / health / utilization KPIs. The variant keyword switches the geometry (half, three-quarter, full ring), the embellishments (needle, ticks, glow) and the layering (single arc vs. concentric arcs for value-vs-target).
sp.gauge() est le point d entree unique pour la famille jauge. Une jauge associe un scalaire unique a un arc colore avec des seuils optionnels - parfait pour des KPIs de statut / sante / utilisation. Le mot-cle variant change la geometrie (demi, trois-quart, anneau complet), les ornements (aiguille, ticks, glow) et la composition (arc simple ou arcs concentriques pour valeur-vs-cible).
sp.lollipop() is the unified entry point for the lollipop family. Each item becomes a thin stick capped by a dot - lighter ink than a bar chart for the same ranking, and the family includes circular, diverging, focused and grouped editorial layouts (the Office variant reproduces the season-rating panel pattern).
sp.lollipop() est le point d entree unique pour la famille lollipop. Chaque item devient un baton fin termine par un point - moins d encre qu un bar chart pour le meme classement, et la famille couvre des layouts circulaires, divergents, focalises et editoriaux groupes (la variante Office reproduit le motif des saisons IMDb de The Office).
sp.build_parallel() renders a parallel-coordinates chart - one vertical axis per dimension, one polyline per row. Six variants cover the classical use cases: straight lines, smooth Bezier curves, categorical coloring, single-row highlight, density-blended overlay, and gradient coloring driven by any axis. Perfect for high-dimensional EDA, profile comparison, and class separability inspection.
sp.build_parallel() rend un graphique parallel-coordinates - un axe vertical par dimension, une polyligne par ligne. Six variantes couvrent les cas classiques : lignes droites, courbes Bezier, couleur par categorie, mise en avant d une ligne, overlay de densite, et degrade pilote par un axe. Ideal pour l EDA haute-dimension, la comparaison de profils, et l inspection de separabilite de classes.
sp.build_wordcloud() packs weighted tokens into six rendering architectures. Basic is the canonical spiral packer driven by a parametric shape= mask (rect, circle, heart, bird, glasses, diamond, star). Bubble gives each word its own color-filled disc sized by frequency - a packed-bubble layout. Context is an InfraNodus-style text-network cloud: words positioned by a force-directed layout driven by co-occurrence edges so semantically close words cluster spatially, colored by community. Image accepts any binary pixel mask (logo, icon, photo). LabelMap draws a datamapplot-style clustered scatter with leader-line labels. Network renders a keyword co-occurrence graph with bezier-curved edges.
sp.build_wordcloud() propose six architectures de rendu. Basic est le packer spirale canonique pilote par un masque shape= (rect, circle, heart, bird, glasses, diamond, star). Bubble donne a chaque mot un disque colore dimensionne par frequence - un layout bubble-packed. Context est un nuage texte-reseau style InfraNodus : mots positionnes par layout force-dirige base sur les aretes de co-occurrence, colores par communaute. Image accepte n importe quel masque binaire de pixels. LabelMap dessine un scatter clusterise style datamapplot avec etiquettes en lignes de rappel. Network rend un graphe de co-occurrence de mots-cles avec aretes bezier.
import seraplot as sp
import random
n = 1000
x = [random.gauss(0, 1) for _ in range(n)]
y = [random.gauss(0, 1) for _ in range(n)]
z = [random.gauss(0, 1) for _ in range(n)]
groups = [random.choice(["A", "B", "C"]) for _ in range(n)]
chart = sp.build_scatter3d_chart(
"3D Point Cloud",
x_values=x, y_values=y, z_values=z,
color_labels=groups,
x_label="X", y_label="Y", z_label="Z",
)
const sp = require('seraplot');
import random
const n = 1000
const x = [random.gauss(0, 1) for _ in range(n)]
const y = [random.gauss(0, 1) for _ in range(n)]
const z = [random.gauss(0, 1) for _ in range(n)]
const groups = [random.choice(["A", "B", "C"]) for _ in range(n)]
const chart = sp.build_scatter3d_chart("3D Point Cloud",
x,
y,
{
z_values: z,
color_labels: groups,
x_label: "X",
y_label: "Y",
z_label: "Z"
})
import * as sp from 'seraplot';
import random
const n: number = 1000
const x: number[] = [random.gauss(0, 1) for _ in range(n)]
const y: number[] = [random.gauss(0, 1) for _ in range(n)]
const z: number[] = [random.gauss(0, 1) for _ in range(n)]
const groups: string[] = [random.choice(["A", "B", "C"]) for _ in range(n)]
const chart = sp.build_scatter3d_chart("3D Point Cloud",
x,
y,
{
z_values: z,
color_labels: groups,
x_label: "X",
y_label: "Y",
z_label: "Z"
})
import seraplot as sp
import random
n = 1000
x = [random.gauss(0, 1) for _ in range(n)]
y = [random.gauss(0, 1) for _ in range(n)]
z = [random.gauss(0, 1) for _ in range(n)]
groupes = [random.choice(["A", "B", "C"]) for _ in range(n)]
chart = sp.build_scatter3d_chart(
"Nuage 3D",
x_values=x, y_values=y, z_values=z,
color_labels=groupes,
x_label="X", y_label="Y", z_label="Z",
)
import seraplot as sp
import math
t = [i * 0.1 for i in range(100)]
x = [math.cos(v) for v in t]
y = [math.sin(v) for v in t]
z = t
chart = sp.build_line3d_chart(
"Helix",
x_values=x, y_values=y, z_values=z,
x_label="cos(t)", y_label="sin(t)", z_label="t",
)
const sp = require('seraplot');
import math
const t = [i * 0.1 for i in range(100)]
const x = [math.cos(v) for v in t]
const y = [math.sin(v) for v in t]
const z = t
const chart = sp.build_line3d_chart("Helix",
x,
y,
{
z_values: z,
x_label: "cos(t)",
y_label: "sin(t)",
z_label: "t"
})
import * as sp from 'seraplot';
import math
const t: number[] = [i * 0.1 for i in range(100)]
const x: number[] = [math.cos(v) for v in t]
const y: number[] = [math.sin(v) for v in t]
const z = t
const chart = sp.build_line3d_chart("Helix",
x,
y,
{
z_values: z,
x_label: "cos(t)",
y_label: "sin(t)",
z_label: "t"
})
Graphique en courbe 3D connectant des points séquentiels dans l'espace 3D. Utile pour les trajectoires, les séries temporelles 3D et les courbes paramétriques.
import seraplot as sp
import math
t = [i * 0.1 for i in range(100)]
x = [math.cos(v) for v in t]
y = [math.sin(v) for v in t]
z = t
chart = sp.build_line3d_chart(
"Hélice",
x_values=x, y_values=y, z_values=z,
x_label="cos(t)", y_label="sin(t)", z_label="t",
)
import seraplot as sp
import random
x = [random.gauss(0, 1) for _ in range(400)]
y = [xi * 0.5 + random.gauss(0, 0.5) for xi in x]
chart = sp.build_kde3d_chart(
"Densité jointe X vs Y",
x=x, y=y,
x_label="X", y_label="Y", z_label="Densité",
)
import seraplot as sp
import random
cats = ["Low", "Medium", "High"]
means = [10, 50, 90]
values = [v for m in means for v in [random.gauss(m, 8) for _ in range(150)]]
chart = sp.build_ridgeline3d_chart(
"Score Distribution by Group",
categories=cats,
values=values,
)
const sp = require('seraplot');
import random
const cats = ["Low", "Medium", "High"]
const means = [10, 50, 90]
const values = [v for m in means for v in [random.gauss(m, 8) for _ in range(150)]]
const chart = sp.build_ridgeline3d_chart("Score Distribution by Group",
cats,
{
values: values
})
import * as sp from 'seraplot';
import random
const cats: string[] = ["Low", "Medium", "High"]
const means: number[] = [10, 50, 90]
const values: number[] = [v for m in means for v in [random.gauss(m, 8) for _ in range(150)]]
const chart = sp.build_ridgeline3d_chart("Score Distribution by Group",
cats,
{
values: values
})
import seraplot as sp
import random
cats = ["Faible", "Moyen", "Haut"]
means = [10, 50, 90]
values = [v for m in means for v in [random.gauss(m, 8) for _ in range(150)]]
chart = sp.build_ridgeline3d_chart(
"Distribution des scores par groupe",
categories=cats,
values=values,
)
import seraplot as sp
import random
n = 200
chart = sp.build_bubble3d_chart(
"4D Dataset",
x_values=[random.gauss(0,1) for _ in range(n)],
y_values=[random.gauss(0,1) for _ in range(n)],
z_values=[random.gauss(0,1) for _ in range(n)],
size_values=[random.uniform(5, 30) for _ in range(n)],
color_labels=[random.choice(["A","B","C"]) for _ in range(n)],
)
const sp = require('seraplot');
import random
const n = 200
const chart = sp.build_bubble3d_chart("4D Dataset",
[random.gauss(0,1) for _ in range(n)],
[random.gauss(0,1) for _ in range(n)],
[random.gauss(0,1) for _ in range(n)],
{
size_values: [random.uniform(5, 30) for _ in range(n)],
color_labels: [random.choice(["A","B","C"]) for _ in range(n)]
})
import * as sp from 'seraplot';
import random
const n: number = 200
const chart = sp.build_bubble3d_chart("4D Dataset",
[random.gauss(0,1) for _ in range(n)],
[random.gauss(0,1) for _ in range(n)],
[random.gauss(0,1) for _ in range(n)],
{
size_values: [random.uniform(5, 30) for _ in range(n)],
color_labels: [random.choice(["A","B","C"]) for _ in range(n)]
})
import seraplot as sp
import random
n = 200
chart = sp.build_bubble3d_chart(
"Jeu de données 4D",
x_values=[random.gauss(0,1) for _ in range(n)],
y_values=[random.gauss(0,1) for _ in range(n)],
z_values=[random.gauss(0,1) for _ in range(n)],
size_values=[random.uniform(5, 30) for _ in range(n)],
color_labels=[random.choice(["A","B","C"]) for _ in range(n)],
)
import seraplot as sp
import random
groups = ["Control", "Treatment A", "Treatment B"]
means = [50, 65, 72]
values = [v for m in means for v in [random.gauss(m, 8) for _ in range(80)]]
chart = sp.build_violin3d_chart(
"Trial Results",
categories=groups,
values=values,
)
const sp = require('seraplot');
import random
const groups = ["Control", "Treatment A", "Treatment B"]
const means = [50, 65, 72]
const values = [v for m in means for v in [random.gauss(m, 8) for _ in range(80)]]
const chart = sp.build_violin3d_chart("Trial Results",
{
categories: groups,
values: values
})
import * as sp from 'seraplot';
import random
const groups: string[] = ["Control", "Treatment A", "Treatment B"]
const means: number[] = [50, 65, 72]
const values: number[] = [v for m in means for v in [random.gauss(m, 8) for _ in range(80)]]
const chart = sp.build_violin3d_chart("Trial Results",
{
categories: groups,
values: values
})
import seraplot as sp
import random
groupes = ["Contrôle", "Traitement A", "Traitement B"]
means = [50, 65, 72]
values = [v for m in means for v in [random.gauss(m, 8) for _ in range(80)]]
chart = sp.build_violin3d_chart(
"Résultats de l'essai",
categories=groupes,
values=values,
)
import seraplot as sp
features = ["A", "B", "C", "D"]
n = len(features)
matrix = [[abs(i - j) * 0.25 for j in range(n)] for i in range(n)]
chart = sp.build_heatmap3d_chart(
"Distance Matrix 3D",
x_labels=features,
y_labels=features,
values=matrix,
)
const sp = require('seraplot');
const features = ["A", "B", "C", "D"]
const n = len(features)
const matrix = [[abs(i - j) * 0.25 for j in range(n)] for i in range(n)]
const chart = sp.build_heatmap3d_chart("Distance Matrix 3D",
features,
features,
{
values: matrix
})
import * as sp from 'seraplot';
const features: string[] = ["A", "B", "C", "D"]
const n = len(features)
const matrix: number[] = [[abs(i - j) * 0.25 for j in range(n)] for i in range(n)]
const chart = sp.build_heatmap3d_chart("Distance Matrix 3D",
features,
features,
{
values: matrix
})
import seraplot as sp
features = ["A", "B", "C", "D"]
n = len(features)
matrice = [[abs(i - j) * 0.25 for j in range(n)] for i in range(n)]
flat = [v for row in matrice for v in row]
chart = sp.build_heatmap3d_chart(
"Matrice de distance 3D",
labels=features,
flat_matrix=flat,
col_labels=features,
)
World map with proportional bubbles at geographic coordinates.
Use iso_codes for country-level data (the library resolves centroids automatically), or pass explicit latitudes / longitudes.
Carte mondiale avec des bulles proportionnelles aux coordonnées géographiques. Utilisez iso_codes pour les données par pays (la bibliothèque résout les centroïdes automatiquement), ou passez des latitudes / longitudes explicites.
Carte choro-plèthe — polygones de pays/régions colorés par une valeur scalaire. Les pays sans données reçoivent la null_color. Fournissez des iso_codes (ISO-3166 alpha-3) pour associer les pays automatiquement.
DBSCAN — density-based spatial clustering, no preset number of clusters. / DBSCAN — clustering spatial basé sur la densité, sans nombre de clusters prédéfini.
⚡ Rust-native✓ sklearn parity
Quick start — Python
import seraplot as sp, numpy as np
from sklearn.datasets import make_blobs
X, _ = make_blobs(n_samples=300, centers=4, cluster_std=0.6)
result = sp.DBSCAN(eps=0.8, min_samples=5).fit_predict(X)
print(result)
💡
EN — Drop-in replacement: sp.DbscanFitPredict has the same API as sklearn. FR — Remplacement direct : même API que sklearn, changez l'import.
Lasso regression — L1-penalised OLS via coordinate descent. / Régression Lasso — OLS pénalisée L1 par descente de coordonnées.
⚡ Rust-native✓ sklearn parity
Quick start — Python
import seraplot as sp, numpy as np
X = np.random.randn(200, 10)
y = X[:, 0] * 2 + X[:, 3] * -1.5 + np.random.randn(200) * 0.3
model = sp.Lasso(alpha=0.1)
model.fit(X, y)
print([f"{c:.3f}" for c in model.coef_])
💡
EN — Drop-in replacement: sp.Lasso has the same API as sklearn. FR — Remplacement direct : même API que sklearn, changez l'import.
import seraplot as sp, numpy as np
X = np.random.randn(200, 10)
y = X[:, 0] * 2 + X[:, 3] * -1.5 + np.random.randn(200) * 0.3
model = sp.Lasso(alpha=0.1)
model.fit(X, y)
print([f"{c:.3f}" for c in model.coef_])
import seraplot as sp, numpy as np
X = np.random.randn(200, 10)
y = X[:, 0] * 2 + X[:, 3] * -1.5 + np.random.randn(200) * 0.3
model = sp.Lasso(alpha=0.1)
model.fit(X, y)
print([f"{c:.3f}" for c in model.coef_])
Decision tree classifier — CART with Gini/Entropy criterion, binned splits. / Arbre de décision classifieur — CART avec critère Gini/Entropie, splits binnés.
⚡ Rust-native✓ sklearn parity
Quick start — Python
import seraplot as sp, numpy as np
from sklearn.datasets import load_iris
X, y = load_iris(return_X_y=True)
tree = sp.DecisionTreeClassifier(max_depth=4)
tree.fit(X, y)
print(f"Accuracy: {tree.score(X, y):.3f}")
💡
EN — Drop-in replacement: sp.DecisionTreeClassifier has the same API as sklearn. FR — Remplacement direct : même API que sklearn, changez l'import.
JSON with predictions, feature_importances, classes.
Algorithm
$$\text{Gini}(t) = 1 - \sum_{k} p_k^2$$
Example
import seraplot as sp, numpy as np
from sklearn.datasets import load_iris
X, y = load_iris(return_X_y=True)
tree = sp.DecisionTreeClassifier(max_depth=4)
tree.fit(X, y)
print(f"Accuracy: {tree.score(X, y):.3f}")
JSON avec predictions, feature_importances, classes.
Algorithme
$$\text{Gini}(t) = 1 - \sum_{k} p_k^2$$
Exemple
import seraplot as sp, numpy as np
from sklearn.datasets import load_iris
X, y = load_iris(return_X_y=True)
tree = sp.DecisionTreeClassifier(max_depth=4)
tree.fit(X, y)
print(f"Précision : {tree.score(X, y):.3f}")
Decision tree regressor — CART with MSE variance reduction, binned splits. / Arbre de décision régresseur — CART avec réduction de variance MSE, splits binnés.
⚡ Rust-native✓ sklearn parity
Quick start — Python
import seraplot as sp, numpy as np
X = np.random.randn(400, 4)
y = X[:, 0] ** 2 + X[:, 1] - X[:, 2] + np.random.randn(400) * 0.5
tree = sp.DecisionTreeRegressor(max_depth=5)
tree.fit(X, y)
print(tree.score(X, y))
💡
EN — Drop-in replacement: sp.DecisionTreeRegressor has the same API as sklearn. FR — Remplacement direct : même API que sklearn, changez l'import.
Random Forest classifier — bagging of CART trees with feature subsampling. / Random Forest classifieur — bagging d'arbres CART avec sous-échantillonnage de features.
⚡ Rust-native✓ sklearn parity
Quick start — Python
import seraplot as sp
from sklearn.datasets import load_iris
X, y = load_iris(return_X_y=True)
rf = sp.RandomForestClassifier(n_estimators=100, max_depth=6)
rf.fit(X, y)
print(rf.score(X, y), rf.feature_importances_)
💡
EN — Drop-in replacement: sp.RandomForestClassifier has the same API as sklearn. FR — Remplacement direct : même API que sklearn, changez l'import.
Gradient Boosting classifier — sequential additive model with log-loss. / Gradient Boosting classifieur — modèle additif séquentiel avec log-loss.
⚡ Rust-native✓ sklearn parity
Quick start — Python
import seraplot as sp
from sklearn.datasets import make_classification
X, y = make_classification(n_samples=500, n_features=10)
gb = sp.GradientBoostingClassifier(n_estimators=100, learning_rate=0.1)
gb.fit(X, y)
print(gb.score(X, y))
💡
EN — Drop-in replacement: sp.GradientBoostingClassifier has the same API as sklearn. FR — Remplacement direct : même API que sklearn, changez l'import.
AdaBoost classifier — adaptive boosting with weighted decision stumps. / AdaBoost classifieur — boosting adaptatif avec stumps de décision pondérés.
⚡ Rust-native✓ sklearn parity
Quick start — Python
import seraplot as sp
from sklearn.datasets import make_classification
X, y = make_classification(n_samples=500, n_features=8)
ada = sp.AdaBoostClassifier(n_estimators=50)
ada.fit(X, y)
print(ada.score(X, y))
💡
EN — Drop-in replacement: sp.AdaboostClassifier has the same API as sklearn. FR — Remplacement direct : même API que sklearn, changez l'import.
import seraplot as sp
from sklearn.datasets import make_classification
X, y = make_classification(n_samples=500, n_features=8)
ada = sp.AdaBoostClassifier(n_estimators=50)
ada.fit(X, y)
print(ada.score(X, y))
import seraplot as sp
from sklearn.datasets import make_classification
X, y = make_classification(n_samples=500, n_features=8)
ada = sp.AdaBoostClassifier(n_estimators=50)
ada.fit(X, y)
print(ada.score(X, y))
AdaBoost regressor — adaptive boosting with median-weighted aggregation. / AdaBoost régresseur — boosting adaptatif avec agrégation pondérée par la médiane.
⚡ Rust-native✓ sklearn parity
Quick start — Python
import seraplot as sp, numpy as np
X = np.random.randn(400, 4)
y = X[:, 0] ** 2 + np.random.randn(400) * 0.3
ada = sp.AdaBoostRegressor(n_estimators=50, learning_rate=0.8)
ada.fit(X, y)
print(ada.score(X, y))
💡
EN — Drop-in replacement: sp.AdaboostRegressor has the same API as sklearn. FR — Remplacement direct : même API que sklearn, changez l'import.
K-Nearest Neighbors classifier — majority vote among k nearest neighbors. / K plus proches voisins classifieur — vote majoritaire parmi les k voisins les plus proches.
⚡ Rust-native✓ sklearn parity
Quick start — Python
import seraplot as sp
from sklearn.datasets import load_iris
X, y = load_iris(return_X_y=True)
knn = sp.KNeighborsClassifier(n_neighbors=5)
knn.fit(X, y)
print(knn.score(X, y))
💡
EN — Drop-in replacement: sp.KnnClassifier has the same API as sklearn. FR — Remplacement direct : même API que sklearn, changez l'import.
K-Nearest Neighbors regressor — weighted average of k nearest neighbors. / K plus proches voisins régresseur — moyenne pondérée des k voisins les plus proches.
⚡ Rust-native✓ sklearn parity
Quick start — Python
import seraplot as sp, numpy as np
X = np.random.randn(300, 3)
y = X[:, 0] ** 2 + X[:, 1] + np.random.randn(300) * 0.5
knn = sp.KNeighborsRegressor(n_neighbors=7, weights="distance")
knn.fit(X, y)
print(knn.score(X, y))
💡
EN — Drop-in replacement: sp.KnnRegressor has the same API as sklearn. FR — Remplacement direct : même API que sklearn, changez l'import.
Nearest Centroid classifier — assigns class by closest class mean. / Classificateur par centroïde le plus proche — assigne la classe par la moyenne de classe la plus proche.
⚡ Rust-native✓ sklearn parity
Quick start — Python
import seraplot as sp
from sklearn.datasets import load_iris
X, y = load_iris(return_X_y=True)
nc = sp.NearestCentroid()
nc.fit(X, y)
print(nc.score(X, y))
💡
EN — Drop-in replacement: sp.NearestCentroid has the same API as sklearn. FR — Remplacement direct : même API que sklearn, changez l'import.
Gaussian Naive Bayes — likelihood modelled as Gaussian per class per feature. / Naive Bayes Gaussien — vraisemblance modélisée comme Gaussienne par classe et feature.
⚡ Rust-native✓ sklearn parity
Quick start — Python
import seraplot as sp
from sklearn.datasets import load_iris
X, y = load_iris(return_X_y=True)
gnb = sp.GaussianNB()
gnb.fit(X, y)
print(gnb.score(X, y))
💡
EN — Drop-in replacement: sp.GaussianNb has the same API as sklearn. FR — Remplacement direct : même API que sklearn, changez l'import.
Multinomial Naive Bayes — for count/frequency features (text, bag-of-words). / Naive Bayes Multinomial — pour features de comptage/fréquence (texte, sac de mots).
⚡ Rust-native✓ sklearn parity
Quick start — Python
import seraplot as sp, numpy as np
X = np.random.randint(0, 10, size=(300, 5)).astype(float)
y = (X[:, 0] > 5).astype(int)
mnb = sp.MultinomialNB(alpha=1.0)
mnb.fit(X, y)
print(mnb.score(X, y))
💡
EN — Drop-in replacement: sp.MultinomialNb has the same API as sklearn. FR — Remplacement direct : même API que sklearn, changez l'import.
LinearSVC — linear Support Vector Machine for classification via dual coordinate descent. / LinearSVC — Machine à vecteurs de support linéaire pour classification.
⚡ Rust-native✓ sklearn parity
Quick start — Python
import seraplot as sp
from sklearn.datasets import make_classification
X, y = make_classification(n_samples=500, n_features=8)
svc = sp.LinearSVC(C=1.0)
svc.fit(X, y)
print(svc.score(X, y))
💡
EN — Drop-in replacement: sp.LinearSvc has the same API as sklearn. FR — Remplacement direct : même API que sklearn, changez l'import.
LinearSVR — epsilon-insensitive linear Support Vector Regression. / LinearSVR — régression linéaire par vecteurs de support avec perte epsilon-insensible.
⚡ Rust-native✓ sklearn parity
Quick start — Python
import seraplot as sp, numpy as np
X = np.random.randn(400, 4)
y = X[:, 0] * 2 - X[:, 2] + np.random.randn(400) * 0.5
svr = sp.LinearSVR(C=1.0, epsilon=0.1)
svr.fit(X, y)
print(svr.score(X, y))
💡
EN — Drop-in replacement: sp.LinearSvr has the same API as sklearn. FR — Remplacement direct : même API que sklearn, changez l'import.
Unified fit_transform — dispatches to StandardScaler/MinMaxScaler/RobustScaler by name. / fit_transform unifié — dispatche vers StandardScaler/MinMaxScaler/RobustScaler par nom.
⚡ Rust-native✓ sklearn parity
Quick start — Python
import seraplot as sp, numpy as np
import json
X = np.random.randn(100, 3) * 5
res = json.loads(sp.ml_fit_transform(json.dumps({"X_train": X.tolist(), "scaler": "minmax"})))
💡
EN — Drop-in replacement: sp.FitTransform has the same API as sklearn. FR — Remplacement direct : même API que sklearn, changez l'import.
K-Fold split — returns train/test index arrays for k-fold cross-validation. / Division K-Fold — retourne les tableaux d'indices train/test pour la validation croisée k-fold.
⚡ Rust-native✓ sklearn parity
Quick start — Python
import seraplot as sp, json, numpy as np
X = np.random.randn(100, 4)
res = json.loads(sp.ml_kfold_split(json.dumps({"X_train": X.tolist(), "n_splits": 5})))
print(len(res["folds"]))
💡
EN — Drop-in replacement: sp.KfoldSplit has the same API as sklearn. FR — Remplacement direct : même API que sklearn, changez l'import.
JSON with folds array, each fold has train_indices, test_indices.
Example
import seraplot as sp, json, numpy as np
X = np.random.randn(100, 4)
res = json.loads(sp.ml_kfold_split(json.dumps({"X_train": X.tolist(), "n_splits": 5})))
print(len(res["folds"]))
Utiliser des splits stratifiés (nécessite y_train).
seed
int
42
Graine aléatoire.
Retourne
JSON avec tableau folds, chaque pli a train_indices, test_indices.
Exemple
import seraplot as sp, json, numpy as np
X = np.random.randn(100, 4)
res = json.loads(sp.ml_kfold_split(json.dumps({"X_train": X.tolist(), "n_splits": 5})))
print(len(res["folds"]))
Permutation importance — feature importance by permuting each column and measuring score drop. / Importance par permutation — importance des features en permutant chaque colonne et mesurant la baisse de score.
⚡ Rust-native✓ sklearn parity
Quick start — Python
import seraplot as sp, json, numpy as np
X = np.random.randn(200, 5)
y = X @ [2, -1, 0, 0.5, 1.2] + np.random.randn(200) * 0.3
model = sp.Ridge(alpha=0.5)
model.fit(X, y)
imp = sp.permutation_importance(model, X, y, n_repeats=5)
print(imp.importances_mean_)
💡
EN — Drop-in replacement: sp.PermutationImportance has the same API as sklearn. FR — Remplacement direct : même API que sklearn, changez l'import.
Compute a named metric score (accuracy, r2, f1, etc.) from predictions. / Calcule un score de métrique nommée (accuracy, r2, f1, etc.) à partir des prédictions.
⚡ Rust-native✓ sklearn parity
Quick start — Python
import seraplot as sp, json
payload = {"y_true": [0,1,1,0,1], "y_pred": [0,1,0,0,1], "metric": "accuracy"}
res = json.loads(sp.ml_metric_score(json.dumps(payload)))
print(res["score"])
💡
EN — Drop-in replacement: sp.MetricScore has the same API as sklearn. FR — Remplacement direct : même API que sklearn, changez l'import.
Compute a metric curve (ROC, PR, confusion matrix) from predictions. / Calcule une courbe de métrique (ROC, PR, matrice de confusion) à partir des prédictions.
⚡ Rust-native✓ sklearn parity
Quick start — Python
import seraplot as sp, json
import numpy as np
y_true = (np.random.randn(100) > 0).astype(int).tolist()
y_score = np.random.rand(100).tolist()
res = json.loads(sp.ml_metric_curve(json.dumps({"y_true": y_true, "y_score": y_score, "curve": "roc"})))
💡
EN — Drop-in replacement: sp.MetricCurve has the same API as sklearn. FR — Remplacement direct : même API que sklearn, changez l'import.
Save model to the in-memory registry with name, version, and metadata. / Sauvegarder le modèle dans le registre en mémoire avec nom, version et métadonnées.
⚡ Rust-native✓ sklearn parity
Quick start — Python
import seraplot as sp, json, numpy as np
X = np.random.randn(100, 3)
y = X[:, 0] * 2 + np.random.randn(100) * 0.3
model = sp.Ridge(alpha=0.5)
model.fit(X, y)
res = json.loads(sp.ml_save_model(json.dumps({"name": "my_ridge", "kind": "ridge"})))
print(res["version"])
💡
EN — Drop-in replacement: sp.SaveModel has the same API as sklearn. FR — Remplacement direct : même API que sklearn, changez l'import.
Telemetry is a small opt-in subsystem. It records coarse runtime metrics, writes failed sends locally, and dispatches in the background only when a token is configured.
OffDefault state
Consent file~/.seraplot
JSONLLocal queue
Env tokenNo hardcoded secret
The implementation is intentionally boring: consent gates collection, events are serialized as JSON, and failed sends stay in a local queue. The GitHub dispatch token is read from SERAPLOT_GITHUB_TOKEN or a local git-ignored .env file.
The payload is built from runtime metadata and optional call-site context. It does not include user files, raw values, credentials, model weights, or personally identifying account data.
Collected Fields
Metric
Type
Description
Example
tsCORE
timestamp
Unix timestamp for the event.
1746615600
methodCORE
string
Function or method name.
"scatter"
duration_msCORE
float
Execution time rounded to milliseconds.
0.113
versionCORE
string
Installed SeraPlot version.
"2.7.10"
os, archCORE
string
Operating system and CPU architecture.
"windows", "x86_64"
cpu_count, ram_gbCORE
number
Basic system capacity information.
16, 32.0
data_countOPT
integer
Number of records processed, when available.
1000000
input_shape, output_shapeOPT
string
Data dimensions supplied by the call site.
"1000x256"
algorithmOPT
string
Algorithm name for ML-related events.
"KMeans"
Privacy And Flow
Never collected
No user identity, credentials, or account data.
No file names, file contents, or raw values.
No model weights, parameters, or samples.
No IP address or geolocation in the payload.
Runtime flow
1
CaptureMethod, duration, version, and system summary are recorded after a call.
2
QueueThe event is appended to telemetry.jsonl.
3
DispatchA background thread sends the payload if a token exists.
4
FlushSuccessfully sent pending events are cleared.
API
Enable, disable, inspect
import seraplot as sp
sp.telemetry_consent(enabled=True) # opt in
sp.telemetry_consent(enabled=False) # opt out
La telemetry est un petit sous-systeme opt-in. Elle enregistre des metriques runtime generales, conserve les envois echoues en local et dispatch en arriere-plan seulement si un token est configure.
OffEtat par defaut
Consentement~/.seraplot
JSONLQueue locale
Token envPas de secret hardcode
L'implementation reste volontairement simple : le consentement controle la collecte, les evenements sont serialises en JSON, et les envois echoues restent dans une queue locale. Le token GitHub dispatch est lu depuis SERAPLOT_GITHUB_TOKEN ou depuis un fichier local .env ignore par git.
Le payload contient des metadonnees runtime et du contexte optionnel fourni par le call site. Il n'inclut pas les fichiers utilisateur, les valeurs brutes, les credentials, les poids de modele ou les donnees de compte identifiantes.
Champs Collectes
Metrique
Type
Description
Exemple
tsCORE
timestamp
Horodatage Unix de l'evenement.
1746615600
methodCORE
string
Nom de la fonction ou methode.
"scatter"
duration_msCORE
float
Temps d'execution arrondi en millisecondes.
0.113
versionCORE
string
Version de SeraPlot installee.
"2.7.10"
os, archCORE
string
Systeme et architecture CPU.
"windows", "x86_64"
cpu_count, ram_gbCORE
number
Informations systeme generales.
16, 32.0
data_countOPT
integer
Nombre d'enregistrements traites si disponible.
1000000
input_shape, output_shapeOPT
string
Dimensions fournies par le call site.
"1000x256"
algorithmOPT
string
Nom d'algorithme pour les evenements ML.
"KMeans"
Confidentialite Et Flux
Jamais collecte
Non identite utilisateur, credentials ou donnees de compte.
Non noms de fichiers, contenus ou valeurs brutes.
Non poids de modele, parametres ou samples.
Non adresse IP ou geolocalisation dans le payload.
Flux runtime
1
CaptureMethode, duree, version et resume systeme sont enregistres apres un appel.
2
QueueL'evenement est ajoute a telemetry.jsonl.
3
DispatchUn thread en arriere-plan envoie le payload si un token existe.
4
FlushLes evenements envoyes avec succes sont supprimes de la queue.
sp.theme() sets the global background, palette, and gridlines. It is equivalent to calling sp.config(background=..., palette=..., gridlines=...) with the preset values.
Themes persist until sp.reset_theme() or sp.config() overrides them.
You can further override individual properties after calling a theme:
sp.theme() définit le fond global, la palette et le quadrillage. C'est équivalent à sp.config(background=..., palette=..., gridlines=...) avec les valeurs du préréglage.
Les thèmes persistent jusqu'à sp.reset_theme() ou un appel sp.config() qui les écrase.
Vous pouvez continuer à surcharger des propriétés individuelles après avoir appliqué un thème :
sp.set_auto_display(False)
charts = []
for name, values in datasets.items():
charts.append(sp.build_bar_chart(name, labels=["A","B","C"], values=values))
for c in charts:
c.show()
sp.set_auto_display(False)
graphiques = []
for nom, valeurs in jeux_de_donnees.items():
graphiques.append(sp.build_bar_chart(nom, labels=["A","B","C"], values=valeurs))
for g in graphiques:
g.show()
import seraplot as sp
charts = [sp.bar([1,2,3], ["a","b","c"], title=region) for region in ["EU","US","APAC"]]
grid = sp.facet(charts, cols=3, gap=12, cell_height=400)
grid.save("regions.html")
import seraplot as sp
charts = [sp.bar([1,2,3], ["a","b","c"], title=region) for region in ["EU","US","APAC"]]
grid = sp.facet(charts, cols=3, gap=12, cell_height=400)
grid.save("regions.html")
Reduce massive datasets while preserving visual shape using the Largest-Triangle-Three-Buckets algorithm. A 10M-point scatter chart becomes 5K points indistinguishable to the eye.
Réduit les datasets massifs en préservant la forme visuelle avec l'algorithme Largest-Triangle-Three-Buckets. Un scatter de 10M points devient 5K points indistinguables à l'œil.
LiveStream is a tiny, allocation-aware accumulator that turns a series of
(x, y) samples arriving over time into a fully-rendered SeraPlot Chart.
It maintains a bounded ring buffer (the max_points window) so memory is
constant whatever the duration of the stream.
The same engine is exposed in JavaScript as chartAppend(...), but Python
gets the dedicated stateful class because it's by far the most common
language for live data pipelines (sensors, sockets, message buses, ML training
loops, etc.).
import seraplot as sp
import time, random
from IPython.display import display, clear_output
stream = sp.LiveStream(kind="line", title="Sensor", max_points=200)
for t in range(2000):
stream.push(t, 50 + 10 * random.gauss(0, 1))
if t % 20 == 0:
clear_output(wait=True)
display(stream.render())
time.sleep(0.05)
Internally LiveStream.render() calls the universal chart_append function.
The same primitive is reachable from JavaScript and the C-FFI:
import * as sp from "seraplot";
let prev_x = [], prev_y = [];
function tick(x, y) {
const out = JSON.parse(sp.chartAppend(JSON.stringify({
kind: "line",
title: "Sensor",
x: [x], y: [y],
prev_x, prev_y,
max_points: 500,
})));
prev_x = out.x;
prev_y = out.y;
document.getElementById("plot").innerHTML = out.html;
}
The JSON payload {kind, x, y, prev_x, prev_y, max_points, title, color_hex, width, height} is the contract — the same shape applies in any host
language.
LiveStream est un petit accumulateur économe en allocation qui transforme
une série d'échantillons (x, y) arrivant dans le temps en un Chart
SeraPlot entièrement rendu. Il maintient un buffer circulaire borné (la
fenêtre max_points), donc la mémoire reste constante quelle que soit la
durée du flux.
Le même moteur est exposé en JavaScript via chartAppend(...), mais Python
obtient une classe à état dédiée parce que c'est de loin le langage le plus
utilisé pour les pipelines de données live (capteurs, sockets, bus de
messages, boucles d'entraînement ML, etc.).
import seraplot as sp
import time, random
from IPython.display import display, clear_output
stream = sp.LiveStream(kind="line", title="Capteur", max_points=200)
for t in range(2000):
stream.push(t, 50 + 10 * random.gauss(0, 1))
if t % 20 == 0:
clear_output(wait=True)
display(stream.render())
time.sleep(0.05)
En interne, LiveStream.render() appelle la fonction universelle
chart_append. La même primitive est accessible depuis JavaScript et le
C-FFI :
import * as sp from "seraplot";
let prev_x = [], prev_y = [];
function tick(x, y) {
const out = JSON.parse(sp.chartAppend(JSON.stringify({
kind: "line",
title: "Capteur",
x: [x], y: [y],
prev_x, prev_y,
max_points: 500,
})));
prev_x = out.x;
prev_y = out.y;
document.getElementById("plot").innerHTML = out.html;
}
Le payload JSON {kind, x, y, prev_x, prev_y, max_points, title, color_hex, width, height} est le contrat — la même forme s'applique dans n'importe
quelle langue hôte.
Try several classifiers, return the leaderboard sorted by score.
import seraplot as sp
result = sp.auto_classify(X_train, y_train)
print(result["best_model"], result["best_score"])
for row in result["leaderboard"]:
print(row)
Default models (2.3.89+): knn, decision_tree, gradient_boosting. The previous defaults logistic and random_forest are still available via models=["logistic","random_forest"] but were dropped from defaults pending stability fixes. Customize freely with e.g. models=["knn","gradient_boosting"].
Failed/panicking models are caught: their leaderboard entry has score = NaN and is sorted last.
Essaie plusieurs classifieurs, retourne le leaderboard trié par score.
import seraplot as sp
result = sp.auto_classify(X_train, y_train)
print(result["best_model"], result["best_score"])
for row in result["leaderboard"]:
print(row)
Modèles par défaut (2.3.89+) : knn, decision_tree, gradient_boosting. Les anciens défauts logistic et random_forest restent disponibles via models=["logistic","random_forest"] mais ont été retirés en attendant un correctif de stabilité. Personnalisable librement, ex. models=["knn","gradient_boosting"].
Les modèles qui échouent/paniquent sont capturés : leur entrée du leaderboard a score = NaN et passe en dernier.
SeraPlot exposes a small, language-universal export layer. Every function
below is registered through the same for_each_fn! macro, so the exact same
behaviour is available from Python, JavaScript and the C-FFI.
The Python wrappers accept a Chart object directly (ergonomic sugar). The
JavaScript / FFI wrappers take a JSON string — the chart's .html field must
be passed inside {"html": "..."}.
Write the complete HTML of the chart to disk. The file is fully
self-contained: it embeds the SVG, its scripts and styles. It can be opened in
any browser, attached to an email, or served statically — no server, no CDN.
Writes the SVG of the chart to disk under path. If path does not end in
.svg, the extension is rewritten to .svg. To convert to a true PNG raster,
pipe through any external converter — this keeps the binary small and avoids
shipping a 30 MB rasteriser as a hard dependency.
SeraPlot expose une petite couche d'export universelle entre langages.
Chaque fonction ci-dessous est enregistrée via la même macro for_each_fn!, le
comportement est donc strictement identique depuis Python, JavaScript et le
C-FFI.
Les wrappers Python acceptent directement un objet Chart (sucre
ergonomique). Côté JavaScript / FFI, on passe une chaîne JSON — le champ
.html du chart doit être placé dans {"html": "..."}.
Écrit l'intégralité du HTML du chart sur disque. Le fichier est
auto-suffisant : il embarque le SVG, ses scripts et ses styles. Il s'ouvre
dans n'importe quel navigateur, peut être joint à un mail ou servi en
statique — aucun serveur, aucun CDN.
Écrit le SVG du chart sur disque sous path. Si path ne finit pas par
.svg, l'extension est réécrite en .svg. Pour obtenir un vrai PNG raster,
on passe par un convertisseur externe — cela garde le binaire compact et évite
d'embarquer un rasteriseur de 30 Mo en dépendance dure.
Retourne une URL data:image/svg+xml;base64,... directement injectable dans
un <img src="...">, un background-image: url(...) CSS, ou n'importe quel
mail HTML.
url = sp.export_data_url(chart)
html = f'<img src="{url}" alt="Graphique" />'
Retourne une chaîne JSON contenant des métadonnées structurelles sur le chart
rendu. Pratique pour le logging, la télémétrie ou pour tester la complexité
d'un chart dans des tests unitaires.
import json
info = json.loads(sp.chart_info(chart))
print(info)
SeraPlot ships two universal primitives for serialising ML model state to a
language-agnostic JSON envelope. They are exposed through for_each_fn!, so
the exact same wire format is reachable from Python, JavaScript and the
C-FFI. A model trained in a Python notebook can be reloaded in a Node service
or a browser, and vice-versa.
Cross-language — the envelope works in Python, JS, C, Rust without any
binary protocol negotiation.
Audit-friendly — the file is human-readable, fits Git diffs and is
trivial to redact PII from.
Safe — no arbitrary code execution on load, unlike pickle or
joblib.
Compressible — gzipped JSON state is typically within 5–15 % of a
binary serialisation for tabular ML models, with negligible parse cost.
SeraPlot fournit deux primitives universelles pour sérialiser l'état d'un
modèle ML dans une enveloppe JSON indépendante du langage. Elles sont
exposées via for_each_fn!, donc le format de fil exact est accessible
depuis Python, JavaScript et le C-FFI. Un modèle entraîné dans un notebook
Python peut être rechargé dans un service Node ou dans le navigateur, et
inversement.
La forme de l'enveloppe est volontairement minimale :
La couche de persistance est ainsi triviale à inspecter, à diff-er, à
versionner, à chiffrer ou à signer. Pas de pickle, pas de binaire custom,
pas de risque de sécurité.
Cross-language — l'enveloppe fonctionne en Python, JS, C, Rust sans
négociation de protocole binaire.
Auditable — le fichier est lisible, s'intègre aux diffs Git et permet
de retirer trivialement les PII.
Sûr — aucune exécution de code arbitraire au chargement, contrairement
à pickle ou joblib.
Compressible — un état JSON gzippé pèse typiquement entre 5 et 15 % de
plus qu'une sérialisation binaire pour des modèles ML tabulaires, avec un
coût de parsing négligeable.
Native ml_save_model / ml_load_model are registered in the Rust core but not yet exposed as Python attributes in 2.3.89. For now use stdlib pickle directly on fitted estimators:
Les fonctions natives ml_save_model / ml_load_model sont enregistrées dans le cœur Rust mais pas encore exposées comme attributs Python en 2.3.89. Utilisez pickle standard sur les estimateurs entraînés :
Strict Content Security Policies block inline <script>. The csp_safe() method extracts JS into a <script type="application/json"> payload + a single nonce-able loader.
import seraplot as sp
chart = sp.line([1,2,3,4], [10,20,15,25]).csp_safe()
Apply your CSP script-src 'nonce-sp-nonce' and the chart still renders.
Les CSP strictes bloquent les <script> inline. La méthode csp_safe() extrait le JS dans un payload <script type="application/json"> + un loader unique compatible nonce.
Set seraplot.pythonPath to your project venv, e.g.
${workspaceFolder}/.venv/Scripts/python.exe on Windows or
${workspaceFolder}/.venv/bin/python on macOS / Linux.
Pointer seraplot.pythonPath vers le venv du projet, par exemple
${workspaceFolder}/.venv/Scripts/python.exe sous Windows ou
${workspaceFolder}/.venv/bin/python sous macOS / Linux.
Sera is the shared architecture behind SeraPlot, SeraML, and the planned SeraDFrame layer. The goal is simple: keep the public API familiar, while moving expensive work into a Rust core that can be reused from Python, JavaScript, and WebAssembly.
RustCore runtime
Python / JSBindings
Local firstDefault mode
PortableArtifacts
Sera is not a separate product that replaces the libraries above it. It is the internal stack that lets each library share the same rendering, algorithm, serialization, and export logic. That keeps the user-facing APIs small while avoiding duplicated implementations between languages.
The framework is designed for documentation, notebooks, local reports, and developer tools where a chart, a model, or a data operation should be fast to produce and easy to ship as a standalone artifact.
Project Layers
Layer
Responsibility
Typical outputs
SeraPlot
Chart construction, rendering, export, and interactive document previews.
HTMLSVGWASMDocs
SeraML
Native machine-learning algorithms with a familiar fit, predict, and export workflow.
Model stateMetricsONNX
SeraDFrame
Planned tabular layer for loading, transforming, and passing data between plotting and ML.
TablesSQL-like opsZero-copy paths
How The Stack Fits
The language bindings stay close to the conventions users already know. Python code can feel like a plotting or ML library, JavaScript can focus on browser integration, and the shared Rust core remains responsible for the performance-sensitive work.
Public API
Python functions, JavaScript modules, and future notebook or WASM entry points.
Bindings
Thin adapters that validate inputs, convert data, and call the shared core.
Rust core
Rendering, algorithms, model state, telemetry hooks, exports, and serialization.
Artifacts
Standalone documents, chart payloads, model summaries, and portable runtime data.
Telemetry remains opt-in and documented separately.
Native acceleration is used where it helps, without hiding the data flow.
Benchmarks should be read as implementation signals, not as universal guarantees.
Experimental surfaces are marked before they become stable API.
Performance Reference
The published ratios describe benchmarked paths where the native implementation removes heavy wrapper overhead. Real-world gains depend on data size, chart type, hardware, and export target.
Comparison
Reported ratio
Interpretation
SeraPlot vs Plotly
6 000x
Compact native rendering path for chart generation and export.
SeraPlot vs matplotlib
480x
Lower overhead for common chart construction paths.
SeraPlot vs Seaborn
320x
Less wrapper work before producing the final artifact.
SeraML vs sklearn KMeans
686x
Optimized native loops for iterative workloads.
SeraML vs sklearn Random Forest
28x
Parallel training and scoring potential in tree workloads.
Documentation note: this page intentionally avoids marketing buttons. It is meant to explain the architecture first, then point readers to the dedicated product pages from the sidebar.
Sera est l'architecture partagee derriere SeraPlot, SeraML et la future couche SeraDFrame. L'objectif est simple : garder une API familiere, tout en placant le travail couteux dans un coeur Rust reutilisable depuis Python, JavaScript et WebAssembly.
RustCoeur runtime
Python / JSBindings
Local firstMode par defaut
PortableArtifacts
Sera n'est pas un produit separe qui remplace les bibliotheques au-dessus de lui. C'est la pile interne qui permet a chaque bibliotheque de partager le meme rendu, les memes algorithmes, la meme serialisation et les memes exports. L'API reste plus petite, et l'implementation n'est pas dupliquee entre les langages.
Le framework vise les documentations, notebooks, rapports locaux et outils developpeur ou un graphique, un modele ou une operation de donnees doit etre produit rapidement puis partage comme artifact autonome.
Couches Du Projet
Couche
Responsabilite
Sorties typiques
SeraPlot
Construction de graphiques, rendu, export et previews interactives dans la documentation.
HTMLSVGWASMDocs
SeraML
Algorithmes de machine learning natifs avec un workflow familier fit, predict et export.
Etat modeleMetriquesONNX
SeraDFrame
Couche tabulaire prevue pour charger, transformer et faire circuler les donnees entre plotting et ML.
TablesOps SQL-likeZero-copy
Organisation De La Pile
Les bindings restent proches des conventions que les utilisateurs connaissent deja. Python peut ressembler a une bibliotheque de plotting ou de ML, JavaScript peut se concentrer sur l'integration navigateur, et le coeur Rust gere le travail sensible aux performances.
API publique
Fonctions Python, modules JavaScript et futurs points d'entree notebook ou WASM.
Bindings
Adaptateurs fins qui valident les entrees, convertissent les donnees et appellent le coeur partage.
Coeur Rust
Rendu, algorithmes, etat modele, hooks telemetry, exports et serialisation.
Artifacts
Documents autonomes, payloads de graphiques, resumes de modeles et donnees runtime portables.
La telemetry reste opt-in et documentee sur une page separee.
L'acceleration native est utilisee quand elle aide, sans masquer le flux de donnees.
Les benchmarks doivent etre lus comme des signaux d'implementation, pas comme des garanties universelles.
Les surfaces experimentales sont indiquees avant de devenir une API stable.
Reference Performance
Les ratios publies decrivent des chemins benchmarkes ou l'implementation native retire beaucoup d'overhead. Les gains reels dependent de la taille des donnees, du type de graphique, du materiel et de la cible d'export.
Comparaison
Ratio annonce
Lecture conseillee
SeraPlot vs Plotly
6 000x
Chemin de rendu natif compact pour generer et exporter les graphiques.
SeraPlot vs matplotlib
480x
Moins d'overhead sur les chemins courants de construction de graphiques.
SeraPlot vs Seaborn
320x
Moins de couches wrapper avant de produire l'artifact final.
SeraML vs sklearn KMeans
686x
Boucles natives optimisees pour les workloads iteratifs.
SeraML vs sklearn Random Forest
28x
Potentiel de parallelisation pour l'entrainement et le scoring des arbres.
Note documentation : cette page evite volontairement les boutons marketing. Elle explique d'abord l'architecture, puis laisse la sidebar guider vers les pages produit dediees.
SeraPlot is built entirely on my own, on top of a day job. I regularly rework the core of the framework to keep improving it — not because I'm the best at low-level optimisation, but because I care about delivering a complete solution that originally answered my own needs and hopefully answers yours too.
If you'd like a specific mechanic, feature or chart type, don't hesitate to reach out — by email only. I can't promise I'll build everything, but I'll do as much as I can.
I work on SeraPlot for free, on top of my day job. If it saves you time, a donation is very welcome — but you absolutely don't need to donate to send me a feature request.
SeraPlot est entièrement réalisé seul, en plus d'un travail à plein temps. Je retravaille régulièrement le corps du framework pour continuer à l'améliorer — pas parce que je suis le meilleur en optimisation bas-niveau, mais parce que je tiens à offrir une solution complète qui répondait au départ à mes propres besoins et qui répond, j'espère, aussi aux vôtres.
Si vous voulez une mécanique, une fonctionnalité ou un type de graphique particulier, n'hésitez pas — par mail exclusivement. Je ne dis pas que je serai en capacité de tout réaliser, mais je ferai le plus possible.
Je travaille sur SeraPlot gratuitement, en plus de mon travail. Si cela vous fait gagner du temps, un don est le bienvenu — mais il n'y a aucun besoin de faire un don pour me faire une demande de fonctionnalité.