size_unit in geom_pie()¶Use the size_unit parameter to relate the size of the "pie"\
to the length of the unit step along one of the axis.
import pandas as pd
from lets_plot import *
LetsPlot.setup_html()
mpg_df = pd.read_csv("https://raw.githubusercontent.com/JetBrains/lets-plot-docs/master/data/mpg.csv")
mpg_df.head(3)
ggplot(mpg_df) + geom_pie(aes(fill='class', weight='displ'))
Parameters: size=1, size_unit="x".
ggplot(mpg_df) + \
geom_pie(aes(fill='class', weight='displ'), size=1, size_unit="x") + \
coord_fixed()
Parameters: size=0.7, size_unit="x".
ggplot(mpg_df) + \
geom_pie(aes(fill='class', weight='displ'), size=0.7, size_unit="x") + \
coord_fixed() + \
theme_void()