Hi,
I am writing a script to plot multiple custom bivariate charts (for each group). I have created the column dialog to choose the respective columns. However, it seems there is any error stating "Bad Argument( {Xaxis, Role requires at least 1 columns., Yaxis, Role requires at least 1 columns.}". Pls advise.
ColDlg = Column Dialog(
Yaxis = ColList( "Y-axis", MaxCol( 1 ), Datatype( Numeric ) ),
Xaxis = ColList( "X-axis", MaxCol( 1 ), Datatype( Numeric ) ),
Bycol = ColList( "Group by", MaxCol( 1 ), Datatype( Character ) ),
);
If( ColDlg["button"] == 1,
Yaxis = Column( Current Data Table(), Coldlg["Yaxis"] );
Xaxis = Column( Current Data Table(), Coldlg["Xaxis"] );
Bycol = Column( Current Data Table(), Coldlg["Bycol"] );
summarize(Uni_Bycol = by(Bycol));
show(Uni_Bycol);
Bivariate(
SendToByGroup( {Bycol == Uni_Bycol[1]} ),
Y( Yaxis ),
X( Xaxis ),
By( Bycol ),
For (j = 1, j < N Items(Uni_Bycol), j++,
SendToByGroup(
{Bycol == Uni_Bycol},
SendToReport(
Dispatch(
{},
{"Chart Ouputt by ("|| By || ")"},
"Bivar Plot",
FrameBox, {Frame Size( 436, 397 ),
Add Graphics Script(
2,
Description( "Boundary" ),
Line(
{0.2084, 0.47202},
{0.2045, 0.46438},
{0.1936, 0.47665},
{0.1985, 0.48484},
{0.2084, 0.47202}
);
Line(
{0.2084, 0.47202},
{0.2173, 0.46061},
{0.2139, 0.45368},
{0.2045, 0.46438},
{0.2084, 0.47202}
);
),
Grid Line Order( 1 ), Reference Line Order( 3 ),
Row Legend(
Bycol,
Color( 1 ),
Color Theme( "JMP Light" ),
) },
) ) );
);
););