cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

Discussions

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

Label a column via scripting?

I'm trying to label a column via JSL, but all I can find help for is Code to label specific rows based upon conditions. I've tried a couple approaches but was thinking this would work, but it doesn't...

dt:Column("Day #") << Set labelled; or dt:"Day #" << Set labelled

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Label a column via scripting?

To set the Label property for a column, use the following

dt << set label columns (:Day #)

  Documented in

       Help==>Scripting Index 

Jim

View solution in original post

4 REPLIES 4

Re: Label a column via scripting?

The correct message is Label. The opposite effect uses the Unlabel message. Send the message to the data column, not the data table.

Turbo2020
Level I

Re: Label a column via scripting?

Hi Mark,

This should be straight forward, but somehow I'm not able to get the Unlabel to work.

Can you please help enlighten me?

 

dt = Current Data Table();

//Works fine to Label
:name("ID") << Label;
:name("ID") << Set Labelled;
dt << Set Label Columns( :ID );

//Doesn't work to Label
:name("ID") << Set Label;

//Doesn't work to use Unlabel
:name("ID") << Unlabel;
:name("ID") << Set Unlabel;
:name("ID") << Set Unlabelled;
dt << Set Unlabel Columns( :ID );

Thanks!

 

txnelson
Super User

Re: Label a column via scripting?

names default to here(1);
dt = Open("$SAMPLE_DATA/big class.jmp");
:name << label(1);

wait(5);

:name << label(0);

Look in the Scripting Index for syntax for items like this. 

Jim
txnelson
Super User

Re: Label a column via scripting?

To set the Label property for a column, use the following

dt << set label columns (:Day #)

  Documented in

       Help==>Scripting Index 

Jim

Recommended Articles