Dear All, Suppose that I compute the following hazard rates (unfortunately I cannot share the real data, but here is an example using generic data). I am using Stata 16.
Code:
This gives me a combined graph. Suppose that the dataset used to get the plot for drug==0 is different than the one for drug ==1, that the datasets used to generate each of these plots are too big to be opened at the same time, and I want to overlay them in a similar way as in https://www.statalist.org/forums/for...combine-graphs.
If these were twoway plots, this should be straightforward, but because I use the sts graph command, the usual add plot command does not work. What I want is to overlay two plots that I previously save as.gph (like the graph combine command but overlaying the plots),
Any input would be appreciated, thanks!
Code:
Code:
use https://www.stata-press.com/data/r17/drug2 stset, noshow global in "yourdirectory" cd "$in" sts graph if drug ==0, hazard qui graph save "plot1.gph",replace sts graph if drug ==1 hazard qui graph save "plot2.gph",replace graph combine "$in/plot1.gph" "$in/plot2.gph"
If these were twoway plots, this should be straightforward, but because I use the sts graph command, the usual add plot command does not work. What I want is to overlay two plots that I previously save as.gph (like the graph combine command but overlaying the plots),
Any input would be appreciated, thanks!
Comment