multi chart and break page<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />Hello still need some help
I created multi charts using a for loop
problem is I would like to insert a break page after each graph but it doesn't work
here is part of the code (pretty long so I cut it)
my_window = new window (" report", <-- define new window
V list Box(
Text box( "(1) Definition", << set font size(textsize1), justify text(left), << font color({0,0,0.5})),
</CODE></SPAN></P><P></P><P> page break box(), <SPAN style="color: #ff0000;"><-- this break page works</SPAN></P><P> current data table (final_tb);</P><P> For( k = 1, k <= NRow(::cor_data), k++,<SPAN style="color: #ff0000;"> <-- for loop to create multi graph</SPAN></P><P> obj = final_tb << Fit Group(</P><P> Bivariate( <SPAN style="color: #ff0000; font-size: 13.3333px;"><-- graph 1</SPAN></P><P><SPAN style="font-size: 10pt; line-height: 1.5em;"> Y(col_sel_Y<K>),</K></SPAN></P><P> X(col_sel_X<K>),</K></P><P><SPAN style="color: #ff0000; font-size: 13.3333px;"><CODE cut="" graph="">
)
),
Oneway( <-- graph 2
Y(col_sel_Y),
X( :REGION ),
);
obj << Title("Param to inline correlation_"||char(chart_key));
obj << journal; <-- append to journal but actually would like to happen to my_window
page break box() << journal; <-- here is my break page issue ... I cannot figure out how to code it.
)
);
If I create the charts and then paste them into current journal it works but then I see around 20 graphs popping on my screen !!
best regards
Lionel
Re: multi chart and break pageThank you MS.
hmm i didnt think about double append...
i just dont understand why append to vlb and not my_window
vlb << append(vlb2) << append(Page Break Box()); and not my_window << append(vlb2) << append(Page Break Box());
maybe because by construction vlb is already append to my_window?!?
Re: multi chart and break pageSee below for a slight rearrangement of your code. The main difference is that the for-loop is run after New Window() is created. A window must exist before appending boxes to it. Big Class.jmp is used as example table.
final_tb = Open("$SAMPLE_DATA/Big Class.jmp"); //Example table
//Create new window
my_window = New Window(" report", // define new window
vlb = V List Box(Text Box("(1) Definition", <<set font size(15), justify text(left), <<font color({0, 0, 0.5})), Page Break Box())
);
// for loop to create multi graph and append to my_window
For(k = 1, k <= 5, k++,
vlb2 = V List Box(
Text Box("Param to inline correlation_" || Char(k), <<set font size(12), justify text(left), <<font color({0, 0.5, 0.5})),
final_tb << Bivariate( // graph 1
Y(:height),
X(:weight)
),
Oneway( // graph 2
Y(:height),
X(:sex)
)
);
//vlb2 << Title("Param to inline correlation_" || Char(k));
vlb << append(vlb2) << append(Page Break Box()); // append my_window
);