cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
mallen810
Level III

Closing data table while leaving a chart open

I am running a script to bring in data and create a variability chart. I want to be able to keep the chart but close the data table without saving automatically. Is there a way to complete this task. 

 

 

New Column( "SoftDelete",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Selected,
Set Values(
[., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., .,
., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., .,
., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., .,
., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., ., .,
., ., ., ., .]
)
);
New Column( "New Date", Character, "Ordinal", Formula( Format( :Date ) ) );

Variability Chart( Y( :GasYield ), X( :New Date ), Max Iter( 100 ), Conv Limit( 0.00000001 ), Number Integration Abscissas( 128 ), Number Function Evals( 65536 ), Analysis Type( "Choose best analysis (EMS REML Bayesian)" ), Show Grand Mean( 1 ), Std Dev Chart( 0 ), Show Box Plots( 1 ), Report View( "Summary" ), SendToReport( Dispatch( {}, "Variability Gauge", OutlineBox, {Set Title( "14ND" )} ), Dispatch( {}, "Variability Chart for GasYield", OutlineBox, {Set Title( "14ND" )} ), Dispatch( {"Variability Chart for GasYield"}, "1", ScaleBox, {Min( 0 ), Max( 27 ), Inc( 3 ), Minor Ticks( 0 ), Label Row( {Lower Frame( 0 ), Show Major Ticks( 0 )} )} ), Dispatch( {"Variability Chart for GasYield"}, "2", ScaleBox, {Label Row( Show Major Grid( 1 ) )} ), Dispatch( {"Variability Chart for GasYield"}, "GasYield", TextEditBox, {Set Text( "GasYield Cu. Ft./Lb." )} ), Dispatch( {"Variability Chart for GasYield"}, "Variability Chart", FrameBox, {DispatchSeg( CustomStreamSeg( 5 ), {Line Color( "Green" ), Line Style( "Solid" ), Line Width( 2 )} ), DispatchSeg( Box Plot Seg( 1 ), {Box Type( "Outlier" ), Line Color( "Red" )} ), DispatchSeg( Box Plot Seg( 2 ), {Box Type( "Outlier" ), Line Color( "Red" )} ), DispatchSeg( Box Plot Seg( 3 ), {Box Type( "Outlier" ), Line Color( "Red" )} ), DispatchSeg( Box Plot Seg( 4 ), {Box Type( "Outlier" ), Line Color( "Red" )} ), DispatchSeg( Box Plot Seg( 5 ), {Box Type( "Outlier" ), Line Color( "Red" )} ), DispatchSeg( Box Plot Seg( 6 ), {Box Type( "Outlier" ), Line Color( "Red" )} ), DispatchSeg( Box Plot Seg( 7 ), {Box Type( "Outlier" ), Line Color( "Red" )} ), DispatchSeg( Box Plot Seg( 8 ), {Box Type( "Outlier" ), Line Color( "Red" )} ), DispatchSeg( Box Plot Seg( 9 ), {Box Type( "Outlier" ), Line Color( "Red" )} ), DispatchSeg( Box Plot Seg( 10 ), {Box Type( "Outlier" ), Line Color( "Red" )} ), DispatchSeg( Box Plot Seg( 11 ), {Box Type( "Outlier" ), Line Color( "Red" )} ), DispatchSeg( Box Plot Seg( 12 ), {Box Type( "Outlier" ), Line Color( "Red" )} ), DispatchSeg( Box Plot Seg( 13 ), {Box Type( "Outlier" ), Line Color( "Red" )} ), DispatchSeg( Box Plot Seg( 14 ), {Box Type( "Outlier" ), Line Color( "Red" )} ), DispatchSeg( Box Plot Seg( 15 ), {Box Type( "Outlier" ), Line Color( "Red" )} ), DispatchSeg( Box Plot Seg( 16 ), {Box Type( "Outlier" ), Line Color( "Red" )} ), DispatchSeg( Box Plot Seg( 17 ), {Box Type( "Outlier" ), Line Color( "Red" )} ), DispatchSeg( Box Plot Seg( 18 ), {Box Type( "Outlier" ), Line Color( "Red" )} ), DispatchSeg( Box Plot Seg( 19 ), {Box Type( "Outlier" ), Line Color( "Red" )} ), DispatchSeg( Box Plot Seg( 20 ), {Box Type( "Outlier" ), Line Color( "Red" )} ), DispatchSeg( Box Plot Seg( 21 ), {Box Type( "Outlier" ), Line Color( "Red" )} ), DispatchSeg( Box Plot Seg( 22 ), {Box Type( "Outlier" ), Line Color( "Red" )} ), DispatchSeg( Box Plot Seg( 23 ), {Box Type( "Outlier" ), Line Color( "Red" )} ), DispatchSeg( Box Plot Seg( 24 ), {Box Type( "Outlier" ), Line Color( "Red" )} ), DispatchSeg( Box Plot Seg( 25 ), {Box Type( "Outlier" ), Line Color( "Red" )} ), DispatchSeg( Box Plot Seg( 26 ), {Box Type( "Outlier" ), Line Color( "Red" )} ), DispatchSeg( Box Plot Seg( 27 ), {Box Type( "Outlier" ), Line Color( "Red" )} )} ), Dispatch( {"Variability Chart for GasYield"}, "New Date", TextBox, {Hide( 1 )} ), Dispatch( {"Variability Chart for GasYield"}, "1", ScaleBox( 2 ), {Min( 0 ), Max( 27 ), Inc( 3 ), Minor Ticks( 0 ), Label Row( {Lower Frame( 0 ), Show Major Ticks( 0 ), Tick Mark Style( "Automatic" ), Tick Mark( Label( "." ), Label( "11/01/17" ) )} )} ) ) );

 

1 ACCEPTED SOLUTION

Accepted Solutions
ian_jmp
Level X

Re: Closing data table while leaving a chart open

By design, in JMP reports are linked to their parent table, and when you close the table, they close too. But you can do this kind of thing:

NamesDefaultToHere(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
vc = dt << Variability Chart(Y( :height ), X( :age ));
vc << Journal;
Close(dt, NoSave);

View solution in original post

5 REPLIES 5
ian_jmp
Level X

Re: Closing data table while leaving a chart open

By design, in JMP reports are linked to their parent table, and when you close the table, they close too. But you can do this kind of thing:

NamesDefaultToHere(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
vc = dt << Variability Chart(Y( :height ), X( :age ));
vc << Journal;
Close(dt, NoSave);
mallen810
Level III

Re: Closing data table while leaving a chart open

Thanks, I am fairly new to scripting, so where in my query would this go?

ian_jmp
Level X

Re: Closing data table while leaving a chart open

When you create something via JSL (a table, a column, a report or whatever), it's a good habit to make a reference to it so that you can refer to it later. That's what the second line of my code does ('dt'). The third line sends a 'make a variability chart' message to 'dt', and calls the results 'vc'. So the trick is to make a Journal of 'vc' before you close 'dt' (and hence 'vc').

So you just need to make some small changes so your code does the same kind of thing. Also, take a look ion 'Help > Books > Scripting Guide'.

Finally, be aware that there are other, perhaps better ways to do this, depending on what the rest of your code does. 

mallen810
Level III

Re: Closing data table while leaving a chart open

Would this be the same if you are getting the data from an sql database through a query?



ian_jmp
Level X

Re: Closing data table while leaving a chart open

Yes. So long as you have a reference to the JMP table of interest ('dt' above). It doesn't matter how the table was made.