Hi Amanda,
Thank you for your help. I tried the graph edits as you recommended, it's much simple and short. But I still have a problem for combining three graphs together. When I tried to combie three graphs together using graph combine , it only duplicated the last one three times in the combined graph.
Here are my codes:
/*Figure*/
clear
use data/mannitol_data.dta
label variable t0_na "T0 Na"
label variable t1_na "T1 Na"
label variable t2_na "T2 Na"
label variable t3_na "T3 Na"
label variable t4_na "T4 Na"
label variable t5_na "T5 Na"
label variable t0_k "T0 K"
label variable t1_k "T1 K"
label variable t2_k "T2 K"
label variable t3_k "T3 K"
label variable t4_k "T4 K"
label variable t5_k "T5 K"
label variable t0_glu "T0 Glu"
label variable t1_glu "T1 Glu"
label variable t2_glu "T2 Glu"
label variable t3_glu "T3 Glu"
label variable t4_glu "T4 Glu"
label variable t5_glu "T5 Glu" //label variables for figure
net install profileplot.pkg, from(https://stats.idre.ucla.edu/stat/stata/ado/analysis)
/*figure syntax*/
********** Plasm Na+ concentration at different timepoint *********************
tabstat t0_na-t5_na, by(group) stat(n mean sd var)
profileplot t0_na-t5_na, by(group) ///
ytitle("Plasma sodium concentration(mean)") ///
xtitle("Timepoint") ///
xlabel(1 "T0" 2 "T1" 3 "T2" 4 "T3" 5 "T4" 6 "T5") ///
name("nagraph") ///
graph save nagraph ///
//named for use with graph combine later, but could also save to disk if preferred
********** Plasm K+ concentration at different timepoint *********************
tabstat t0_k-t5_k, by(group) stat(n mean sd var)
profileplot t0_k- t5_k, by(group) ///
ytitle("Plasma potassium concentration(mean)") ///
xtitle("Timepoint") ///
xlabel(1 "T0" 2 "T1" 3 "T2" 4 "T3" 5 "T4" 6 "T5") ///
graph save kgraph ///
name("kgraph") //named for use with graph combine later, but could also save to disk if preferred
// <end>
********** Plasm Glu concentration at different timepoint *********************
tabstat t0_glu-t5_glu, by(group) stat(n mean sd var)
profileplot t0_glu-t5_glu, by(group) ///
ytitle("Plasma glucose concentration(mean)") ///
xtitle("Timepoint") ///
xlabel(1 "T0" 2 "T1" 3 "T2" 4 "T3" 5 "T4" 6 "T5") ///
name("glugraph") //named for use with graph combine later, but could also save to disk if preferred
// <end>
graph save nagraph
graph save kgraph
graph save glugraph
graph combine nagraph.gph kgraph.gph glugraph.gph, ///
rows(1) cols(3) ///
title("Mean sodium, potassium, and glucose concentrations") ///
xsize(10) ysize(4)
graph export "combined.png", replace
And this is how it combined three graphs:

Thank you for your help.
Shu