<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />Hi all,
I have a quest about changing the scripts of an overlay plot. Say I have a for loop that creates a new plot on each iteration. Each iteration updates a string variable which is the name of the next column to plot.
What syntax do I use to change the column? I copied the script from an overlay plot that I made. Instead of using :Name("0V"), I tried using :AsColumn(xCol), but I had no luck. Any suggestions?
for(k=2, k<=2, k++,
xCol = Column(dtSummary, k);
yCol = Column(dtSummary, k+65);
ov = dtSummary << (Overlay Plot( X( :Name( "0V" ) ), Y( :RP_0V ), Sort X( 0 ), Separate Axes( 1 ) ))
);
This approach will work. Use a table variable and the column(
, ) construct:dt = open("$sample_data\Car Physical Data.jmp");
xcol = "Turning Circle";
ycol = "Weight";
Overlay Plot( X( column(dt, xcol) ), Y( column(dt, ycol) ), Separate Axes( 1 ) );
Re: Overlay Plot ScriptsI changed my code so that it wouldn't have :Name, but still, no luck getting it to work.
for(k=2, k<=2, k++,
xCol = "_"||Char((k-2)*10)||"V";
yCol = Column(dtSummary, k+65);
Overlay Plot( X( :_0V ), Y( :RP_0V ), Sort X( 0 ), Separate Axes( 1 ) )
);