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
bernie426
Level II

JSL: Combined graphs from multiple data table and combined into a single window

If I have graphs from multiple data table and like to combined those graph into a single window for a report, how can this work out using a script. I tried a simple script below using jmp provided tables, but the script does not work out from me. Can anyone help?

Thanks!

Here is my script,

Names Default To Here( 1 );

New Window( "Combined graphs",

  V Sheet Box(

  <<Hold(Open( "$SAMPLE_DATA/Big Class.jmp" ),

       Bivariate(

                      Y( :weight ),

                      X( :height ),Fit Line()

                      )

                     ),

  <<Hold(Open( "$SAMPLE_DATA/Big Class.jmp" ),Treemap( Categories( :age ) ) ),

  <<Hold(Open( "$SAMPLE_DATA/Big Class.jmp" ),

       Bubble Plot(

                      X( :height ),

                      Y( :weight ),

                      Sizes( :age ),

                      Coloring( :sex ),

                      Circle Size( 6.226 ),

                      All Labels( 0 )

                      )

                      ),

  <<Hold(Open("$SAMPLE_DATA/Diabetes.jmp"),

  Distribution( Continuous Distribution( Column( :BMI ) ) );

  ),

  H Sheet Box(

  Sheet Part(

  "weight by height",

  Excerpt Box(

  1,

  {Picture Box( 1 )}

  )

  ),

  Sheet Part(

  "",

  Excerpt Box(

  3,

  {Picture Box( 1 )}

  )

  )

  ),

  H Sheet Box(

  Sheet Part(

  "height by weight",

  Excerpt Box(

  4,

  {Picture Box( 1 )}

  )

  ),

  Sheet Part(

  "BMI Distribution",

  Excerpt Box(

  4,

  {Picture Box( 1 )}

  )

  )

  )

  )

);

1 ACCEPTED SOLUTION

Accepted Solutions
pmroz
Super User

Re: JSL: Combined graphs from multiple data table and combined into a single window

Maybe something like this?

Names Default To Here( 1 );

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

bv = expr(dt << Bivariate( Y( :weight ), X( :height ), Fit Line() ));

tm = expr(dt << Treemap( Categories( :age ) ));

bp = expr(dt << Bubble Plot( X( :height ), Y( :weight ), Sizes( :age ), Coloring( :sex ), Circle Size( 6.226 ),

                        All Labels( 0 )));

dtd = Open( "$SAMPLE_DATA/Diabetes.jmp" );

dist = expr(dtd << Distribution( Continuous Distribution( Column( :BMI ) ) ));

New Window( "Combined graphs",

      lineup box(ncol(2), bv, tm, bp, dist);

);

View solution in original post

3 REPLIES 3
ian_jmp
Level X

Re: JSL: Combined graphs from multiple data table and combined into a single window

Something like this, perhaps? Else use 'Window > Combine Windows' and make an Application.

NamesDefaultToHere(1);

dt1 = Open("$SAMPLE_DATA/Big Class.jmp");

g1 = Expr(dt1 << Bivariate( Y( :height ), X( :weight ) ));

dt2 = Open("$SAMPLE_DATA/Bands Data.jmp");

g2 =  Expr(dt2 << Distribution( Nominal Distribution( Column( :Name( "Banding?" ) ) ) ));

win = NewWindow("Reports from Two Tables", HListBox(g1, g2));


pmroz
Super User

Re: JSL: Combined graphs from multiple data table and combined into a single window

Maybe something like this?

Names Default To Here( 1 );

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

bv = expr(dt << Bivariate( Y( :weight ), X( :height ), Fit Line() ));

tm = expr(dt << Treemap( Categories( :age ) ));

bp = expr(dt << Bubble Plot( X( :height ), Y( :weight ), Sizes( :age ), Coloring( :sex ), Circle Size( 6.226 ),

                        All Labels( 0 )));

dtd = Open( "$SAMPLE_DATA/Diabetes.jmp" );

dist = expr(dtd << Distribution( Continuous Distribution( Column( :BMI ) ) ));

New Window( "Combined graphs",

      lineup box(ncol(2), bv, tm, bp, dist);

);

gutloja
Level III

Re: JSL: Combined graphs from multiple data table and combined into a single window

I was wondering about this myself the other day. Thanks for sharing!

-JoseL