graph_manipulation.hlp
来自「是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到」· HLP 代码 · 共 224 行
HLP
224 行
{smcl}
{* 05mar2005}{...}
{cmd:help graph_manipulation}
{hline}
{* index gph files}{...}
{* manipulation commands}{...}
{title:Title}
{p2colset 5 31 33 2}{...}
{p2col :{hi:[G] graph manipulation} {hline 2}}Graph manipulation commands{p_end}
{p2colreset}{...}
{title:Syntax}
{pstd}
The graph manipulation commands are
{it:command}{col 30}description
{hline 65}
{helpb graph dir}{...}
{col 30}list names of graphs
{helpb graph describe}{...}
{col 30}describe contents of graph
{helpb graph drop}{...}
{col 30}discard graph stored in memory
{helpb graph rename}{...}
{col 30}rename graph stored in memory
{helpb graph copy}{...}
{col 30}copy graph stored in memory
{helpb graph export}{...}
{col 30}export current graph
{helpb graph use}{...}
{col 30}load graph on disk into memory & display it
{helpb graph display}{...}
{col 30}redisplay graph stored in memory
{helpb graph combine}{...}
{col 30}combine one or more graphs into one graph
{hline 65}
{title:Description}
{pstd}
The graph manipulation commands manipulate graphs stored in memory or
stored on disk.
{title:Remarks}
{pstd}
Remarks are presented under the headings
{help graph manipulation##remarks1:Overview of graphs in memory and graphs on disk}
{help graph manipulation##remarks2:Summary of graph manipulation commands}
{marker remarks1}{...}
{title:Overview of graphs in memory and graphs on disk}
{pstd}
Graphs are stored in memory and on disk. When you draw a graph, such as
by typing
{cmd:. graph twoway scatter mpg weight}
{pstd}
the resulting graph is stored in memory, and, in particular, it is stored under
the name {cmd:Graph}. Were you next to type
{cmd:. graph matrix mpg weight displ}
{pstd}
this new graph would replace the existing graph named {cmd:Graph}.
{pstd}
{cmd:Graph} is the default name used to record graphs in memory, and when you
draw graphs, they replace what was previously recorded in {cmd:Graph}.
{pstd}
You can specify the {cmd:name()} option{hline 2}see
{it:{help name_option}}{hline 2}to record graphs under different names:
{cmd:. graph twoway scatter mpg weight, name(scat)}
{pstd}
Now there are two graphs in memory: {cmd:Graph}, containing a scatterplot
matrix, and {cmd:scat}, containing a graph of mpg versus weight.
{pstd}
Graphs in memory are forgotten when you exit Stata, and they are forgotten at
other times, too, such as when you type {cmd:clear} or {cmd:discard}; see
{helpb clear} and {helpb discard}.
{pstd}
Graphs can be stored on disk, where they will reside permanently until you
erase them. They are saved in files known as {cmd:.gph} files{hline 2}files
whose names end in {cmd:.gph}; see {help gph files}.
{pstd}
You can save on disk the graph currently showing in the Graph window by typing
{cmd:. graph save mygraph.gph}
{pstd}
The result is to create a new file {cmd:mygraph.gph}; see
{helpb graph save}. Or{hline 2}see {it:{help saving_option}}{hline 2}you can
save on disk graphs when you originally draw them:
{cmd:. graph twoway scatter mpg weight, saving(mygraph.gph)}
{pstd}
Either way, graphs saved on disk can be reloaded:
{cmd:. graph use mygraph.gph}
{pstd}
loads {cmd:mygraph.gph} into memory under the name{hline 2}you guessed it{hline 2}{cmd:Graph}. Of course, you could load it under a different name:
{cmd:. graph use mygraph.gph, name(memcp)}
{pstd}
Having brought this graph back into memory, you find that things are just as
if you had drawn the graph for the first time. Anything you could do back
then{hline 2}such as combine the graph with other graphs or change its aspect
ratio{hline 2}you can do now. And, of course, after making any changes, you
can save the result on disk, either replacing file {cmd:mygraph.gph} or saving
it under a new name.
{pstd}
There is only one final, and very minor, wrinkle: Graphs on disk can be saved
in either of two formats, known as {cmd:live} and {cmd:asis}. {cmd:live} is
preferred and is the default, and what was said above applies only to
{cmd:live}-format files. {cmd:asis} files are more like pictures{hline 2}all
you can do is admire them and make copies. To save a file in {cmd:asis}
format, you type
{cmd:. graph save} ...{cmd:, asis}
or
{cmd:. graph} ...{cmd:,} ... {cmd:saving(}...{cmd:, asis)}
{pstd}
{cmd:asis} format is discussed in {help gph files}.
{pstd}
There is a third format called {cmd:old}, which is like {cmd:asis}, except
that it refers to graphs made by versions of Stata older than Stata 8.
This is discussed in {help gph files}, too.
{marker remarks2}{...}
{title:Summary of graph manipulation commands}
{pstd}
The graph manipulation commands help you manage your graphs, whether stored
in memory or on disk. The commands are
{phang2}
{cmd:graph dir}{break}
Lists the names under which graphs are stored, both in memory
and on disk;
see {helpb graph dir}.
{phang2}
{cmd:graph describe}{break}
Provides details about a graph, whether stored in memory or on disk;
see {helpb graph describe}.
{phang2}
{cmd:graph drop}{break}
Eliminates from memory graphs stored there;
see {helpb graph drop}.
{phang2}
{cmd:graph rename}{break}
Changes the name of a graph stored in memory;
see {helpb graph rename}.
{phang2}
{cmd:graph copy}{break}
Makes a copy of a graph stored in memory;
see {helpb graph copy}.
{phang2}
{cmd:graph use}{break}
Copies a graph on disk into memory and displays it;
see {helpb graph use}.
{phang2}
{cmd:graph display}{break}
Redisplays a graph stored in memory;
see {helpb graph display}.
{phang2}
{cmd:graph combine}{break}
Combines into one graph graphs stored in memory or on disk;
see {helpb graph combine}.
{title:Also see}
{psee}
Manual: {bf:[G] graph manipulation}
{psee}
Online:
{helpb graph dir},
{helpb graph describe},
{helpb graph drop},
{helpb graph rename},
{helpb graph copy},
{helpb graph use},
{helpb graph display},
{helpb graph combine};
{helpb clear},
{helpb discard},
{help gph files},
{helpb graph_save},
{it:{help name_option}},
{it:{help saving_option}}
{p_end}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?