cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
RA899
Level III

Graph builder window size in Journal: Scaling issue [JSL]

Hello, 

I'm trying to write a script and run it using journal. The script is supposed to plot different graph builder windows. The issue I'm having is that sometimes when I try to change the axis setting (Min, Max, and Increment), the window gets very small and the axis setting becomes different than the one in the script. Ex: 

Screenshot 2024-06-05 095013.png

 

 

 

The interesting thing here is that when I try to use the re-run in a new window option, it produces a graph that actually reflects the script:

When clicking at the red tringle, it shows an option to re-run the plot in a new windowWhen clicking at the red tringle, it shows an option to re-run the plot in a new window

 

after_Re_Run.png

 

 

 

 

After trial and error, I believe it has something to do with the window size I'm choosing. Playing with the window size fixes the issue sometimes, or sometimes playing with the axis setting fix it too. However, this is a time-consuming process. Could I please get guidance on how to make sure I get the correct window size every time(like a dynamic window size) or a guidance on how to get rid of this issue.

 

this is a snapshot of the jsl code I'm using:  

 for( i3 =1, i3 < IDD_COUNT+1, i3++, 

Sigma[i3] = Col Std Dev( AS COLUMN(IDD_LIST[i3]) ); median[i3] = Col Median( AS COLUMN(IDD_LIST[i3]) ); gb = New Window( "Capability", hlb = H List Box() ); // define spec limit to show the plot clearly specLimits = as column(IDD_LIST[i3]) << get property( "Spec Limits" ); usln_value = specLimits["USL"]; lsln_value = specLimits["LSL"]; //define Max, Min ,and Inc variables Max_ = Max( Add( median[i3], Multiply(10, sigma[i3] ) ) ); Min_ = Min( Subtract( median[i3], Multiply(10 , sigma[i3] ) ) ); Inc_ = (Multiply( 5, sigma[i3] )); if ( Max_ < usln_value , Max_ = Max( Add( usln_value[i3], Multiply(3, sigma[i3] ) ) ) ); if (Min_ > lsln_value , Min_ = Min( Subtract( lsln_value[i3], Multiply(3 , sigma[i3] ) ) ) ); hlb << append( gb = Graph Builder( //window size Size( 5000, 5000), Variables( Y( IDD_LIST[i3] ), Group X( :Program ) , ), Elements( Histogram( X( 1 ), X( 2 ), X( 3 ), Y, Legend( 46 ),Means and Std Devs( 1 ) ),Smoother( X( 1 ), X( 2 ), X( 3 ), X( 4 ), Y, Legend( 49 ) ), Caption Box( Y, Legend( 50 ), Summary Statistic( "N" ),Summary Statistic 2( "5 Number Summary" ) ) ), SendToReport( Dispatch( {}, "graph title", TextEditBox, {Set Text( Show( Char( Name Expr( IDD_LIST[i3] ) ) ); )} ), Dispatch( {}, Char( Name Expr( IDD_LIST[i3] ) ), ScaleBox, {Format( "Best", 6 ), Label Row( {Show Major Grid( 1 ), Show Minor Grid( 1 ) } ), Minor Ticks( 1 ), Max( Max_ ), Min( Min_ ), Inc( Inc_ ) } ),Dispatch( {}, "400", ScaleBox, {Legend Model( 46, Properties( 0, {Line Color( 6 ), Fill Color( 38 )}, Item ID( Char( Name Expr( IDD_LIST[i3] ) ), 1 ) ) )} ), ) );
1 REPLY 1

Re: Graph builder window size in Journal: Scaling issue [JSL]

I'm a little unclear on what the larger process is here, because you mention a Journal but I don't see a Journal as part of your script.  One thing that you might try is adding Fit to Window( "Off" ) to your Graph Builder scripts.  This will turn off the default auto-stretching, which might be responsible for resizing the Graph Builder plots.

 

If that doesn't help, it might help to understand more about how the reports are being combined into a Journal, as it does sound like that is part of the process here.

 

-Dan