cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
xjjrx
Level I

Custom Reference Lines between defined x-Axis points

Hi,

 

I want to visualize data from production and want to implement reference lines to reflect the targets. The issue I face is, that the target changes due to product changes. 

This means, I not just need to define the y-value of the reference lines, but also the x-values. I tried by simply adding lines in the code, which did not led to the needed lines in the graph:

Graph Builder(
	Size( 1524, 884 ),
	Variables( X( :prod_day ), Y( :Result ) ),
	Elements( Points( X, Y, Legend( 5 ) ), Smoother( X, Y, Legend( 6 ) ) ),
	Elements(
		Line( X( 0, 81 ), Y( 13.37, 13.37), Color( "Black" ), Line Style( "Solid" ) ),
		Line( X(82, 99), Y(12, 12), Color( "Black"), Line Style( "Solid"))
	),
	SendToReport(
		Dispatch(
			{},
			"prod_day",
			ScaleBox,
			{Min( -0.5 ), Max( 134 ), Inc( 10 ), Minor Ticks( 0 )}
		),
		Dispatch(
			{},
			"Result",
			ScaleBox,
			{Min( 2.75 ), Max( 7 ), Inc( 1 ), Minor Ticks( 1 )}
		)
	)
);

Is there a way, to add lines between two defined x-axis points?

I am using JMP Pro 17.0.

Thanks in advance!

 

1 REPLY 1
jthi
Super User

Re: Custom Reference Lines between defined x-Axis points

You can use Graphic Scripts

Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");

gb = dt << Graph Builder(
	Size(525, 454),
	Show Control Panel(0),
	Variables(X(:weight), Y(:height)),
	Elements(Points(X, Y, Legend(3)))
);

fb = Report(gb)[FrameBox(1)];
fb << Add Graphics Script("Front", 
	Description("Line"), 
	Line([74 134], [55 68])
);
-Jarmo