Subscribe Bookmark RSS Feed

Overlay plot for timeseries from 2 tables

maarten

Community Trekker

Joined:

Jun 18, 2013

I am doing experiments where I create timeseries for each run, i.e. I have a laser measuring distance and each run is executed under different circumstances.

I would like to check whether there are some patterns and hence would like to use overlay plots.

The challenge for which I am seeking help is that the time axis (X) - for each run is different. Because of this, I did not manage to join the 2 tables.

I am attending a couple of datatables, each for 1 run.

  • The column to match is time: range from 0 to about 1500 [ms] - intervals are multiples of 0.125 [ms]
  • Number of datapoints per run is about 60 to 130
  • I would like to plot height or C-2-C (time distance to previous point) and have this as an overlay plot for the different runs
  • Because the starting point is not controlled, measurements may start at different timings - it would be ok to rescale to have the first measurement at time = 0.000 [ms]

How could I do this using JMP?

Maarten

2 REPLIES
pmroz

Super User

Joined:

Jun 23, 2011

Here's an approach that's hard-coded to the 4 tables listed above.  Zeroes out each time column using the first time.

tbl_list = {"2013-05-02_18-34-27_peaks", "2013-05-02_18-35-09_peaks", "2013-05-02_18-35-26_peaks",

            "2013-05-02_18-35-45_peaks"};

for (i = 1, i <= nitems(tbl_list), i++,

    dt = data table(tbl_list[i]);

   

    dt << new column("Dataset", Character, nominal, << set each value (tbl_list[i]));

    dt << new column("Adj Time", numeric, continuous);

    zero_time = dt:Time[1];

    for (k = 1, k <= nrows(dt), k++,

        dt:Adj Time[k] = dt:Time[k] - zero_time;

    );

);

Data Table( "2013-05-02_18-34-27_peaks" ) <<

Concatenate(

    Data Table( "2013-05-02_18-35-45_peaks" ),

    Data Table( "2013-05-02_18-35-26_peaks" ),

    Data Table( "2013-05-02_18-35-09_peaks" ),

    Output Table( "All Peak Tables" )

);

current data table("All Peak Tables");

Graph Builder(

    Size( 574, 500 ),

    Show Control Panel( 0 ),

    Variables( X( :Adj Time ), Y( :Name( "C-2-C" ) ), Overlay( :Dataset ) ),

    Elements(

        Points( X, Y, Legend( 1 ) ),

        Line( X, Y, Legend( 3 ), Row order( 0 ), Summary Statistic( "Mean" ) )

    ),

    SendToReport(

        Dispatch(

            {},

            "400",

            ScaleBox,

            {Legend Model(

                1,

                Base( 0, 3, 0 ),

                Base( 1, 3, 1 ),

                Base( 2, 3, 2 ),

                Base( 3, 3, 3 )

            )}

        ),

        Dispatch( {}, "Graph Builder", FrameBox, {Marker Size( 3 )} )

    )

);

Graph Builder(

    Size( 607, 500 ),

    Show Control Panel( 0 ),

    Variables( X( :Adj Time ), Y( :Height ), Overlay( :Dataset ) ),

    Elements(

        Points( X, Y, Legend( 1 ) ),

        Line( X, Y, Legend( 4 ), Row order( 0 ), Summary Statistic( "Mean" ) )

    ),

    SendToReport(

        Dispatch(

            {},

            "Height",

            ScaleBox,

            {Min( 2302059.49656751 ), Max( 14000000 ), Inc( 2000000 ),

            Minor Ticks( 1 )}

        ),

        Dispatch(

            {},

            "400",

            ScaleBox,

            {Legend Model(

                1,

                Base( 0, 4, 0 ),

                Base( 1, 4, 1 ),

                Base( 2, 4, 2 ),

                Base( 3, 4, 3 )

            )}

        ),

        Dispatch( {}, "Graph Builder", FrameBox, {Marker Size( 3 )} )

    )

);

maarten

Community Trekker

Joined:

Jun 18, 2013

Woke up with a simple idea that works

  • Create a dummy table with time (0 to 1200 with 0.125 intervals).
  • join this table with any of the runs, one at a time.

Below picture is an plot using the graph builder - it indeed suggests there might be a pattern.

3720_2013-05-02_Overlay_Peaks_130619.PNG