## How to change X axis values (a numeric column) by another column (text)?

Hi, I have the following 3 columns:

Col_1 Col_2 Col_3
00Qtr1 1 1.4
00Qtr2 2 1.5
00Qtr3 3 1.46
00Qtr4 4 1.6
01Qtr1 5 1.54
01Qtr2 6 1.58
01Qtr3 7 1.69
01Qtr4 8 1.6
02Qtr1 9 1.62
... .... ...
08Qtr4 28 2.48
I have tried Fit Y(Col_3) by X(Col_2), because both are numeric data type, for linear regression.
In the picture box or plot, I want to repley X axis values {1, 2, 3, 4, ....} by
the values of Col_1, i.e. {00Qtr1, 00Qtr2, 00Qtr3, ...}

So how to revise the following JSL code to do that?

Thanks,
Fred

-----------------------------------------------------------------------------------------------
biv = Bivariate(
Y( : Col_3 ),
X( : Col_2 ),
Fit Line( {Line Color( "Red" )} ),
SendToReport(
Dispatch(
{},
"1",
ScaleBox,
{Scale( Linear ), Format( "Best" ), Min( 1 ), Max( 28 ),
Inc( 4 )}
),
Dispatch(
{},
"2",
ScaleBox,
{Scale( Linear ), Format( "Numeric" ), Min( 0 ),
Max( 2.5 ), Inc( .5 )}
),
Dispatch( {}, "Bivar Plot", FrameBox, Marker Size( 2 ) )
)
);

Staff

Joined:

Jun 23, 2011

I think only Scatterplot Matrix and Graph Builder can treat a nominal column like a numeric one. They interpret the nominal levels as 0..n-1 which is important if you combine them with other elements.

For instance, if you want to show a fitted regression, you could
1) change Col_2 to contain 0..27
2) use one of the above platforms to plot Col_3 vs Col_1
3) use bivariate to fit Col_3 vs Col_2
4) toggle the bivariate Show Points option so only the line is present
5) right-click in the bivariate plot and choose Edit > Copy Frame Contents
6) right-click in the other plot and choose Edit > Paste Frame Contents