For the complete documentation index, see llms.txt. This page is also available as Markdown.

Line Charts

Plot Series or DataFrame as lines. This function is useful to plot lines using DataFrame’s values as coordinates.

Examples

Basic Line plot on Series

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.jsdelivr.net/npm/danfojs@1.2.0/lib/bundle.min.js"></script>
    <title>Document</title>
</head>

<body>

    <div id="plot_div"></div>
    <script>

        const s = new dfd.Series([1, 3, 2, 6, 10, 34, 40, 51, 90, 75])
        s.plot("plot_div").line()

    </script>
</body>

</html>

Line plots on DataFrame

The example below shows the plot of column values against a common x-axis (index)

The example below shows how to plot two columns in a DataFrame against each other.

To customize your plots, see the Customize your plot page

Last updated