cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
BART_VDB
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 & TimeP1P2P3Events
27/09/2018 6:005110.5pump failure
27/09/2018 14:004180.2(empty)
27/09/2018 22:005150.4raw material shortage

 

 

1 REPLY 1
txnelson
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 ) );

// Add the lines
For( i = 1, i <= N Rows( dtLines ), i++,
	Report( Biv )[AxisBox( 2 )] << add ref line( dtLines:HeightRefs[i], dtLines:Labels[i] )
);
Jim