panel_inset
Parameter in theme()
¶from lets_plot import *
LetsPlot.setup_html()
hours = list(map(lambda v: '{:02d}:00'.format(v), range(12)))
p = ggplot() \
+ geom_point(aes(x=hours)) \
+ theme_grey() \
+ theme(axis_line=element_line(color='black'))
In the polar coordinate system, it's common for tick labels to overlap.
The panel_inset
parameter assists in creating additional space to accommodate tick labels more effectively.
gggrid([
p + coord_polar(),
p + theme(panel_inset=[0, 35]) + coord_polar(),
p + theme(panel_inset=[0, 35]) + coord_polar(transform_bkgr=False),
])
In rectangular coordinate systems, the panel_inset
parameter functions as a margin, adjusting the panel boundaries within the plot:
gggrid([
p,
p + theme(panel_inset=15)
])