In [1]:
from lets_plot import *
LetsPlot.setup_html()

from lets_plot.plot.coord import coord_polar
In [2]:
hours = list(map(lambda v: '{:02d}:00'.format(v), range(12)))
p = ggplot() \
    + geom_point(aes(x=hours)) \
    + theme_grey()

Linear coordinate system

In linear coordinate systems inset acts as a margin, moving the panel boundaries within the plot:

In [3]:
gggrid([
    p,
    p + theme(panel_inset=15)
])
Out[3]:

Polar coordinate system

Default inset may cause tick labels overlapping in polar coordinate system.
The panel_inset parameter acts as a margin and can be used to create space between the axis and the panel:

In [4]:
inset = [0, 35, 0, 35]
polar = coord_polar(xlim=[0, 12])
gggrid([
    p + polar,
    p + theme(panel_inset=inset) + polar,
])
Out[4]:

Parameter transform_bkgr

When using the transform_bkgr parameter, the panel is not transformed into a circle, but remains a rectangle. This behaviour is similar to ggplot2.
In this case, panel_inset acts as padding, pushing the content into the panel:

In [5]:
polar = coord_polar(xlim=[0, 12], transform_bkgr=False)
gggrid([
    p + polar,
    p + theme(panel_inset=inset) + polar
])
Out[5]:

coord_fixed()

This is how panel_inset works in coord_fixed().

In [6]:
inset = 40
p \
    + scale_x_continuous(position='both') \
    + scale_y_continuous(position='both') \
    + coord_fixed() \
    + ggtitle('coord_fixed() + inset=' + str(inset)) \
    + theme(panel_inset=inset) 
Out[6]: