cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
Stokes
Level IV

JSL: How to add graph to an existing window

Hi, I am using JSL to plot with graph builder.

Every graph usally created in a seperate window which opens too many window.

I want to put each graph into the same window then close the new created window.

Below are my draft jsl, can anyone help me to make it work?

Thank you.

 

 

WW1 = New Window( "graph1", Graph Builder() );
Window( "graph1" ) << Close Window();

WW2 = New Window( "graph2", Graph Builder() );
Window( "graph2" ) << Close Window();

WW3 = New Window( "graph3", Graph Builder() );
Window( "graph3" ) << Close Window();

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
txnelson
Super User

Re: JSL: How to add graph to an existing window

Take a look at this example.  It creates one window with 20 graphs defined for it, with no additional graphs being created

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );

nw = New Window( "graphs", myvlb = V List Box() );

colNamesList = dt << get column names( continuous, string );

For( i = 1, i <= 20, i++,
	myvlb << append( oneway( x( :site ), y( Column( colNamesList[i] ) ) ) )
);
Jim

View solution in original post

Stokes
Level IV

Re: JSL: How to add graph to an existing window

Thank you for the help.

I will try to put this with my scripts.


@txnelson wrote:

Take a look at this example.  It creates one window with 20 graphs defined for it, with no additional graphs being created

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );

nw = New Window( "graphs", myvlb = V List Box() );

colNamesList = dt << get column names( continuous, string );

For( i = 1, i <= 20, i++,
	myvlb << append( oneway( x( :site ), y( Column( colNamesList[i] ) ) ) )
);

 

View solution in original post

7 REPLIES 7
txnelson
Super User

Re: JSL: How to add graph to an existing window

Here are two ways to have multiple outputs in one window.  There are other ways too

names default to here(1);
dt=open("$SAMPLE_DATA/big class.jmp");

nw=new window("Example 1",
	bivariate(x(:height), y(:weight)),
	oneway(x(:sex),y(:weight))
);

nw2=new window("Example 2");
nw2<<append(bivariate(x(:height), y(:weight)));
nw2<<append(oneway(x(:sex),y(:weight)));
Jim
Craige_Hales
Super User

Re: JSL: How to add graph to an existing window

The journal window might be a solution as well. Send the <<journal command to the windows before you close them. The journal window keeps a tall list of the entries.

Craige
Stokes
Level IV

Re: JSL: How to add graph to an existing window

I used journal before, but journal will freeze the graph, meaning I can not select the the data in the graph anymore, it is more like a picture.

Thank you.


@Craige_Hales wrote:

The journal window might be a solution as well. Send the <<journal command to the windows before you close them. The journal window keeps a tall list of the entries.


 

Stokes
Level IV

Re: JSL: How to add graph to an existing window

Thanks for the solution, for some reason it doesn't work in my script.

Can you help to modify based on my script below?

I am ploting over 200 graph which can only be done with graph builder.

So I hope to add the graph to a same window graph, then close the graph builder window after ploting.

Otherwise, I end up open 200 windows.

WW1 = New Window( "graph1", Graph Builder() );
Window( "graph1" ) << Close Window();

WW2 = New Window( "graph2", Graph Builder() );
Window( "graph2" ) << Close Window();

WW3 = New Window( "graph3", Graph Builder() );
Window( "graph3" ) << Close Window();

 


@txnelson wrote:

Here are two ways to have multiple outputs in one window.  There are other ways too

names default to here(1);
dt=open("$SAMPLE_DATA/big class.jmp");

nw=new window("Example 1",
	bivariate(x(:height), y(:weight)),
	oneway(x(:sex),y(:weight))
);

nw2=new window("Example 2");
nw2<<append(bivariate(x(:height), y(:weight)));
nw2<<append(oneway(x(:sex),y(:weight)));

 

txnelson
Super User

Re: JSL: How to add graph to an existing window

Take a look at this example.  It creates one window with 20 graphs defined for it, with no additional graphs being created

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );

nw = New Window( "graphs", myvlb = V List Box() );

colNamesList = dt << get column names( continuous, string );

For( i = 1, i <= 20, i++,
	myvlb << append( oneway( x( :site ), y( Column( colNamesList[i] ) ) ) )
);
Jim
Stokes
Level IV

Re: JSL: How to add graph to an existing window

Thank you for the help.

I will try to put this with my scripts.


@txnelson wrote:

Take a look at this example.  It creates one window with 20 graphs defined for it, with no additional graphs being created

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );

nw = New Window( "graphs", myvlb = V List Box() );

colNamesList = dt << get column names( continuous, string );

For( i = 1, i <= 20, i++,
	myvlb << append( oneway( x( :site ), y( Column( colNamesList[i] ) ) ) )
);

 

ron_horne
Super User (Alumni)

Re: JSL: How to add graph to an existing window

Hi @Stokes ,

@txnelson and @Craige_Hales gave good examples. another way to do it is to start with just one window. if you have a data table open, try using this script. once you make the graphs you want in that window you can save the script from the plot.

New window ("lots of graphs",
	v list box (
		Graph Builder(),
		Graph Builder(),
		Graph Builder(),
		Graph Builder(),
		Graph Builder(),
		Graph Builder(),
	)
);