lets-plot
lets-plot copied to clipboard
Incorrect 'plot_background' area (with empty space capture)
from lets_plot import *
LetsPlot.setup_html()
import numpy as np
np.random.seed(42)
data = {'x': np.random.randint(10, size=50)}
ggplot(data, aes(x='x')) + \
geom_bar() + \
coord_fixed(0.5) + \
theme(plot_background=element_rect(size=2, fill='light_grey'))
The filled area corresponds to the overall size of the plot:
It's more correct not to take the empty space around - use the plotting area with all titles and margins.
The expected result will be like this: