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.

Display axis decorators: seconds, ms

See original GitHub issue

Description

We currently support two temporal decoration modes: time and lag. These modes use seconds as the underlying data representation, and the TimeFormatter object adaptively scales the units to an appropriate resolution given the display range.

It would be good to be able to override this, and display in fixed units. This could be easily done by adding a couple of new modes:

  • seconds: always use seconds
  • ms: always use milliseconds
  • lag_seconds: always use seconds (including negative for lag)
  • lag_ms: as above, but for milliseconds.

Implementing this is simply a matter of adding some control logic to the TimeFormatter, and adjusting the automatic axis labels to Time (s) or Time (ms) accordingly.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:20 (20 by maintainers)

github_iconTop GitHub Comments

2reactions
bmcfeecommented, Aug 13, 2018

I agree that sticking to seconds as much as possible and keeping things not too complicated is the way to go.

This sounds good to me.

When the referenced “sample plotting” function is implemented, we can consider adding ms as the minimum unit only for that sample plotting function but probably not specshow.

I’d prefer things to be consistent across the board, but we can always generalize later on if we decide it’s necessary.

Beside this problem, I think most things are clear. Any other thoughts? 😃

Nope, i think we’re good to get cracking on this!

1reaction
lostanlencommented, Aug 8, 2018

Yes, 3 digits looks good. 999 seconds is ~16 minutes, which will cover the overwhelming majority of use cases. I work in bioacoustics, where we may have 4-digit and even 5-digit audio recordings (up to 24 hour long), but typically I would use the adaptive format rather than the seconds format to display those recordings.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Changing Y-axis to display seconds appropriately - MSDN - Microsoft
Just having my Y-axis show up as a number works fine. Minimum of 0 up to 120 for 2 minutes. Data charts nicely....
Read more >
How to display milliseconds into “days : hours : minutes
I'm using Infragistics UltraChart controls for displaying ...
Read more >
librosa.display.specshow — librosa 0.10.0.dev0 documentation
'time'markers are shown as milliseconds, seconds, minutes, or hours. ... If using Hindustani or Carnatic svara axis decorations, specify Sa.
Read more >
Control axis with duration values - MATLAB - MathWorks
DurationRuler properties control the appearance and behavior of an x-axis, y-axis, or z-axis that shows duration values.
Read more >
How to add or remove a secondary axis in Microsoft Excel
When the numbers in a chart vary widely from data series to data series, or when you have mixed types of data (price...
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