2014-07-22 2 views
0

Stata에서 그래픽이 표시됩니다. 나는 현재 gr_edit 명령을 사용하여 그래프 편집기에서 내가 변경 한 코드를 가지고있다. 이 같은 것은 :Stata - gr_edit을 name()과 함께 사용하십시오.

histogram Car, frequency 
gr_edit .plotregion1.plot1.style.editstyle area(shadestyle(color(navy))) editcopy 
gr_edit .plotregion1.plot1.style.editstyle area(linestyle(color(navy))) editcopy 
gr_edit .plotregion1.plot1._set_type rbarm 

graph export ... 

이 히스토그램에 다른 히스토그램이 필요합니다. 이렇게하기 위해, 저는 어떻게 든 두 가지를 모두 메모리에 저장하려고합니다. 이 작업을 수행 한 방법은 초기 그래프 호출 후에 name() 옵션을 포함시키는 것입니다. 그러나 나는 이것을 수행하면 gr_edit 물건 전부가 존재하지 않을 것이라고 생각합니다. 메모리에 그래프를 저장하기 위해 독립 실행 형 함수 (그리고 옵션이 아닌)로 name() 함수 (또는 이와 비슷한 함수)를 사용할 수 있습니까? 실제로 gr_edit 라인이 필요

답변

3

Assumning이 작동 :

sysuse sp500, clear 

* first graph 
histogram volume, frequency saving(first) 

* second graph 
histogram volume, frequency 

gr_edit .plotregion1.plot1.style.editstyle area(shadestyle(color(navy))) editcopy 
gr_edit .plotregion1.plot1.style.editstyle area(linestyle(color(navy))) editcopy 
gr_edit .plotregion1.plot1._set_type rbarm 

graph save second 

* combined 
graph combine first.gph second.gph 

* erase original files 
rm first.gph 
rm second.gph 

help tempfile를 참조하십시오.

+0

감사합니다. 그것은 어떻게 든 저장하고 삭제하기 위하여 나의 마음을 교차하지 않았다. – bill999

관련 문제