cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • We’re improving the Learn JMP page, and want your feedback! Take the survey
Choose Language Hide Translation Bar
csoon1
Level III

Adding a Format during creating of a Matched Pair

Hi. I created a Matched-Pair plot this way and it works. 

mpObj = stackDT << Matched Pairs(
		Y( column(stackDT, referenceDTName ), column(stackDT, currentDTName ) ),
		Plot Dif By Mean( 0 ),
		Plot Dif By Row( 1 ),
		Reference Frame( 0 ),
		By( :Test Item )
	);

However, I am hoping to add formating to the Y-Axis of the plot such that it will be in Scientific format. I can do this if I modify the setting after the plot is created (NOTE: I am just showing a portion of the code):

SendToReport(
	Dispatch( {"Difference: X: R1-Y: R2"}, "2", ScaleBox( 2 ),
		{Format( "Engineering SI", 12 )}
	)
)

I am hoping to include this formatting on the first code during the creation of the Matched Pair plot (so I don't have to do another step of formatting). Is this possible? If so, can you please show me.

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
csoon1
Level III

Re: Adding a Format during creating of a Matched Pair

I think I got it:

 

mpObj = stackDT << Matched Pairs(
		Y( column(stackDT, referenceDTName ), column(stackDT, currentDTName ) ),
		Plot Dif By Mean( 0 ),
		Plot Dif By Row( 1 ),
		Reference Frame( 0 ),
		SendToReport(
			Dispatch( { },
				"2", ScaleBox( 2 ),
				{Format( "Engineering SI", 12 )}
			)
		),
		By( :Test Item )
	);

I just didn't think at first that "Dispatch ( { }", if there is nothing specified inside "{ }" would work.

View solution in original post

3 REPLIES 3
jthi
Super User

Re: Adding a Format during creating of a Matched Pair

Modify the axis in the report, go to red triangle and copy the script. It should be same (or very close) to what you would get if you moved that part inside the Matched Pairs() message

jthi_0-1747676753481.png

Matched Pairs(
	X(:Dose),
	Y(:BP 8M, :BP 8W),
	Reference Frame(1),
	SendToReport(
		Dispatch({"Difference: BP 8W-BP 8M"}, "1", ScaleBox,
			{Format("Scientific", 12)}
		)
	)
);

As you are using By it might require some extra modifications

-Jarmo
csoon1
Level III

Re: Adding a Format during creating of a Matched Pair

This is what I am doing now. The Matched Pair plot is already created and afterwards I did run a script same exactly as you suggested. My question is that, during the creating of the Matched Pair plot (before the plot existed), I want to include the formatting already.

 

My script creates multiple matched pair plots at once. This means that I would have to go to each of the plot and reformat each of them individually. It's not very efficient. I am hoping that when I create the plots, I can include specify the formatting already.

csoon1
Level III

Re: Adding a Format during creating of a Matched Pair

I think I got it:

 

mpObj = stackDT << Matched Pairs(
		Y( column(stackDT, referenceDTName ), column(stackDT, currentDTName ) ),
		Plot Dif By Mean( 0 ),
		Plot Dif By Row( 1 ),
		Reference Frame( 0 ),
		SendToReport(
			Dispatch( { },
				"2", ScaleBox( 2 ),
				{Format( "Engineering SI", 12 )}
			)
		),
		By( :Test Item )
	);

I just didn't think at first that "Dispatch ( { }", if there is nothing specified inside "{ }" would work.

Recommended Articles