cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP 19 is here! See the new features at jmp.com/new.
  • Due to global connectivity issues impacting AWS Services, users may experience unexpected errors while attempting to authorize JMP. Please try again later or contact support@jmp.com to be notified once all issues are resolved.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
GgGgGg2024
Level II

Column switcher and Graph Builder

Hi,

 

I have a number of columns which I have grouped together.

In the graph builder I have the X axis constant, but the Y axis should have the column switcher function where we can chose which parameter we want to switch between from the said group of columns.

 

First I tell JSL what columns should be in the group and which column should be my first column

colList = dttable << get column names( continuous );
	col1 = colList[1];

This is the code and the error I am getting,

 

Graph Builder(
	Size( 570, 621 ),
	Show Control Panel( 0 ),
	Show Legend( 0 ),
	Variables( X( :batch_no ), Y( :col1 ) /*###*/ ),
	Elements( Points( X, Y, Legend( 8 ) ) ),
	Column Switcher( :col1, {:colList} )
)

 

Can you tell me what I should write for the Y variable so I can get the first column to start with and then add the column switcher.

 

Thanks in advance

12 REPLIES 12
hogi
Level XIII

Re: Column switcher and Graph Builder

great conversation : ) 
magnifier glass on the nuts and bolts of JSL ...

 

I just wondered about the difference between Variable() and Column Switcher() in 

Variables( ... Y( as column(col1) ) ),
Column Switcher( col1, colList )

 

This one works as well:

Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
cols = dt << get column names( continuous );

col1= cols[1];
gb = dt << Graph Builder(
	Size( 437, 413 ),
	Graph Spacing( 4 ),
	Variables( X(col1 ), ),
	Elements( bar( X ), ),
	Column Switcher( col1, cols )
);


as well as this one:


Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" );
cols = dt << get column names( continuous, "String" );

col1= cols[1];
gb = dt << Graph Builder(
	Size( 437, 413 ),
	Graph Spacing( 4 ),
	Variables( X(Column(col1) ), ),
	Elements( bar( X ), ),
	Column Switcher( col1, cols )
);


what doesn't work:

Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" );
cols = dt << get column names( continuous, "String" );

col1= cols[1];
gb = dt << Graph Builder(
	Size( 437, 413 ),
	Graph Spacing( 4 ),
	Variables( X(col1 ), ),
	Elements( bar( X ), ),
	Column Switcher( col1, cols )
);

so, Column Switcher() is fine with a String,

Variables() needs a name - or  a column (created via As Column() or column())

Ressel
Level VII

Re: Column switcher and Graph Builder

@hogi is the meaning of your results that it is not an environment or name space issue, but something different?

hogi
Level XIII

Re: Column switcher and Graph Builder

No, the issue with the table scripts is a namespace issue, as @txnelson explained.

String vs. name vs. Column is just something else one can learn about.

Recommended Articles