BookmarkSubscribe

Stacking overlay plots

Hi,

I thought I might be able to stack overlay plots into one window in a script like this:

Distribution(
stack( 1 ),
Overlay Plot(
X( :static_clear_rel ),
Y( :MxBmin, :Pred Formula MxBmin ),
Sort X( 0 )
),
Overlay Plot(
X( :static_clear_rel ),
Y( :MxBmax, :Pred Formula MxBmax ),
Sort X( 0 )
),
)

But no window pops up, and I get no warnings/errors. If I change it to the following, I do get 2 separate windows to popup:

//Distribution(
// stack( 1 ),
Overlay Plot(
X( :static_clear_rel ),
Y( :MxBmin, :Pred Formula MxBmin ),
Sort X( 0 )
);
Overlay Plot(
X( :static_clear_rel ),
Y( :MxBmax, :Pred Formula MxBmax ),
Sort X( 0 )
);
//)
0 Kudos
3 REPLIES 3
afterword
Community Trekker

Re: Stacking overlay plots

You may need to enclose the Overlay scripts in a

New Window("Window Name", XXXX)

Replace the XXXX with the scripts you're trying to paste together. You can format the output using horizontal and vertical list boxes (vlistbox and hlistbox).
0 Kudos
chungwei
Staff

Re: Stacking overlay plots

Another way would be to stack your data, then just use one overlay with grouping column.
0 Kudos

Re: Stacking overlay plots

You can use the frame box copy and paste feature to stick the charts together.

new window("my wnd",
c1= Overlay Plot(
X( :static_clear_rel ),
Y( :MxBmin, :Pred Formula MxBmin ),
Sort X( 0 )
);
c2 = Overlay Plot(
X( :static_clear_rel ),
Y( :MxBmax, :Pred Formula MxBmax ),
Sort X( 0 )
);
);

// copy the framebox of the first chart and drop it on the second.
fb1 = (c1<< report())[framebox(1)];
fb1 << copy frame contents();
fb2 = (c2<< report())[framebox(1)];
fb2 << paste frame contents();
// you can now delete the first chart if you want.
c1 << delete();
0 Kudos