4th Edition

A Visual Guide to Stata Graphics

By Michael N. Mitchell Copyright 2022
499 Pages
by Stata Press

Whether you are new to Stata graphics or a seasoned veteran, this book will teach you how to use Stata to make publication-quality graphs that will stand out and enhance your statistical results. With over 1,200 illustrated examples and quick-reference tabs, this book quickly guides you to the information you need for creating and customizing high-quality graphs for any type of statistical data.... Read more

1 Introduction

1.1 Online supplements

1.2 Using this book

1.3 Types of Stata graphs

1.4 Schemes

1.4.1 Schemes included with Stata

1.4.2 Community-contributed schemes

1.4.3 Schemes included with this book

1.4.4 Setting schemes

1.5 Options

1.6 Building graphs

1.7 Point-and-click interface

2 Twoway graphs

2.1 Scatterplots

2.2 Regression fits and splines

2.3 Regression confidence interval fits

2.4 Line plots

2.5 Area plots

2.6 Bar plots

2.7 Range plots

2.8 Distribution plots

2.9 Contour plots

2.10 Options

2.11 Overlaying plots

3 Scatterplot matrix graphs

3.1 Marker options

3.2 Controlling axes

3.3 Matrix options

3.4 Graphing by groups

4 Bar graphs

4.1 Y variables

4.2 Graphing bars over groups

4.3 Options for controlling gaps between bars

4.4 Options for sorting bars

4.5 Controlling the categorical axis

4.6 Controlling the legend and labeling bars

4.7 Controlling the y axis

4.8 Changing the look of bars

4.9 Graphing by groups

5 Box plots

5.1 Specifying variables and groups

5.2 Options for controlling gaps between boxes

5.3 Options for sorting boxes

5.4 Controlling the categorical axis

5.5 Controlling the legend

5.6 Controlling the y axis

5.7 Changing the look of boxes

5.8 Graphing by groups

6 Dot plots

6.1 Specifying variables and groups

6.2 Options for controlling gaps between dots

6.3 Options for sorting dots

6.4 Controlling the categorical axis

6.5 Controlling the legend

6.6 Controlling the y axis

6.7 Changing the look of dot rulers

6.8 Graphing by groups

7 Pie charts

7.1 Types of pie charts

7.2 Sorting pie slices

7.3 Changing the look and color and exploding pie slices

7.4 Slice labels

7.5 Controlling the legend

7.6 Graphing by groups

8 Options available for most graphs

8.1 Changing the look of markers

8.2 Creating and controlling marker labels

8.3 Connecting points and markers

8.4 Setting and controlling axis titles

8.5 Setting and controlling axis labels

8.6 Controlling axis scales

8.7 Selecting an axis

8.8 Graphing by groups

8.9 Controlling the legend

8.10 Adding text to markers and positions

8.11 Options for text and textboxes

8.12 More options controlling the display of text

9 Standard options available for all graphs

9.1 Creating and controlling titles

9.2 Using schemes to control the look of graphs

9.2.1 Schemes included with Stata

9.2.2 Community-contributed schemes

Graph schemes sensitive to color vision deficiency

The 538 family of schemes

The lean family of schemes

9.2.3 Schemes included with this book

9.2.4 Example #1: An overlaid scatterplot with fit lines

9.2.5 Example #2: An overlaid scatterplot with fit lines and confidence region

Example #3: A bar chart

The grstyle way of customizing graphs

9.2.6 Customizing schemes

9.2.7 Using the set scheme command

9.3 Sizing graphs and their elements

9.3.1 Sizing/resizing graphs with absolutely sized versus relatively sized units

9.4 Changing the look of graph regions

10 Styles for changing the look of graphs

10.1 Angle

10.2 Color

10.2.1 Named colors

10.2.2 Color intensity

Increasing brightness

Decreasing brightness

The brightness spectrum

10.2.3 Color opacity

10.2.4 Overlapping colors

10.2.5 Specifying colors using RGB, CMYK, and HSV values

10.3 Clock position

10.4 Compass direction

10.5 Connecting points

10.6 Line patterns

10.7 Line width

10.8 Margin

10.9 Marker size

10.10 Orientation

10.11 Marker symbol

10.12 Text size

11 Appendix

11.1 Overview of statistical graph commands

11.2 Common options for statistical graphs

11.3 The marginsplot command

11.4 Saving, redisplaying, and combining graphs

11.5 Exporting graphs

11.6 More examples: Putting it all together

11.7 Common mistakes

Biography

Michael N. Mitchell is a senior statistician working in the area of sleep research as well as working on prevention of child maltreatment with the Children’s Data Network. He is the author of three other Stata Press books—Interpreting and Visualizing Regression Models Using Stata, Data Management Using Stata, and Stata for the Behavioral Sciences.