JetBrains / lets-plot-kotlin

Grammar of Graphics for Kotlin
https://lets-plot.org/kotlin/
MIT License
422 stars 36 forks source link

Incorrect date axis rendering #99

Closed holgerbrandl closed 2 years ago

holgerbrandl commented 2 years ago

Expected: It should render a readible time axis when doing plot + geomStep { x = "first"; y = "second" } + ggtitle(title)

Observed: It is rendering some hard to read time labels.

rendered with letsplot image

The column is simply a list of Instants:

image

In contrast, when rendering the same data with ggplot2 (via kravis) using geomStep (with default scale settings) it feels more readable:

image

Example data claimed_capacity.csv

alshan commented 2 years ago

Hi Holger, as a workaround you can specify scaleXDateTime() explicitly. Or automatic scale selection is essential in this case?

holgerbrandl commented 2 years ago

No it's not essential, but in general, improved scale-detection would certainly improve user experience. Thanks for the update and the workaround.

alshan commented 2 years ago

Date-time series auto-detection was added in v3.2.0