Subscribe Bookmark RSS Feed

Automatically include the value of a variable in a title?

mfisher

Community Trekker

Joined:

Jun 23, 2011

In JSL, how can I automatically include the value of a column in a graph title? For example, if my data query only returns data for species_name ="Blue Crab", how can I automatically incorporate species_name into my graph title? In SAS, I would use a macro variable. How can JMP do this?
2 REPLIES
thechadd

Community Trekker

Joined:

Jun 23, 2011

I haven't messed around with titles, but I have used the parse function to make expressions from variables. Parse() is on JMP Scripting Guide p.428. It converts strings into expressions. So you can have a string consisting of the command to name the table, but you have your variable concatenated in there (e.g. "string" || variablename). Encapsulate that string into the parse() function. Give that a shot.

Clear as mud?
wmwinn

Community Trekker

Joined:

Jun 23, 2011

Option1: Most graphs use the SET TITLE() command. Create a string variable and concatenate that into the Set Title() command.

Option2: Use the By variable. A graph will be created for each distinct species_name, including it in the Title.

hope that helps.