question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Select better labels for datatime axis

See original GitHub issue
val data = mapOf(

    "time" to doubleArrayOf(0.0, 90*60*1000.0, 2*90*60*1000.0) ,

    "rate" to doubleArrayOf(0.0, 50.0, 250.0)

)

val plot = letsPlot(data) + geomLine { x = "time"; y = "rate" } +

        scaleXDateTime("Time", expand = listOf(0, 0))

Output: time chart

Note how labels are duplicated, and it is hard to tell which means what

The very first label should probably include more time units.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
vlsicommented, Dec 14, 2021

The data is time=[0.0, 8.64E11], value=[1, 1]

-336d appears there because I forgot to include , expand = listOf(0, 0) before taking the screenshot.

1reaction
IKupriyanov-HORIScommented, Nov 17, 2021

Thank you for clarification! Yes, it does make sense. Will check how we can fix this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Label Specific Excel Chart Axis Dates - My Online Training Hub
Label specific Excel chart axis dates to avoid clutter and highlight specific points in time using this clever chart label trick.
Read more >
Grapher: How to format axes labels as date/time - YouTube
This Golden Software video covers how to apply date/time formatting to axis labels. http://www.goldensoftware.com/products/grapher.
Read more >
How to change the datetime tick label frequency for matplotlib ...
The best way to customize time series tick labels is to use the tick locators and formatters from the matplotlib.dates module (mdates).
Read more >
Display or change dates on a category axis - Microsoft Support
In the chart, right-click the category axis, and then click Format Axis. · In the Format Axis pane, select the Axis Options tab....
Read more >
How to Easily Customize GGPlot Date Axis - Datanovia
You will learn how to: Change date axis labels using different combinations of days, weeks, months, year; and modify date axis limits.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found