Re: Scaling y-axis for multiple plots in bivariate fit report outputHi @CircularPuppy35 ,
I think the problem might start with the fact that your report(biv) variable has multiple elements to it. If you look through the code below where I use the Big Class.jmp file and use :sex and :age as BY variables, you can see that the variable rbiv has 12 elements in it, and you need to access the ith element first, with something like rbiv[i]. See the code below. And, if you just loop through however many elements there are in rbiv, it'll change the Y-axis to all be Log.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = Bivariate( Y( :height ), X( :weight ), By( :sex, :age ), Fit Special( yTran( "Log" ) ) );
rbiv = biv << report;
For( i = 1, i <= N Items( rbiv ), i++,
rbiv[i][Outline Box( 1 )][Axis Box( 1 )] << {Scale( "Log" )}
);Hope this helps!,
DS
Scaling y-axis for multiple plots in bivariate fit report outputHello all,
I am creating a bivariate plot via a small script and I need to scale the y-axis to log scale for all the plots in the report. The number of plots can change depending on the dataset. However, with the following script, I am unable to scale the y-axis even for one plot.
Thanks!
biv = Bivariate(
SendToByGroup(Bygroup Default),
Y(:y_value),
X(:x_value),
By(:VAR1, VAR2, VAR3),
Fit Special(yTran("Log"))
);
Report(biv)[AxisBox(1)] << {Scale("Log")};
Automation and ScriptingBasic Data Analysis and ModelingRe: Scaling y-axis for multiple plots in bivariate fit report outputUsing By variable will return a list of objects, so you have to manage that (loop over those elements or send a message to whole list). Below is example which might work when sending a message to the list (I usually use XPath() not Find(), but in this case Find() seemed much simpler)
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
bivs = dt << Bivariate(
SendToByGroup(Bygroup Default),
Y(:Weight),
X(:Height),
By(:age, :sex),
Fit Special(yTran("Log"))
);
show(bivs); // list of bivariates
// You have to either loop over the list or send a message to the list
(bivs << Find(AxisBox(1))) << Scale("Log");
Re: Scaling y-axis for multiple plots in bivariate fit report outputThanks a lot. This worked seamlessly. Appreciate the help!