cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
Get the free JMP Student Edition for qualified students and instructors at degree granting institutions.
Choose Language Hide Translation Bar
View Original Published Thread

Multiple custom bivariate charts

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" ),

                                                )  },

                                     ) ) );

                           );

  ););

1 ACCEPTED SOLUTION

Accepted Solutions
ms
Super User (Alumni) ms
Super User (Alumni)


Re: Multiple custom bivariate charts

Y() and X() need evaluated arguments.Try this:

Bivariate(...,

Y( eval(Yaxis) ),

X( eval(Xaxis) ),

...);

View solution in original post

2 REPLIES 2
ms
Super User (Alumni) ms
Super User (Alumni)


Re: Multiple custom bivariate charts

Y() and X() need evaluated arguments.Try this:

Bivariate(...,

Y( eval(Yaxis) ),

X( eval(Xaxis) ),

...);


Re: Multiple custom bivariate charts

Thanks MS!