cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

Discussions

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

Using a script to plot multiple columns

Hi Everyone,

I have a data table with several columns.  The first column in my x-axis, and the rest of the columns are my y-values.  I have done this before, but all the column names were numbers, or didn't have any spaces.  Now they do, and my code is not working.  How can I edit this code to get my plot?

y_cols = dtIdleak << get column names(string,character);

  Remove From(y_cols,1);

  dtIdleak << Overlay Plot(X(:Vd_V),Y(:(Eval(y_cols))),

  Overlay Axis << {{Min( 0.01 ), Max( 100 ), Inc( 1 ), Minor Ticks( 1 )}},

  Connect Points(1),

  SendToReport(

  Dispatch(

  {},

  "102",

  ScaleBox,

  {Scale("Log"),Min( 0.01 ), Max( 1000 ), Inc( 1 ), Minor Ticks( 1 )}

  ),

  Dispatch( {}, "", AxisBox, {Add Axis Label( "Idleak (uA)" )} ),

  Dispatch( {}, "Y", TextEditBox, {Set Text( "Idleak (uA)" )} ),

  Dispatch( {}, "Overlay Plot Graph", FrameBox, {Frame Size( 740, 585 )} )

  )

)

1 ACCEPTED SOLUTION

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

Re: Using a script to plot multiple columns

Ok, the names should not matter if you use <<get column names() ​without the "string" option.

And Change Y(:(Eval(y_cols))) into Y(Eval(y_cols))

View solution in original post

4 REPLIES 4
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Using a script to plot multiple columns

Overlay plot require numeric Y's.

Try <<get column names(numeric);

instead of <<get column names(string,character);

natalie_
Level V

Re: Using a script to plot multiple columns

Unfortunately, that did not work.

The first column (the x values) is labeled "Vd_V", and then the subsequent columns (the y values) have a name like "x= 1 y= 1 Site 1". 

ms
Super User (Alumni) ms
Super User (Alumni)

Re: Using a script to plot multiple columns

Ok, the names should not matter if you use <<get column names() ​without the "string" option.

And Change Y(:(Eval(y_cols))) into Y(Eval(y_cols))

natalie_
Level V

Re: Using a script to plot multiple columns

Thank you so much! 

Recommended Articles