Label X-axis in fit y by x platform with different columnHello,
Is there any easy way to change the x-axis label with a different column in the fit y by x platform?
Thanks!
Basic Data Analysis and ModelingData Blending and CleanupData Exploration and VisualizationRe: Label X-axis in fit y by x platform with different columnHere is a simple example that draws the graph and then resets the X label to the name of the 2nd column in the data table.
names default to here(1);
dt=open("$SAMPLE_DATA/big class.jmp");
Graph Builder(
Size( 528, 456 ),
Show Control Panel( 0 ),
Variables( X( :weight ), Y( :height ) ),
Elements( Points( X, Y, Legend( 6 ) ), Smoother( X, Y, Legend( 7 ) ) )
);
current report()[texteditbox(3)]<<SET text=""></SET>

Re: Label X-axis in fit y by x platform with different columnThanks! I should have made my post more clear.
I am trying to change the entire x-axis label and x values in the fit y by x platform with a different column. Since fitting a regression line requires both numeric/continuous variables, I cannot use Run ID as the x variable as it contains characters, so I was wondering if it is possible to replace the x-axis label/values with a character column after the regression is fit.
Example of data: Run (numeric run number), Run ID (character), regression fit output is what I have using the two numeric columns, but I would like the x-axis to be like the x-axis from the graph builder using Run ID (character).
Thanks for the help!



Re: Label X-axis in fit y by x platform with different columnI think you want to use Value Labels. You probably don't want to code them each individually, so....
This is ugly, and I don't like using "Eval( Parse(....) )", but it works.
Names Default to Here( 1 );
labs = {};
For Each Row( Insert Into( labs, Char( :Run ) || " = \!"" || :Run ID || "\!"" ) );
Eval( Parse( ":Run << Add Column Properties(
Value Labels( {" || Concat Items( labs, ", " ) || "} ),
Use Value Labels( 1 )
)") )