Memory Stata-使用gr_edit with name()
我正在斯塔塔学习图形。我目前一直在使用Memory Stata-使用gr_edit with name(),memory,graph,plot,save,stata,Memory,Graph,Plot,Save,Stata,我正在斯塔塔学习图形。我目前一直在使用gr_edit命令在图形编辑器中生成我所更改内容的代码。大概是这样的: 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
gr_edit
命令在图形编辑器中生成我所更改内容的代码。大概是这样的:
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\u edit
行,这是有效的:
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
另请参见
帮助tempfile
假设您确实需要gr\u edit
行,这是有效的:
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
另请参见
帮助tempfile
假设您确实需要gr\u edit
行,这是有效的:
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
另请参见
帮助tempfile
假设您确实需要gr\u edit
行,这是有效的:
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
另请参见
帮助tempfile
谢谢。不知怎的,我没有想到先保存然后删除。谢谢。不知怎的,我没有想到先保存然后删除。谢谢。不知怎的,我没有想到先保存然后删除。谢谢。不知怎的,我没有想到先保存然后删除。