cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
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

Recommended Articles