📄 graph_print.hlp
字号:
{smcl}
{* 05mar2005}{...}
{cmd:help graph print}
{hline}
{* index printing graphs}{...}
{* index graph print tt}{...}
{* index graph set tt}{...}
{title:Title}
{p2colset 5 24 26 2}{...}
{p2col :{hi:[G] graph print} {hline 2}}Print a graph{p_end}
{p2colreset}{...}
{title:Syntax}
{p 8 16 2}
{cmdab:gr:aph}
{cmd:print}
[{cmd:, name(}{it:windowname}{cmd:)}
{it:{help pr_options}}]
{title:Description}
{pstd}
{cmd:graph} {cmd:print} prints the graph displayed in a Graph
window.
{pstd}
Stata for Unix users must do some setup before using {cmd:graph} {cmd:print}
for the first time; see
{hi:Appendix: Setting up Stata for Unix to print graphs} below.
{title:Options}
{phang}
{cmd:name(}{it:windowname}{cmd:)} specifies which window to print when
printing a graph. Omitting the {cmd:name()} option prints the topmost graph
(Unix(GUI) users: see
{help graph print##GUI:Technical note for Unix(GUI) users}).
{p 8 8 2}
The name for a window is 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, then specify {hi:""} for
{it:windowname}.
{phang}
{it:pr_options}
modify how the graph is printed. See {it:{help pr_options}}.
{phang}
Default values for the options may be set using {helpb graph set}.
{title:Remarks}
{pstd}
Graphs are printed by displaying them on the screen and then typing
{cmd:. graph print}
{pstd}
Remarks are presented under the headings
{help graph print##remarks1:Printing the graph displayed in a Graph window}
{help graph print##remarks2:Printing a graph stored on disk}
{help graph print##remarks3:Printing a graph stored in memory}
{help graph print##remarks4:Appendix: Setting up Stata for Unix to print graphs}
{pstd}
Also see {helpb set printcolor}. By default, if the graph being
printed has a black background, it is printed in monochrome.
{pstd}
In addition to printing graphs, Stata can export graphs in
PostScript,
Encapsulated PostScript (EPS),
Portable Network Graphics (PNG),
TIFF,
Windows Metafile (WMF),
Windows Enhanced Metafile (EMF), and
Macintosh PICT
formats;
see {helpb graph export}.
{marker remarks1}{...}
{title:Printing the graph displayed in a Graph window}
{pstd}
There are three ways to print the graph displayed in a Graph window:
{phang2}
1. Right-click in the Graph window, and select "{bf:Print...}".
{phang2}
2. Select {bf:File > Print Graph...}.
{phang2}
3. Type "{cmd:graph} {cmd:print}" 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
printed (see
{help graph print##GUI:Technical note for Unix(GUI) users}).
{pstd}
All are equivalent. The advantage of {cmd:graph} {cmd:print} is that you may
include it in do-files:
{cmd:. graph} ...{col 40}(draw a graph)
{cmd:. graph print}{col 40}(and print it)
{marker remarks2}{...}
{title:Printing a graph stored on disk}
{pstd}
To print a graph stored on disk, type
{cmd:. graph use} {it:filename}
{cmd:. graph print}
{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 print it.
{marker remarks3}{...}
{title:Printing a graph stored in memory}
{pstd}
To print a graph stored in memory but not currently displayed, type
{cmd:. graph display} {it:name}
{cmd:. graph print}
{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 print it.
{marker remarks4}{...}
{title:Appendix: Setting up Stata for Unix to print graphs}
{pstd}
Before you can print graphs, you must tell Stata the command you ordinarily
use to print PostScript files. Out of the box, Stata assumes that the command
is
{cmd:$ lpr < }{it:filename}
{pstd}
That command may be correct for you. If, on the other hand, you usually
type something like
{cmd:$ lpr -Plexmark} {it:filename}
{pstd}
you need to tell Stata that by typing
{cmd:. printer define prn ps "lpr -Plexmark @"}
{pstd}
Type an {cmd:@} where you ordinarily would type the filename. If you
want the command to be "{cmd:lpr -Plexmark < @}", type
{cmd:. printer define prn ps "lpr -Plexmark < @"}
{pstd}
Stata assumes that the printer you specify understands PostScript format.
{marker GUI}{...}
{title:Technical note for Unix(GUI) users}
{pstd}
X-Windows does not have the 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 printed.
{title:Also see}
{psee}
Manual: {bf:[G] graph print}
{psee}
Online:
{it:{help pr_options}},
{helpb set printcolor};
{helpb graph display},
{helpb graph use};
{helpb graph export},
{helpb graph set}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -