Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Démarrage rapide

Your first chart

import seraplot as sp
chart = sp.build_bar_chart(
    "Sales by Region",
    labels=["North", "South", "East", "West"],
    values=[120.0, 85.0, 200.0, 140.0],
)
const sp = require('seraplot');
const chart = sp.build_bar_chart("Sales by Region", ["North", "South", "East", "West"], {
    values: [120.0, 85.0, 200.0, 140.0],
});
import * as sp from 'seraplot';
const chart = sp.build_bar_chart("Sales by Region", ["North", "South", "East", "West"], {
    values: [120.0, 85.0, 200.0, 140.0],
});

In Jupyter, the chart displays automatically.


Save to HTML

chart.save(plot_name.html)
chart.save(plot_name.html);
chart.save(plot_name.html);

Votre premier graphique

import seraplot as sp
chart = sp.build_bar_chart(
    "Ventes par région",
    labels=["Nord", "Sud", "Est", "Ouest"],
    values=[120.0, 85.0, 200.0, 140.0],
)
const sp = require('seraplot');
const chart = sp.build_bar_chart("Ventes par région", ["Nord", "Sud", "Est", "Ouest"], {
    values: [120.0, 85.0, 200.0, 140.0],
});
import * as sp from 'seraplot';
const chart = sp.build_bar_chart("Ventes par région", ["Nord", "Sud", "Est", "Ouest"], {
    values: [120.0, 85.0, 200.0, 140.0],
});

Dans Jupyter, le graphique s'affiche automatiquement.


Enregistrer en HTML

chart.save(nom_du_plot.html)
chart.save(nom_du_plot.html);
chart.save(nom_du_plot.html);