plotnine.geom_linerange

geom_linerange(mapping=None, data=None, **kwargs)

Vertical interval represented by lines

{usage}

Examples

import pandas as pd
from plotnine import (
    ggplot,
    aes,
    geom_point,
    geom_line,
    geom_linerange,
    element_blank,
    element_rect,
    theme,
    theme_matplotlib,
    theme_set,
)

# Set default theme
# matplotlib + the background of 538
theme_set(
    theme_matplotlib()
    + theme(
        plot_background=element_rect(fill="#F0F0F0"),
        panel_background=element_rect(fill="#F0F0F0"),
    )
)
Source: Set default theme