Make charts my way using the Altair charting library for Python.
Install from PyPI.
$ pip install altair-stiles
Import with Altair.
import altair as alt
import altair_stiles as altstiles
Register and enable the theme.
alt.themes.register('stiles', altstiles.theme)
alt.themes.enable('stiles')
Make a chart.
from vega_datasets import data
source = data.iowa_electricity()
alt.Chart(source, title="Iowa's renewable energy boom").mark_area().encode(
x=alt.X(
"year:T",
title=" "
),
y=alt.Y(
"net_generation:Q",
stack="normalize",
title=" ",
axis=alt.Axis(format=".0%", tickCount=5),
),
color=alt.Color(
"source:N",
legend=alt.Legend(title=" "),
)
).configure_legend(orient='top')
This library requires that you have the "Roboto" font installed.