cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Choose Language Hide Translation Bar
yanne
Level II

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

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 2
pmroz
Super User

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

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
Super User

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

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