lets-plot icon indicating copy to clipboard operation
lets-plot copied to clipboard

Incorrect 'plot_background' area (with empty space capture)

Open OLarionova-HORIS opened this issue 2 years ago • 0 comments

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: Screenshot 2023-11-01 at 13 48 40

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: Screenshot 2023-11-01 at 13 48 25

OLarionova-HORIS avatar Nov 01 '23 11:11 OLarionova-HORIS