Subscribe Bookmark RSS Feed

Make Bivariate Invisible for Performance

senatorx

Community Trekker

Joined:

Jun 12, 2012

Hi,

I've found that I can boost performance by hiding data tables and subsets like so:

Main_dt = Open(Main_Source, Invisible);

Subset_dt = Current Data Table() << Subset(Selection(), invisible);

However, I can't figure out how to hide the display of a Bivariate plot.  I am using the function below.  How would I modify this to prevent display on screen? (JMP9)

Trend_biv = Function( {xval, yval, P_legend},

      {Default Local},

      ::T_biv = Bivariate(

            Y( Column( yval ) ),

            X( Column( xval ) ),

            SendToReport(

                  Dispatch( {}, "1", ScaleBox, {Rotated Labels( 1 )} ),

                  Dispatch(

                        {},

                        "Bivar Plot",

                        FrameBox,

                        {Frame Size( 400, 300 ), Marker Size( 4 ), Row Legend(

                              Column( P_legend ),

                              Color( 1 ),

                              Color Theme( "JMP Default" ),

                              Marker( 1 ),

                              Marker Theme( "Standard" ),

                              Continuous Scale( 0 ),

                              Reverse Scale( 0 ),

                              Excluded Rows( 0 )

                        )}

                  )

            )

      );

);

I call the function like so:

Trend_biv(xparam, yparam, chartLegend);

Thanks in advance if anyone knows how to do this.

2 REPLIES
ms

Super User

Joined:

Jun 23, 2011

Use the invisible argument inside the platform call. Try this:

Trend_biv = Function( {xval, yval, P_legend},

      {Default Local},

      ::T_biv = Bivariate(

            Y( Column( yval ) ),

            X( Column( xval ) ),

            SendToReport(

                  Dispatch( {}, "1", ScaleBox, {Rotated Labels( 1 )} ),

                  Dispatch(

                        {},

                        "Bivar Plot",

                        FrameBox,

                        {Frame Size( 400, 300 ), Marker Size( 4 ), Row Legend(

                              Column( P_legend ),

                              Color( 1 ),

                              Color Theme( "JMP Default" ),

                              Marker( 1 ),

                              Marker Theme( "Standard" ),

                              Continuous Scale( 0 ),

                              Reverse Scale( 0 ),

                              Excluded Rows( 0 )

                        )}

                  )

            ), invisible // argument placed inside Bivariate()

      );

);

Trend_biv(xparam, yparam, chartLegend);

// just to prove that window exists

wait(5); T_biv<<show window(1);

gzm

Community Trekker

Joined:

Jun 23, 2011

/*
Simply add the Invisible option to the Bivariate platform call.  See the extension of your example code below.

A couple items to note:
- Using JSL, you can take advantage of Where() commands in most platforms, so that a separate subset table is not required.
- If making many edits to a visible table, dt << Begin Data Update and dt << End Data Update commands can enhance performance as well.
*/

Main_Source = "$sample_data\big class.jmp";
Main_dt = Open(Main_Source, Invisible);

Subset_dt = Current Data Table() << Subset(Sampling Rate( 0.75 ), Stratify(:sex), invisible);

Trend_biv = Function( {xval, yval, P_legend},

      {Default Local},

      ::T_biv = Bivariate(

            Y( Column( yval ) ),

            X( Column( xval ) ), Invisible,

            SendToReport(

                  Dispatch( {}, "1", ScaleBox, {Rotated Labels( 1 )} ),

                  Dispatch(

                        {},

                        "Bivar Plot",

                        FrameBox,

                        {Frame Size( 400, 300 ), Marker Size( 4 ), Row Legend(

                              Column( P_legend ),

                              Color( 1 ),

                              Color Theme( "JMP Default" ),

                              Marker( 1 ),

                              Marker Theme( "Standard" ),

                              Continuous Scale( 0 ),

                              Reverse Scale( 0 ),

                              Excluded Rows( 0 )

                        )}

                  )

            )

      );

);

Trend_biv("height", "weight", "sex");

(::T_biv << report) << Save Journal("c:\temp\testit.jrn");

//invisible objects (tables and reports) need to be closed to save memory resources