- Often Graph Builder can do the pivoting, no need to do it manually.
- as Jarmo suggested, "stack" the values and use "Label" to wrap the plots.
- if you need different axis scales for the individual plots, "Wrap" will not work.
-> Upgrade to JMP18 and use "Page" instead of "Wrap"
dt = Open( "$SAMPLE_DATA/Water Treatment.jmp" );
dtstacked = dt << Stack(
columns(
:"Q-E"n, :"ZN-E"n, :"PH-E"n, :"DBO-E"n, :"DQO-E"n, :"SS-E"n, :"SSV-E"n,
:"SED-E"n, :"COND-E"n
),
"Non-stacked columns"n( Keep( :Date ) )
);
dtstacked << Graph Builder(
Transform Column(
"Month[Date]",
Format( "Format Pattern", "<MM></><YYYY>", 15 ),
Formula( Date Increment( :Date, "Month", 0 ) )
),
Link Page Axes( "X Only" ),
Replicate Linked Page Axes( 0 ),
Variables(
X( :"Month[Date]"n ),
Y( :Data ),
Page( :Label, Levels per Row( 3 ), Show Title( 0 ) )
),
Elements(
Points( X, Y, Summary Statistic( "Mean" ) ),
Smoother( X, Y )
)
);