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

Mask Text Caption Box in Graph Builder for a subset of sample

Here is an example where I am calculating % difference between 24 hours and 0 hours for a Script and I would like to mask the 0 hours mean results in the Caption Box since it is equal to 0%. I was able to manually change each text to white by editing but I am wondering if I can do that within the script where I can specify that for each Caption box with "0 hrs" to remove/mask the text. Thank you!!

 

Before:

UnrelatedRange6_4-1678476133689.png

 

 

After manual editing:

UnrelatedRange6_3-1678476106864.png

I attached the table with the script in this message.

 

3 REPLIES 3

Re: Mask Text Caption Box in Graph Builder for a subset of sample

Hello,

 

You can do this as follows:

1) Get a handle to graph builder in your original script. For example, change line 1 to:

gb = Graph Builder(

2) Add the following lines at the end of your script:

cr = Report( gb );
ts = cr[Outline Box( 1 )] << xpath( "//TextSeg" );       //get a list of the textSegs
ts[Loc( ts << get text, "-0.0%" )] << set text( "" );    //set blanks where text is -0.0%
ts[Loc( ts << get text, "0.0%" )] << set text( "" );     //set blanks where text is 0.0%
cr << inval;                                             //refresh display

Result:

brady_brady_0-1678768598776.png

 

Re: Mask Text Caption Box in Graph Builder for a subset of sample

Hi brady_brady,

 

Thank you for the solution. So this caption box is called "Outline Box( 1 )"? How can you find this information in JMP?

Re: Mask Text Caption Box in Graph Builder for a subset of sample

You'll need to get familiar with how JMP arranges reports using the "Display Tree". To see what the display tree contains for a given report, you can view the tree by using "Show Tree Structure". In this example, do you see the little gray triangle, just to the left of Graph Builder's red triangle? Right-click on that and select Edit > Show Tree Structure. 

 

You'll get a window linked to the Graph Builder window, such that clicking in either selects the corresponding element in the other. You'll also want to learn to use the Xpath ( ) command in JSL.

 

Brady