STATA

그래프 합치기

은하수너머 2021. 7. 3. 01:31

 먼저,  각각의 그래프를 그려준다 

 gr  name1   

 gr  name2 

 다음으로 두 그래프를 합쳐준다

gr combine name1 name2 

gr combine name1 name2, ycom   // y 축의 단위를 같게 해주고 싶을 때  

* Combine stored graphs named mygraph1 and mygraph2 into a single figure

 graph combine mygraph1 mygraph2

* Combine graphs mygraph1.gph and mygraph2.gph that have been saved to disk using graph save graph

combine "mygraph1" "mygraph2" Same as above graph combine mygraph1.gph mygraph2.gph Graph matrix with g1 and g2 in the first row and g3 and g4 in the second row graph combine g1 g2 g3 g4 As above, but arrange graphs vertically with g1 and g2 in the first column and g3 and g4 in the second column graph combine g1 g2 g3 g4, colfirst As above, but omit g4 and leave the second cell of the graph matrix empty graph combine g1 g2 g3, holes(2) Combine graphs g1–g6 into a 3 rows by 2 columns graph matrix graph combine g1 g2 g3 g4 g5 g6, rows(3) Same as above graph combine g1 g2 g3 g4 g5 g6, cols(2) As above, but specify that the y axes of the individual subgraphs have the same scale graph combine g1 g2 g3 g4 g5 g6, cols(2) ycommon As above, and specify a common scale for the x axes of the subgraphs graph combine g1 g2 g3 g4 g5 g6, cols(2) ycommon xcommon As above, but rescale text and markers to half (0.5 times) their original size graph combine g1 g2 g3 g4 g5 g6, cols(2) ycommon xcommon iscale(.5) Use the Stata Journal scheme for the common portion of the graph and the subgraphs graph combine g1 g2, scheme(sj) commonscheme Specify that the margin between the subgraphs should be 0 graph combine g1 g2 g3 g4, imargin(0 0 0 0)

 

'STATA' 카테고리의 다른 글

top/bottom coding 방법  (0) 2021.09.22
군집 분석 관련  (0) 2021.09.07
위계적 회귀분석  (0) 2021.08.01
회귀분석_상호작용항_1  (0) 2021.06.16
표 작성 시 유용한 명령어_1  (0) 2021.06.16