graph_export.hlp
来自「是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到」· HLP 代码 · 共 244 行
HLP
244 行
{smcl}
{* 09mar2005}{...}
{cmd:help graph export}
{hline}
{* index exporting graphs}{...}
{title:Title}
{p2colset 5 25 27 2}{...}
{p2col :{hi:[G] graph export} {hline 2}}Export current graph{p_end}
{p2colreset}{...}
{title:Syntax}
{p 8 16 2}
{cmdab:gr:aph}
{cmd:export}
{it:newfilename}{cmd:.}{it:suffix}
[{cmd:,}
{it:options}]
{it:options}{col 35}description
{hline 69}
{cmd:name(}{it:windowname}{cmd:)}{...}
{col 35}name of Graph window to export from
{cmd:as(}{it:fileformat}{cmd:)}{...}
{col 35}desired format of output
{cmd:replace}{...}
{col 35}{it:newfilename} may already exist
{it:override_options}{...}
{col 35}override defaults in conversion
{hline 69}
{pstd}
If {cmd:as()} is not specified, the output format is determined by the suffix
of {it:newfilename}{cmd:.}{it:suffix}:
{col 20}implied
{it:suffix}{col 20}option{col 35}output format
{hline 69}
{cmd:.ps}{col 20}{cmd:as(ps)}{col 35}PostScript
{cmd:.eps}{col 20}{cmd:as(eps)}{col 35}Encapsulated PostScript
{cmd:.wmf}{col 20}{cmd:as(wmf)}{col 35}Windows Metafile
{cmd:.emf}{col 20}{cmd:as(emf)}{col 35}Windows Enhanced Metafile
{cmd:.pict}{col 20}{cmd:as(pict)}{col 35}Macintosh PICT format
{cmd:.pdf}{col 20}{cmd:as(pdf)}{col 35}PDF
{cmd:.png}{col 20}{cmd:as(png)}{col 35}PNG (Portable Network Graphics)
{cmd:.tif}{col 20}{cmd:as(tif)}{col 35}TIFF
{it: other}{col 35}must specify {cmd:as()}
{hline 69}
{pin}
{cmd:ps}, {cmd:eps}, and {cmd:tif} are available with all versions of Stata;
{cmd:png} is available for all versions of Stata except Stata(console) for Unix;
{cmd:wmf} and {cmd:emf} are available only with Stata for Windows;
and {cmd:pict} and {cmd:pdf} are available only with Stata for Macintosh.
{it:override_options}{col 35}description
{hline 69}
{it:{help ps_options}}{...}
{col 35}when exporting to {cmd:ps}
{it:{help eps_options}}{...}
{col 35}when exporting to {cmd:eps}
{it:{help mf_option}}{...}
{col 35}when exporting to {cmd:wmf} or {cmd:emf}
{it:{help pict_options}}{...}
{col 35}when exporting to {cmd:pict}
{hline 69}
{pin}
There are no override_options for the {cmd:pdf}, {cmd:png}, or {cmd:tif}
formats.
{title:Description}
{pstd}
{cmd:graph} {cmd:export} exports to a file the graph displayed
in a Graph window.
{title:Options}
{phang}
{cmd:name(}{it:windowname}{cmd:)} specifies which window to export from when
exporting a graph. Omitting the {cmd:name()} option exports the
topmost graph (Unix(GUI) users: see
{help graph export##GUI:Technical note for Unix(GUI) users}).
The name for a window is displayed inside parentheses in the window title.
For example, if the title for a Graph window is {hi:Graph (MyGraph)},
the name for the window is {hi:MyGraph}. If a graph is an {cmd:asis} or
{cmd:graph7} graph where there is no name in the window title,
specify "" for {it:windowname}.
{phang}
{cmd:as(}{it:fileformat}{cmd:)}
specifies the file format to which the graph is to be exported.
This option is rarely specified since, by default, {cmd:graph}
{cmd:export} determines the format based on the suffix of the
file being created.
{phang}
{cmd:replace}
specifies that it is okay to replace {it:filename}{cmd:.}{it:suffix}
if it already exists.
{phang}
{it:override_options}
modify how the graph is converted. See
{it:{help ps_options}},
{it:{help eps_options}},
{it:{help mf_option}}, and
{it:{help pict_options}}.
See also {helpb graph set} for permanently setting default values for
the {it:override_options}.
{title:Remarks}
{pstd}
Graphs are exported by displaying them on the screen and then typing
{cmd:. graph export} {it:filename}{cmd:.}{it:suffix}
{pstd}
Remarks are presented under the headings
{help graph export##remarks1:Exporting the graph displayed in a Graph window}
{help graph export##remarks2:Exporting a graph stored on disk}
{help graph export##remarks3:Exporting a graph stored in memory}
{pstd}
If your interest is simply in printing a graph, see {helpb graph print}.
{marker remarks1}{...}
{title:Exporting the graph displayed in a Graph window}
{pstd}
There are three ways to export the graph displayed in a Graph window:
{phang2}
1. Right-click on the Graph window, select {bf:Save Graph...}, and choose
the appropriate {bf:Save as type}.
{phang2}
2. Select {bf:File > Save Graph...}, and choose
the appropriate {bf:Save as type}.
{phang2}
3. Type "{cmd:graph} {cmd:export} {it:filename}{cmd:.}{it:suffix}"
in the Command window. Unix(GUI) users should use the
{cmd:name()} option if there is more than one graph displayed to
ensure that the correct graph is exported (see
{help graph export##GUI:Technical note for Unix(GUI) users}).
{pstd}
All three are equivalent. The advantage of {cmd:graph} {cmd:export} is that you
can include it in do-files:
{cmd:. graph} ...{col 40}(draw a graph)
{cmd:. graph export} {it:filename}{cmd:.}{it:suffix}{...}
{col 40}(and export it)
{pstd}
By default, {cmd:graph} {cmd:export} determines the output type by the
{it:suffix}. If we wanted to create an Encapsulated PostScript file,
we might type
{cmd:. graph export figure57.eps}
{marker remarks2}{...}
{title:Exporting a graph stored on disk}
{pstd}
To export a graph stored on disk, type
{cmd:. graph use} {it:gph_filename}
{cmd:. graph export} {it:output_filename}{cmd:.}{it:suffix}
{pstd}
Do not specify {cmd:graph} {cmd:use}'s {cmd:nodraw} option; see
{helpb graph use}.
{pstd}
Note for Stata(console) for Unix users: Follow the instructions just given,
even though you have no Graph window and cannot see what has just been
"displayed": Use the graph, and then export it.
{marker remarks3}{...}
{title:Exporting a graph stored in memory}
{pstd}
To export a graph stored in memory but not currently displayed, type
{cmd:. graph display} {it:name}
{cmd:. graph export} {it:filename}{cmd:.}{it:suffix}
{pstd}
Do not specify {cmd:graph} {cmd:display}'s {cmd:nodraw} option; see
{helpb graph display}.
{pstd}
Note for Stata(console) for Unix users: Follow the instructions just given,
even though you have no Graph window and cannot see what has just been
"displayed": Display the graph, and then export it.
{marker GUI}{...}
{title:Technical note for Unix(GUI) users}
{pstd}
X-Windows does not have a concept of a window z-order which prevents Stata
from determining which window is the topmost window. Instead, Stata
determines which window is topmost based on which window has the focus.
However, some window managers will set the focus to a window without bringing
the window to the top. What is the topmost window to Stata may not appear
topmost visually. For this reason, you should always use the {cmd:name()}
option to ensure that the correct Graph window is exported.
{title:Also see}
{psee}
Manual: {bf:[G] graph export}
{psee}
Online:
{it:{help ps_options}},
{it:{help eps_options}},
{it:{help mf_option}},
{it:{help pict_options}};
{helpb graph set},
{helpb graph display},
{helpb graph use};
{helpb graph print}
{p_end}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?