Two new parameters in the theme()
function, legendTicks
and legendTicksLength
, provide fine-grained control over colorbar tick marks.
%useLatestDescriptors
%use dataframe
%use lets-plot
LetsPlot.getInfo()
Lets-Plot Kotlin API v.4.10.0. Frontend: Notebook with dynamically loaded JS. Lets-Plot JS v.4.6.1.
val data = mapOf("time" to listOf("Lunch", "Lunch", "Dinner", "Dinner", "Dinner"))
val p = letsPlot(data) +
geomBar{x = "time"; fill = "..count.."} +
scaleFillGrey() +
themeVoid() +
ggsize(400, 200)
p
val longTicks = theme(legendTicksLength = 10) + ggtitle("Long Ticks")
val thickTicks = theme(legendTicks = elementLine(size = 4)) + ggtitle("Thick Ticks")
val thickRedTicks = theme(legendTicks = elementLine(size = 4, color = "red")) + ggtitle("Thick Red Ticks")
val hiddenTicks = theme(legendTicks = "blank") + ggtitle("Hidden Ticks")
gggrid(
listOf(
p + longTicks,
p + thickTicks,
p + thickRedTicks,
p + hiddenTicks
)
) + ggsize(800, 200)