Thanks for your comments. I also saved all graphs generated by loop and
selected graphs for combining with the commands of `graph use' and
`graph store' by loop. But, sometimes, I press a button for maximizing
the window size without a caution. This freezing problem occurs even
when pressing 'graph edit'. My STATA 11 is 64-bit MP version on Windows
Vista. I allocate 20g for memory partly because my data size is huge and
partly because the installed memory is 32g. I also simulated a simple
case. I found that it may depend on the number of graphs, the allocated
memory size and the option of graphic window. Actually, it does not
matter with the capacity of processing graphs in STATA. I sometimes hope
to save the codes even when encountering this freezing. Thanks again,
and I will communicate with STATA.com later.
If anyone is wondering this problem, try it.
* open stata --> edit --> preferences --> graph preferences --> check
"Create multiple graphs as tabs in a single window"
clear all
set more off
set mem 10g /* <- change as
you have */
set graphics on
set obs 2000
gen x = runiform()
gen y = rnormal()
local in = 40 /* <- change
as you want */
forvalues i=1(1)`in'{
twoway(scatter x y)(line y x), name(toy`i')
}