Subscribe Bookmark RSS Feed

How to export graph to for example EPS without the display box "graph builder" (using JSL) ?

yanne

Community Trekker

Joined:

Sep 22, 2015

Dear all,

I wrote a script which results in a lot of graphs and reports. I would like to incorporate in my script a way to export some of the graphs (made with Graph Builder) to EPS, JPEG, ... format. I found a way how to do so in the scripting guide (see below) but would like to get rid of the display box on top of teh report --> in my case that is "Graph Builder", in the case of the scripting guide example it is "Bivariate Fit of weight By height". I do not want to change this text to anything else, but get rid of it.  Any tips?

Thanks!!

As taken from the scripting guide:

Names Default To Here( 1 );

//This message applies to all display box objects

Open( "Big Class.jmp" );

biv = bivariate( y( :weight ), x( :height ) );

rbiv = biv << report;

rbiv << Save Picture( "example.png", "png" );

2 REPLIES
pmroz

Super User

Joined:

Jun 23, 2011

Here's one way to do it.  Note that you lose the red triangle.

dt = open("$sample_data\Big Class.jmp");

dt << Graph Builder(

      Show Control Panel( 0 ),

      Variables( X( :weight ), Y( :height ), Overlay( :age ) ),

      Elements( Points( X, Y, Legend( 1 ), Jitter( 1 ) ) ),

      SendToReport(

            Dispatch( {}, "Graph Builder", OutlineBox, {Set Title( "" )} )

      )

);

Craige_Hales

Staff

Joined:

Mar 21, 2013

Another way:

dt=open("$sample_data/big class.jmp");

gb=dt<<Graph Builder(

  Size( 516, 446 ),

  Show Control Panel( 0 ),

  Variables( X( :weight ), Y( :height ) ),

  Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) )

);

gb<<showtreestructure; // use this to discover the box you need

report(gb)[picturebox(1)]<<savepicture("$temp/gb.png","png");

open("$temp/gb.png");

11110_pastedImage_2.png

Craige