Hi
I don't know if anyone else has had this issue, but I found that the 'saving( )' option in the twoway command seems to work differently (and not as well) to the graph export command. I'm using Stata/MP 14.2 on a Mac.
Below are two examples of using these two alternative ways of saving a series of two-way graphs for a set of variables. Using the 'saving( )' option in the twoway command, Preview could not open the files when the .png or .tif extensions were used. This was a problem with the file format. However, when the graph export command was used, Preview could open the graph file.
Example 1:
foreach i of local continvars {
twoway (scatter monthchg `i') (lfit monthchg `i') if (monthchg < .), ///
legend(order(1 "Observed" 2 "Fitted")) scheme(s1mono) ///
saving(graph_monthchg_`i'.png, replace)
}
Example 2:
foreach i of local continvars {
twoway (scatter monthchg `i') (lfit monthchg `i') if (monthchg < .), ///
legend(order(1 "Observed" 2 "Fitted")) scheme(s1mono)
graph export graph_monthchg_`i'.png, replace
}
I don't know if anyone else has had this issue, but I found that the 'saving( )' option in the twoway command seems to work differently (and not as well) to the graph export command. I'm using Stata/MP 14.2 on a Mac.
Below are two examples of using these two alternative ways of saving a series of two-way graphs for a set of variables. Using the 'saving( )' option in the twoway command, Preview could not open the files when the .png or .tif extensions were used. This was a problem with the file format. However, when the graph export command was used, Preview could open the graph file.
Example 1:
foreach i of local continvars {
twoway (scatter monthchg `i') (lfit monthchg `i') if (monthchg < .), ///
legend(order(1 "Observed" 2 "Fitted")) scheme(s1mono) ///
saving(graph_monthchg_`i'.png, replace)
}
Example 2:
foreach i of local continvars {
twoway (scatter monthchg `i') (lfit monthchg `i') if (monthchg < .), ///
legend(order(1 "Observed" 2 "Fitted")) scheme(s1mono)
graph export graph_monthchg_`i'.png, replace
}
Comment