News
On June 1, we’re asking you to select a content label when starting a new topic in the Discussions area. Read more to find out why.
Choose Language Hide Translation Bar
Highlighted
Level III

## How to put variable title name in the list of graph?

Hello all,

I am not able to find problem why it is not showing title name according to the variable "a1". Please find my script below.

dt1 = open("F:\pushpendra\jmp\HIPO_RintCalculation.jmp");

dt2 = open("F:\pushpendra\jmp\wafer.jmp");

for(i=1,i<=nrow(dt2),i++,

a1= Eval(column(dt2, 1));

biv=dt1<<Bivariate(

Y( :Site_Value ),

X( :Name( "Length(um)" ) ),

Fit Line( {Line Color( "Red" )} ),

where( :Wafer == a1 ),

);

se2=(biv<<report)<<outlinebox<<Set Title("wafer No=" || a1);

);

4 REPLIES 4
Highlighted
Staff

## Re: How to put variable title name in the list of graph?

There are a few possibilities, and you didn't quote an error message. The code below may give you some idea as to how to fix it:

dt = Open("\$SAMPLE_DATA/Big Class.jmp");

biv = dt << Bivariate(X(:height), Y(:weight));

for(i=1, i<=5, i++,

Report(biv)[OutlineBox(1)] << SetTitle("Wafer "||Char(i));

Wait(1);

);

Highlighted
Super User

## Re: How to put variable title name in the list of graph?

Here's a brute force way using eval(parse()).  Note that I'm setting the outlinebox title directly in the code for the bivariate platform.

dt = Open("\$SAMPLE_DATA/Big Class.jmp");

sex_list = {"F", "M"};

for (i = 1, i <= nitems(sex_list), i++,

one_sex = sex_list[i];

biv_expr = evalinsert("\[

dt << Bivariate(

Y( :height ),

X( :weight ),

Where( :sex == "^one_sex^" ),

SendToReport( Dispatch( {},

"Bivariate Fit of height By weight",

OutlineBox,

{Set Title( "Sex ^one_sex^" )}

)

)

);]\");

eval(parse(biv_expr));

);

Highlighted
Level III

## Re: How to put variable title name in the list of graph?

Thank you PMroz​ for the suggestion.

Highlighted
Level III

## Re: How to put variable title name in the list of graph?

Thank you very much Ian@JMP​. It is working fine now.