Skip to content

Support timecode-style DateTime tick labels #537

@vrdriver

Description

@vrdriver

Hi 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions