Closed
Description

val plot = letsPlot(dataset) + geomLine {
x = "stage"
y = "value"
color = asDiscrete("id")
}
val processedSpec = MonolithicCommon.processRawSpecs(plot.toSpec(), frontendOnly = false)
val panel = DefaultPlotPanelBatik(
processedSpec = processedSpec,
preserveAspectRatio = true,
preferredSizeFromPlot = false,
repaintDelay = 10,
) { messages ->
for (message in messages) {
println("[Example App] $message")
}
}
val window = JFrame("Example App (Swing-Batik)")
window.defaultCloseOperation = EXIT_ON_CLOSE
window.contentPane.layout = BoxLayout(window.contentPane, BoxLayout.Y_AXIS)
window.contentPane.add(panel)
SwingUtilities.invokeLater {
window.pack()
window.size = Dimension(850, 400)
window.setLocationRelativeTo(null)
window.isVisible = true
}