How can I import reference lines from a column to the X-axisHi,
I have a large data set with a common time axis. I want to add a column with events that occurred, to display these events as a vertical reference line (on the X-axis). How can I do this? If I now make one graph, I need to manually copy all X-axis reference lines to another graph, I want an automated option to do this.
The events will add extra information regarding the trends observed and will help in the discussion when I show these trends to my team. The table below represents (simplified ofc.) my data set.
Thanks.
| Date & Time | P1 | P2 | P3 | Events |
| 27/09/2018 6:00 | 5 | 11 | 0.5 | pump failure |
| 27/09/2018 14:00 | 4 | 18 | 0.2 | (empty) |
| 27/09/2018 22:00 | 5 | 15 | 0.4 | raw material shortage |
Re: How can I import reference lines from a column to the X-axisHere is a simple illustration of one way to do this:
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
// Create reference line data table for the illustration
dtLines = New Table( "Lines",
New Column( "HeightRefs", values( [52, 60, 66] ) ),
New Column( "Labels", character, values( {"Age 10", "Age 14", "Age 18"} ) )
);
// Create the chart
Biv = dt << Bivariate( Y( :weight ), X( :height ) );
// Add the lines
For( i = 1, i <= N Rows( dtLines ), i++,
Report( Biv )[AxisBox( 2 )] << add ref line( dtLines:HeightRefs[i], dtLines:Labels[i] )
);