Stata 15 help for set graphics

[G-2] set graphics -- Set whether graphs are displayed


query graphics

set graphics {on | off}


query graphics shows the graphics settings.

set graphics allows you to change whether graphs are displayed.


If you type

. set graphics off

when you type a graph command, such as

. scatter yvar xvar, saving(mygraph)

the graph will be "drawn" and saved in file mygraph.gph, but it will not be displayed. If you type

. set graphics on

graphs will be displayed once again.

Drawing graphs without displaying them is sometimes useful in programming contexts, although in such contexts, it is better to specify the nodraw option; see [G-3] nodraw_option. Typing

. scatter yvar xvar, saving(mygraph) nodraw

has the same effect as typing

. set graphics off . scatter yvar xvar, saving(mygraph) . set graphics on

The advantage of the former is not only does it require less typing, but if the user should press Break, set graphics will not be left off.

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index