Support timecode-style DateTime tick labels
See original GitHub issueHi Scott,
I’ve got a bit of a curly question.
I was wondering if there is a way to reformat the data on the X Axis?
I’m able to open audio files and display their waveforms, however I’d like to be able to show the X Axis in a time code, instead of samples.
I’ve looked at the format-strings for plt.Ticks(numericFormatStringX: “t”), however it’s just reformatting values in the millions and trying to get a time, which isn’t working.
With 44100 samples a second, you can imagine the numbers don’t work well at all…
Something like this maybe, I don’t know…
x value = formatstring( x value / samplerate, "d:hh:mm:ss:mmm")
Is there a way to convert these values to time properly? Or can you point me in the right direction?
I’m at this so far:
formsPlot1.Configure(lockVerticalAxis: true);
formsPlot1.plt.PlotSignal(dataX1);
formsPlot1.plt.AxisAuto();
formsPlot1.plt.AxisBounds(0, samples, -1, 1);
formsPlot1.plt.Ticks(numericFormatStringX: "c"); // Obviously wrong
formsPlot1.Render();
Cheers, Steve
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (9 by maintainers)
Top Results From Across the Web
How to change the datetime tick label frequency for ...
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 >Date tick labels
Date tick labels#. Matplotlib date plotting is done by converting date instances into days since an epoch (by default 1970-01-01T00:00:00).
Read more >Date formatted tick labels - MATLAB datetick
This MATLAB function labels the tick lines of the axis specified by tickaxis using dates, replacing the default numeric labels.
Read more >How to get evenly-spaced datetime tick labels regardless of x ...
I see a few issues here. First, doing this gives me nine x-tick labels from 2010-01 to 2011-01. It doesn't give 5, which...
Read more >Specify x-axis tick label format - MATLAB xtickformat
This MATLAB function sets the format for numeric x-axis tick labels. ... This option applies only to an x-axis with datetime values.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think this is fully solved now. I’ll release a NuGet package in an hour or two, and @vrdriver I look forward to hearing how it works in your hands! 👍
Hi @vrdriver, thanks for raising this issue! I like the idea of supporting time codes, as using ScottPlot to work with audio is an excellent use for this graphing library. Your screenshot mock-up really helps me better understand the goal here, thanks for posting it!
I anticipate being able to put some time into this over the weekend, then releasing an updated NuGet package once we get it figured out. @StendProg is making excellent progress in #539, so I anticipate we will figure this out soon!