Adding a Format during creating of a Matched PairHi. 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!
Automation and ScriptingRe: Adding a Format during creating of a Matched PairModify 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

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
Re: Adding a Format during creating of a Matched PairThis 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.
Re: Adding a Format during creating of a Matched PairI 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.