I'm trying to write a simple script that loops over columns and iteratively uses each column as the Y values in a plot. I think I've got the for loop down but I can't get the Y axis set to a log scale. The code runs but each graph that is generated is on a linear scale with a range that is specific for each column. I'd like each graph to be on a log scale (either with a specifically set min/max or an automatically generated range based on the data).
cd = Current Data Table();
column_names = cd << Get Column Names;
For ( i = 256, i <= 258, i++,
Graph Builder(
Size( 625, 660 ),
Variables(
X( :Day ),
Y( Column( cd, column_names[i] ) ),
Overlay( :Dose ),
),
Elements( Line( X, Y, Legend( 6 ) , Error Bars ("Standard Deviation") ) ),
SendToReport(
Dispatch(
{},
"Data Abs. Counts T CD56br" ,
ScaleBox,
{Scale( "Log" ), Format( "Best", 12), Min( 0.002 ), Max( 16000 ),
Inc( 1 ), Minor Ticks( 1 ), Label Row( Show Minor Labels( 0 ) )}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
6,
Properties( 0, {Line Width( 2 )} ),
Properties( 1, {Line Width( 2 )} ),
Properties( 2, {Line Width( 2 )} ),
Properties( 3, {Line Width( 2 )} ),
Properties( 4, {Line Width( 2 )} )
)}
),
Dispatch(
{},
"Y title",
TextEditBox,
{Set Text( Column(cd, column_names[i]))}
)
)
))
I have read https://community.jmp.com/t5/Discussions/Scripting-Y-Axis-to-be-Log-scale/m-p/54573#M30852 and am still stuck. I tried including ScaleBox(1) or ScaleBox(2) but couldn't even get the first or second graphs to be on a log scale. I am also trying the xPath solution but additional help would be great.
Thanks so much!!
Bonus question:
SendToReport(
Dispatch(
{},
"Data Abs. Counts T CD56br" ,
What is the "Data Abs. Counts T CD56br" refering to here? That's one of my column names (but not ALL of the column names!) that got copied/pasted and kept. It seems to be running the way it should (aside from the scale thing) and changing it to other values (ie. "data") doesn't seem to break anything. What is this?