cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP 19 is here! See the new features at jmp.com/new.
  • Register to attend Discovery Summit 2025 Online: Early Users Edition, Sept. 24-25.
Choose Language Hide Translation Bar
Juli
Level III

Lines connecting data points in graph (JMP v. 16)

Hi all,

 

At an earlier version of JMP, I used to be able to make plots like the one below. But after changing to JMP version 16, I cannot get the lines between the data points anymore.

Juli_0-1738934177375.png

I have tried to consult with other users of the software at my company, but it seems like this option is no longer an option in graphic builder for any of us. How do I get the line between the three data points in graphs in JMP version 16? 

 

Best regards,
Julie
1 ACCEPTED SOLUTION

Accepted Solutions
pmroz
Super User

Re: Lines connecting data points in graph (JMP v. 16)

This approach will work if you have three different columns.

New Table( "Untitled 9",
	Add Rows( 5 ),
	New Script(
		"Low & 2 more vs. x",
		Graph Builder(
			Size( 518, 454 ),
			Show Control Panel( 0 ),
			Variables(
				X( :x ),
				Y( :Low ),
				Y( :Mid, Position( 1 ) ),
				Y( :Upper, Position( 1 ) )
			),
			Elements(
				Bar( X, Y( 1 ), Y( 3 ), Legend( 7 ), Bar Style( "Interval" ) ),
				Points( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 8 ) ),
				Line( X, Y( 2 ), Legend( 9 ) )
			)
		)
	),
	New Column( "Low", Numeric, "Continuous", Format( "Best", 12 ),
		Set Values( [1, 1.4, 3.6, 2.1, 2.3] )
	),
	New Column( "Mid", Numeric, "Continuous", Format( "Best", 12 ),
		Set Values( [3, 3.7, 5, 3, 4] )
	),
	New Column( "Upper", Numeric, "Continuous", Format( "Best", 12 ),
		Set Values( [5.1, 6.4, 7, 5.2, 6.7] )
	),
	New Column( "x", Numeric, "Continuous", Format( "Best", 12 ),
		Set Values( [1, 2, 3, 4, 5] )
	)
);

After you run this script, click on the green triangle to generate the graph.  

pmroz_0-1743089053006.png

 

 

View solution in original post

6 REPLIES 6
jthi
Super User

Re: Lines connecting data points in graph (JMP v. 16)

What type of plot are you trying to create? How does your data look like? How has graph builder been setup?

-Jarmo
jthi
Super User

Re: Lines connecting data points in graph (JMP v. 16)

This is in JMP18 but I think 16 should be quite close.

 

Using Mean marker with Range error bar

jthi_0-1738937860967.png

Using Markers with Mean float bar with range as error bar (and slight modification to proportions)

jthi_1-1738937939392.png

 

-Jarmo
txnelson
Super User

Re: Lines connecting data points in graph (JMP v. 16)

Using JMP 16 I created the following graph

 

txnelson_0-1738938802259.png

The data table has 3 data points for each age

txnelson_1-1738938921002.png

I opened Graph Builder and dragged the Data column to the Y drop area, the Age column to the X drop area and I also dragged the Age column to the Overlay drop area

txnelson_2-1738939295511.png

I then added a line and selected the Row Order check box

txnelson_3-1738939433551.png

( adjusted the Jitter Limit for the Points

txnelson_4-1738939562216.png

It then just became a matter of changing the marker and the marker color for each of the legend setting

txnelson_5-1738939744596.png

Names default to here(1);
New Table(
	"Example",
	Add Rows( 18 ),
	New Column( "Age", Ordinal,
		Set Values(
			[12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17]
		)
	),
	New Column( "Data",
		Format( "Fixed Dec", 12, 1 ),
		Set Values(
			[51, 58.125, 66, 56, 60.2857142857143, 65, 61, 64.1666666666667, 69, 62,
			64.5714285714286, 67, 60, 64.3333333333333, 68, 62, 66.6666666666667, 70
			]
		)
	)
);

Graph Builder(
	Size( 525, 448 ),
	Show Control Panel( 0 ),
	Error Bar Offset( 0 ),
	Graph Spacing( 0 ),
	Variables( X( :age ), Y( :Data ), Overlay( :age ) ),
	Elements(
		Line( X, Y, Legend( 7 ), Row order( 1 ), Missing Values( "No Connection" ) ),
		Points( X, Y, Legend( 11 ), Jitter Limit( 0 ) )
	),
	SendToReport(
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				7,
				Properties( 0, {Line Color( 0 )}, Item ID( "12", 1 ) ),
				Properties( 1, {Line Color( 0 )}, Item ID( "13", 1 ) ),
				Properties( 2, {Line Color( 0 )}, Item ID( "14", 1 ) ),
				Properties( 3, {Line Color( 0 )}, Item ID( "15", 1 ) ),
				Properties( 4, {Line Color( 0 )}, Item ID( "16", 1 ) ),
				Properties( 5, {Line Color( 0 )}, Item ID( "17", 1 ) )
			), Legend Model(
				11,
				Base( 0, 0, 0, Item ID( "12", 1 ) ),
				Base( 1, 0, 0, Item ID( "13", 1 ) ),
				Base( 2, 0, 0, Item ID( "14", 1 ) ),
				Base( 3, 0, 0, Item ID( "15", 1 ) ),
				Base( 4, 0, 0, Item ID( "16", 1 ) ),
				Base( 5, 0, 0, Item ID( "17", 1 ) ),
				Properties(
					0,
					{Line Color( 0 ), Marker( "Minus" )},
					Item ID( "12", 1 )
				),
				Properties(
					1,
					{Line Color( 0 ), Marker( "Minus" )},
					Item ID( "13", 1 )
				),
				Properties(
					2,
					{Line Color( 0 ), Marker( "Minus" )},
					Item ID( "14", 1 )
				),
				Properties(
					3,
					{Line Color( 0 ), Marker( "Minus" )},
					Item ID( "15", 1 )
				),
				Properties(
					4,
					{Line Color( 0 ), Marker( "Minus" )},
					Item ID( "16", 1 )
				),
				Properties(
					5,
					{Line Color( 0 ), Marker( "Minus" )},
					Item ID( "17", 1 )
				)
			)}
		),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			{Marker Size( 6 ), Marker Drawing Mode( "Normal" )}
		),
		Dispatch(
			{},
			"400",
			LegendBox,
			{Legend Position( {7, [6, 7, 8, 9, 10, 11], 11, [0, 1, 2, 3, 4, 5]} )}
		)
	)
);

 

 

Jim
Juli
Level III

Re: Lines connecting data points in graph (JMP v. 16)

Dear Jim,

 

I have followed your guide and it still does not work for my dataset. Could it be because I try to connect three different columns (estimate, lower 95% and upper 95% from mean calculations)?

 

 

Best regards,
Julie
pmroz
Super User

Re: Lines connecting data points in graph (JMP v. 16)

This approach will work if you have three different columns.

New Table( "Untitled 9",
	Add Rows( 5 ),
	New Script(
		"Low & 2 more vs. x",
		Graph Builder(
			Size( 518, 454 ),
			Show Control Panel( 0 ),
			Variables(
				X( :x ),
				Y( :Low ),
				Y( :Mid, Position( 1 ) ),
				Y( :Upper, Position( 1 ) )
			),
			Elements(
				Bar( X, Y( 1 ), Y( 3 ), Legend( 7 ), Bar Style( "Interval" ) ),
				Points( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 8 ) ),
				Line( X, Y( 2 ), Legend( 9 ) )
			)
		)
	),
	New Column( "Low", Numeric, "Continuous", Format( "Best", 12 ),
		Set Values( [1, 1.4, 3.6, 2.1, 2.3] )
	),
	New Column( "Mid", Numeric, "Continuous", Format( "Best", 12 ),
		Set Values( [3, 3.7, 5, 3, 4] )
	),
	New Column( "Upper", Numeric, "Continuous", Format( "Best", 12 ),
		Set Values( [5.1, 6.4, 7, 5.2, 6.7] )
	),
	New Column( "x", Numeric, "Continuous", Format( "Best", 12 ),
		Set Values( [1, 2, 3, 4, 5] )
	)
);

After you run this script, click on the green triangle to generate the graph.  

pmroz_0-1743089053006.png

 

 

txnelson
Super User

Re: Lines connecting data points in graph (JMP v. 16)

The example I gave does not use multiple columns.  You can stack your columns into a single column and then use the approach I showed, or if you could provide your data table I will take a look at graphing it.

Jim

Recommended Articles