Choose Language Hide Translation Bar
Highlighted
adam
Level IV

Multiple input for Graph Builder

Hi All,

 

I am working on a script that will allow me to select more than one Y response(and X factor as well)  and using Graph builder, I will be able to plot it accordingly. I am able to select the relevant Y and X but somehow the Graph builder part is not working. Here is the script:

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dlg = Column Dialog(
	ColID = Col List( "X, Factor", Max Col( 1 ) ),
         SS  = Col List( "Y, Response" ),
); Graph Builder( Variables( X( Column(dt,ColID ), Y( Column(dt, SS ) ), Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) ) )), );

Please let me know which part of the script went wrong.

 

Thank you.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
txnelson
Super User

Re: Multiple input for Graph Builder

The values returned from the Column Dialog are not in a scaler format.  They are returned in a list.  In your example, the list is named dlg.

Look in the JMP Scripting Guide for details

     Help==>Books==>Scripting Guide

Jim

View solution in original post

Highlighted
ms
Super User ms
Super User

Re: Multiple input for Graph Builder

Jim is right. For the assignments of ColID and SS to be effective, the list dlg must be evaluated first. Also, there seems to some misplaced parantheses in the code.

 

Try this:


dt = Open("$SAMPLE_DATA/Big Class.jmp");
dlg = Column Dialog(
    ColID = Col List("X, Factor", Max Col(1)),
    SS = Col List("Y, Response", Max Col(1))
);
Eval List(dlg[1 :: 2]);
Graph Builder(
    Variables(X(Column(dt, ColID)), Y(Column(dt, SS))),
    Elements(Points(X, Y, Legend(3)), Smoother(X, Y, Legend(4)))
);

View solution in original post

3 REPLIES 3
Highlighted
txnelson
Super User

Re: Multiple input for Graph Builder

The values returned from the Column Dialog are not in a scaler format.  They are returned in a list.  In your example, the list is named dlg.

Look in the JMP Scripting Guide for details

     Help==>Books==>Scripting Guide

Jim

View solution in original post

Highlighted
ms
Super User ms
Super User

Re: Multiple input for Graph Builder

Jim is right. For the assignments of ColID and SS to be effective, the list dlg must be evaluated first. Also, there seems to some misplaced parantheses in the code.

 

Try this:


dt = Open("$SAMPLE_DATA/Big Class.jmp");
dlg = Column Dialog(
    ColID = Col List("X, Factor", Max Col(1)),
    SS = Col List("Y, Response", Max Col(1))
);
Eval List(dlg[1 :: 2]);
Graph Builder(
    Variables(X(Column(dt, ColID)), Y(Column(dt, SS))),
    Elements(Points(X, Y, Legend(3)), Smoother(X, Y, Legend(4)))
);

View solution in original post

Highlighted
adam
Level IV

Re: Multiple input for Graph Builder

Thank you Jim and MS.
Article Labels

    There are no labels assigned to this post.