panelInset
Parameter in theme()
¶%useLatestDescriptors
%use lets-plot
LetsPlot.getInfo()
Lets-Plot Kotlin API v.4.9.0. Frontend: Notebook with dynamically loaded JS. Lets-Plot JS v.4.5.1.
val hours = (0 until 12).map { String.format("%02d:00", it) }
val p = letsPlot() +
geomPoint() { x = hours } +
themeGrey() +
theme(axisLine = elementLine(color = "black"))
In the polar coordinate system, it's common for tick labels to overlap.
The panelInset
parameter assists in creating additional space to accommodate tick labels more effectively.
gggrid(
listOf(
p + coordPolar(),
p + theme(panelInset = listOf(0, 35)) + coordPolar(),
p + theme(panelInset = listOf(0, 35)) + coordPolar(transformBkgr = false),
)
)
In rectangular coordinate systems, the panelInset
parameter functions as a margin, adjusting the panel boundaries within the plot:
gggrid(
listOf(
p,
p + theme(panelInset = 15)
)
)