### Graphics Reference Manual

Publisher: | Stata Press |

Copyright: | 2023 |

ISBN-13: | 978-1-59718-384-0 |

Pages: | 760 |

##### Supplemental materials

A Visual Guide to Stata Graphics, Fourth Edition

Michael N. Mitchell

Speaking Stata Graphics

Nicholas J. Cox

NetCourse^{®} 120: Statistical graphics using Stata

Using Stata effectively: Data management, analysis, and graphics fundamentals training course

Tips and Tricks webinar

##### Table of contents

[G-1] Introduction and overview

IntroIntroduction to graphics manual Graph introIntroduction to graphics Graph EditorGraph Editor

[G-2] Commands

graphThe graphcommandgraph barBar charts graph boxBox plots graph closeClose Graph windows graph combineCombine multiple graphs graph copyCopy graph in memory graph describeDescribe contents of graph in memory or on disk graph dirList names of graphs in memory and on disk graph displayDisplay graph stored in memory graph dotDot charts (summary statistics) graph dropDrop graphs from memory graph exportExport current graph graph manipulationGraph manipulation commands graph matrixMatrix graphs graph otherOther graphics commands graph piePie charts graph playApply edits from a recording on current graph graph printPrint a graph graph queryList available schemes and styles graph renameRename graph in memory graph replayReplay multiple graphs graph saveSave graph to disk graph setSet graphics options graph twowayTwoway graphs graph twoway areaTwoway line plot with area shading graph twoway barTwoway bar plots graph twoway connectedTwoway connected plots graph twoway contourTwoway contour plot with area shading graph twoway contourlineTwoway contour-line plot graph twoway dotTwoway dot plots graph twoway droplineTwoway dropped-line plots graph twoway fpfitTwoway fractional-polynomial prediction plots graph twoway fpfitciTwoway fractional-polynomial prediction plots with CIs graph twoway functionTwoway line plot of function graph twoway histogramHistogram plots graph twoway kdensityKernel density plots graph twoway lfitTwoway linear prediction plots graph twoway lfitciTwoway linear prediction plots with CIs graph twoway lineTwoway line plots graph twoway lowessLocal linear smooth plots graph twoway lpolyLocal polynomial smooth plots graph twoway lpolyciLocal polynomial smooth plots with CIs graph twoway mbandTwoway median-band plots graph twoway msplineTwoway median-spline plots graph twoway pcarrowPaired-coordinate plot with arrows graph twoway pcarrowiTwoway pcarrow with immediate arguments graph twoway pccapsymPaired-coordinate plot with spikes and marker symbols graph twoway pciTwoway paired-coordinate plot with immediate arguments graph twoway pcscatterPaired-coordinate plot with markers graph twoway pcspikePaired-coordinate plot with spikes graph twoway qfitTwoway quadratic prediction plots graph twoway qfitciTwoway quadratic prediction plots with CIs graph twoway rareaRange plot with area shading graph twoway rbarRange plot with bars graph twoway rcapRange plot with capped spikes graph twoway rcapsymRange plot with spikes capped with marker symbols graph twoway rconnectedRange plot with connected lines graph twoway rlineRange plot with lines graph twoway rscatterRange plot with markers graph twoway rspikeRange plot with spikes graph twoway scatterTwoway scatterplots graph twoway scatteriScatter with immediate arguments graph twoway spikeTwoway spike plots graph twoway tslineTwoway line plots graph useDisplay graph stored on disk paletteDisplay palettes of available selections set graphicsSet whether graphs are displayed set printcolorSet how colors are treated when graphs are printed set schemeSet default scheme

[G-3] Options

added_line_optionsOptions for adding lines to twoway graphs added_text_optionsOptions for adding text to twoway graphs addplot_optionOption for adding additional twoway plots to command advanced_optionsRarely specified options for use with graph twoway area_optionsOptions for specifying the look of special areas aspect_optionOption for controlling the aspect ratio of the plot region axis_choice_optionsOptions for specifying the axes on which a plot appears axis_label_optionsOptions for specifying axis labels axis_optionsOptions for specifying numeric axes axis_scale_optionsOptions for specifying axis scale, range, and look axis_title_optionsOptions for specifying axis titles barlook_optionsOptions for setting the look of bars blabel_optionOption for labeling bars by_optionOption for repeating graph command cat_axis_label_optionsOptions for specifying look of categorical axis labels cat_axis_line_optionsOptions for specifying look of categorical axis line clegend_optionOption for controlling the contour-plot legend cline_optionsOptions for connecting points with lines (subset of connect options) colorvar_optionsOptions for using levels of a variable to control color connect_optionsOptions for connecting points with lines eps_optionsOptions for exporting to Encapsulated PostScript fcline_optionsOptions for determining the look of fitted connecting lines fitarea_optionsOptions for specifying the look of confidence interval areas gif_optionsOptions for exporting to Graphics Interchange Format (GIF) jpg_optionsOptions for exporting to Joint Photographic Experts Group (JPEG) format legend_optionsOption for specifying legends line_optionsOptions for determining the look of lines marker_label_optionsOptions for specifying marker labels marker_optionsOptions for specifying markers name_optionOption for naming graph in memory nodraw_optionOption for suppressing display of graph play_optionOption for playing graph recordings png_optionsOptions for exporting to portable network graphics (PNG) format pr_optionsOptions for use with graph print ps_optionsOptions for exporting or printing to PostScript rcap_optionsOptions for determining the look of range plots with capped spikes region_optionsOptions for shading and outlining regions and controlling graph size rspike_optionsOptions for determining the look of range spikes saving_optionOption for saving graph to disk scale_optionOption for resizing text, markers, and line widths scheme_optionOption for specifying scheme std_optionsOptions for use with graph construction commands svg_optionsOptions for exporting to Scalable Vector Graphics textbox_optionsOptions for textboxes and concept definition tif_optionsOptions for exporting to tagged image file format (TIFF) title_optionsOptions for specifying titles twoway_optionsOptions for twoway graphs

[G-4] Styles, concepts, and schemes

addedlinestyleChoices for overall look of added lines alignmentstyleChoices for vertical alignment of text anglestyleChoices for the angle at which text is displayed areastyleChoices for look of regions axisstyleChoices for overall look of axes bystyleChoices for look of by-graphs clockposstyleChoices for location: Direction from central point colorstyleChoices for color compassdirstyleChoices for location Concept: gph filesUsing gph files Concept: linesUsing lines Concept: repeated optionsInterpretation of repeated options connectstyleChoices for how points are connected gridstyleChoices for overall look of grid lines intensitystyleChoices for the intensity of a color justificationstyleChoices for how text is justified legendstyleChoices for look of legends linealignmentstyleChoices for whether outlines are inside, outside, or centered linepatternstyleChoices for whether lines are solid, dashed, etc. linestyleChoices for overall look of lines linewidthstyleChoices for thickness of lines marginstyleChoices for size of margins markerlabelstyleChoices for overall look of marker labels markersizestyleChoices for the size of markers markerstyleChoices for overall look of markers orientationstyleChoices for orientation of textboxes plotregionstyleChoices for overall look of plot regions pstyleChoices for overall look of plot ringposstyleChoices for location: Distance from plot region Schemes introIntroduction to schemes Scheme economistScheme description: economistScheme s1Scheme description: s1 familyScheme s2Scheme description: s2 familyScheme sjScheme description: sjScheme stScheme description: st familyshadestyleChoices for overall look of filled areas sizeChoices for sizes for objects stylelistsLists of style elements and shorthands symbolstyleChoices for the shape of markers textText in graphs textboxstyleChoices for the overall look of text including border textsizestyleChoices for the size of text textstyleChoices for the overall look of text ticksetstyleChoices for overall look of axis ticks tickstyleChoices for the overall look of axis ticks and axis tick labels GlossaryCombined author indexCombined subject index