cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar

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!

Recommended Articles