%useLatestDescriptors %use lets-plot LetsPlot.getInfo() val n = 10 val data = mapOf( "x" to (0 until n).toList(), "y" to (0 until n).map { (it + 1 + 0.025 * it) * 10.0.pow(-5) }, "c" to (0 until n).map { it * 10.0.pow(10) } ) val p = letsPlot(data) { x = "x"; y = "y"; fill = "c" } + geomBar(stat = Stat.identity) val powTheme = theme(exponentFormat = "pow") gggrid(listOf( p + ggtitle("E-notation (default)"), p + powTheme + ggtitle("Superscript Power") )) val left = p + geomLabel(alpha = 0.8, fill = "white") { label = "y" } val right = p + geomLabel(alpha = 0.8, fill = "white", labelFormat=".2~e") { label = "y" } gggrid(listOf(left, right)) + powTheme