{smcl} {* 22aug2004}{...} {hline} {center:{hi:How are graph commands structured?}} {hline} {p 4 4 4}{it} The overall structure of a graphics command can be seen below, with various parts coded in different colors or fonts. The section "other_stuff" refers to things like titles, legends, and captions and as we saw in the dialog boxes and the commands generated from the dialog boxes they are almost completely common across all graph types. {sf} {hline} {p 0 2 0}. {cmd:{it:type_of_graph}} {input:{it:what_to_graph}} , {error:{it:how_it_looks}} {it:other_stuff}{p_end} {hline} {p 4 4 4}{it} You can see how the sections of a graph command relate to actual commands by following the coding in the commands below. {sf} {p 0 2 0}. {cmd:graph box} {input:trunk mpg} {p 0 2 0}. {cmd:histogram} {input:mpg} {p 0 2 0}. {cmd:kdensity} {input:mpg} {p 0 2 0}. {cmd:quantile} {input:trunk} {p 0 2 0}. {cmd:graph twoway scatter} {input:mpg weight}{p_end} or {p 0 2 0}. {cmd:twoway scatter} {input:mpg weight}{p_end} or {p 0 2 0}. {cmd:scatter} {input:mpg weight} {p 0 2 0}. {cmd:scatter} {input:mpg weight} , {error:mcolor(red)} {p 0 2 0}. {cmd:scatter} {input:mpg weight} , {error:mcolor(red)} title("My Red MPG") o {cmd:twoway} allows an extension . {cmd:twoway {it:plottype}} {input:{it:what_to_plot}} , {error:{it:how_it_looks}} || {cmd:{it:plottype}} {input:{it:what_to_plot}} , {error:{it:how_it_looks}} || ... {cmd:{it:plottype}} {input:{it:what_to_plot}} , {error:{it:how_it_looks}} {it:other_stuff} o What kind of plottypes are there? . {help graph_twoway:whelp twoway} {hline} {center:{view testdrive.smcl:<<} {view tindex.smcl:index} {view twoway.smcl:>>}}