Hi @jofu,
Welcome to the community!
The embedded image in your post is not showing, so I'm flying a little blind here. I'm guessing you can probably do what you want using Add Text Annotation. Here's an example:
dt = Open("$Sample_Data/Big Class.jmp");
USL = 68;
LSL = 55;
MUSL = 67;
SampleSize = N Row(dt << Get Rows Where(:Sex == "M"));
AboveUSL = Round(100*N Row(dt << Get Rows Where(:Sex == "M" & :height > USL))/SampleSize,2);
BelowLSL = Round(100*N Row(dt << Get Rows Where(:Sex == "M" & :height < LSL))/SampleSize,2);
AboveMUSL = Round(100*N Row(dt << Get Rows Where(:Sex == "M" & :height > MUSL))/SampleSize,2);
text_str = Eval Insert(
"Male Data
Sample Size: ^SampleSize^
Above USL: ^Above USL^%
Above MUSL: ^AboveMUSL^%
Below USL: ^BelowLSL^%"
);
gb = dt << Graph Builder(
Size( 518, 452 ),
Show Control Panel( 0 ),
Variables( X( :height ), Y( :sex ) ),
Elements( Histogram( X, Y, Legend( 6 ) ) ),
) << Report;
gb << Add Text Annotation(
Text(text_str),
Text Box( {80, 60, 127, 281} )
);
And here's what that looks like:
You'll have to play with coordinates for the text box a bit. I only worked with the first 2 to get the annotation approximately where I wanted. You could do this in some kind of loop. My concern with this approach is that the placement of the annotation is not very robust. It would be nice if you could pin it to a corner of plot or something.
-- Cameron Willden