Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
Level I

## How can I import reference lines from a column to the X-axis

Hi,

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

Highlighted
Super User

## Re: How can I import reference lines from a column to the X-axis

Here 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 ) );

);