Page 1 of 1

X-axis time base

Posted: Sun Jul 26, 2009 10:06 am
by Daniel Wee
I have a CSV file with samples of data taken at 300Hz. I import this data into DPlot with file format "D" and I select "0" for X-axis.

So far so good, I have the data and I can plot the graphs. The problem I have now, though, is that I can't seem to define the X-axis according to the sample rate. This is especially an issue when running the FFT function as it seems to make some assumptions as to the units for the X-axis.

My question is if there is a way to specify the time units for the X-axis. The Extents/Intervals/Size option doesn't seem to allow this. I know I can generate a secondary X-axis using multiple axes option but the FFT doesn't recognize that secondary axis in its' computations.

Am I missing something or can someone help me solve this problem? Thanks.

Daniel

Posted: Sun Jul 26, 2009 11:09 am
by DPlotAdmin
Daniel,
If you do not have an X axis label, seconds are assumed.

If you DO have an X axis label and it contains "msec" or "millisec" then milliseconds are assumed. If it contains "microsec", "µsec", or "{\sm}sec" then microseconds are assumed. None of these searches are case-specific. If none of the above applies then seconds are assumed.

In your case your time units are 1/300th of a second. To get the correct frequency units for your FFT you'll need to first transform the X values using Edit>Operate on X, with X=X/300 for seconds or X=X/0.3 for milliseconds (and in the latter case add an X axis title containing "msec" or "millisec" so that DPlot will recognize the scale.)

Posted: Sun Jul 26, 2009 11:06 pm
by Daniel Wee
Thanks. That fixed it but the FFT thing still isn't working out as well.

Daniel

Posted: Mon Jul 27, 2009 6:59 am
by DPlotAdmin
Isn't working out in what way?