Filled Line Plot — lets-plot

A line plot with the area between the line and the baseline (typically x-axis) filled with a semi-transparent color. This creates an area chart effect for a single series, emphasizing the magnitude of values.

Filled Line Plot rendered with lets-plot

Python source (lets-plot)

""" anyplot.ai
line-filled: Filled Line Plot
Library: letsplot 4.9.0 | Python 3.13.13
Quality: 90/100 | Updated: 2026-05-12
"""

import os

import numpy as np
import pandas as pd
from lets_plot import *
from lets_plot.export import ggsave


LetsPlot.setup_html()

# Theme tokens
THEME = os.getenv("ANYPLOT_THEME", "light")
PAGE_BG = "#FAF8F1" if THEME == "light" else "#1A1A17"
INK = "#1A1A17" if THEME == "light" else "#F0EFE8"
INK_SOFT = "#4A4A44" if THEME == "light" else "#B8B7B0"
BRAND = "#009E73"

# Data - Monthly website traffic over a year
np.random.seed(42)
months = np.arange(1, 13)
base_traffic = 50000 + np.cumsum(np.random.randn(12) * 5000)
seasonal_effect = 10000 * np.sin(np.pi * months / 6)
traffic = base_traffic + seasonal_effect + np.random.randn(12) * 3000
traffic = np.maximum(traffic, 20000)

df = pd.DataFrame({"month": months, "visitors": traffic})

# Create filled line plot
plot = (
    ggplot(df, aes(x="month", y="visitors"))
    + geom_area(fill=BRAND, alpha=0.4)
    + geom_line(color=BRAND, size=2)
    + geom_point(color=BRAND, size=5)
    + labs(x="Month", y="Website Visitors", title="line-filled · letsplot · anyplot.ai")
    + scale_x_continuous(breaks=list(range(1, 13)))
    + ggsize(1600, 900)
    + theme_minimal()
    + theme(
        plot_background=element_rect(fill=PAGE_BG, color=PAGE_BG),
        panel_background=element_rect(fill=PAGE_BG),
        panel_grid_major=element_line(color=INK_SOFT, size=0.3),
        panel_grid_minor=element_blank(),
        axis_title=element_text(color=INK, size=20),
        axis_text=element_text(color=INK_SOFT, size=16),
        axis_line=element_line(color=INK_SOFT, size=0.5),
        plot_title=element_text(color=INK, size=24),
    )
)

# Save PNG and HTML (scale 3x for 4800 × 2700 px)
ggsave(plot, filename=f"plot-{THEME}.png", path=".", scale=3)
ggsave(plot, filename=f"plot-{THEME}.html", path=".")

Part of Filled Line Plot on anyplot.ai.

Other implementations