A Visual Guide to Stata Graphics

Michael Mitchell’s A Visual Guide to Stata Graphics, Fourth Edition provides an essential introduction and reference for Stata graphics. The fourth edition retains the features that made the first three editions so useful:

 

A complete guide to Stata’s graph command

Exhaustive examples of customized graphs

Visual indexing of features—just look for a picture that matches what you want to do

 

This edition includes new discussions of color, Unicode characters, export formats, sizing of graph elements, and schemes. The section on colors has been greatly expanded to include over 50 examples that demonstrate how to modify colors, add transparency, and change intensity. In the discussion of text modifications, Mitchell now shows how to include Unicode characters such as Greek letters, symbols, and emojis. New examples have also been added that show how to change the size of graph elements such as text, markers, and line widths using both absolute units (points, inches, and centimeters) as well as relative units (line large or *2 for two times the original size). Finally, the look of graphs throughout the book has changed—most graphs are now created using a common updated scheme.

 

The book’s visual style makes it easy to find exactly what you need. A color-coded, visual table of contents runs along the edge of every page and shows readers exactly where they are in the book. You can see the color-coded chapter tabs without opening the book, providing quick visual access to each chapter.

 

The heart of each chapter is a series of entries that are typically formatted three to a page. Each entry shows a graph command (with the emphasized portion of the command highlighted in red), the resulting graph, a description of what is being done, and the dataset used. Because every feature, option, and edit is demonstrated with a graph, you can often flip through a section of the book to find exactly the effect you are seeking.

 

The book begins with an introduction to Stata graphs that includes an overview of graphs types, schemes, and options and the process of building a graph. Then, it turns to detailed discussions of many graph types—scatterplots, regression fit plots, line plots, contour plots, bar graphs, box plots, and many others. Mitchell shows how to create each type of graph and how to use options to control the look of the graph. Because Stata’s graph command will let you customize any aspect of the graph, Mitchell spends ample time showing you the most valuable options for obtaining the look you want. If you are in a hurry to discover one special option, you can skim the chapter until you see the effect you want and then glance at the command to see what is highlighted in red.

 

After focusing on specific types of graphs, Mitchell undertakes an in-depth presentation of the options available across almost all graph types. This includes options that add and change the look of titles, notes, and such; control the number of ticks on axes; control the content and appearance of the numbers and labels on axes; control legends; add and change the look of annotations; graph over subgroups; change the look of markers and their labels; size graphs and their elements; and more. To complete the graphical journey, Mitchell discusses and demonstrates the 12 styles that unite and control the appearance of the myriad graph objects. These styles are angles, colors, clock positions, compass directions, connecting points, line patterns, line widths, margins, marker sizes, orientations, marker symbols, and text sizes.

 

You won’t want to overlook the appendix in this book. There Mitchell first gives a quick overview of the dozens of statistical graph commands that are not strictly the subject of the book. Even so, these commands use the graph command as an engine to draw their graphs; therefore, almost all that Mitchell has discussed applies to them. He also addresses combining graphs—showing you how to create complex and multipart images from previously created graphs. In a crucial section titled “Putting it all together”, Mitchell shows us how to do just that. We learn more about overlaying twoway plots, and we learn how to combine data management and graphics to create plots such as bar charts of rates with capped confidence intervals. Mitchell concludes by warning us about mistakes that can be made when typing graph commands and how to correct them.

 

The fourth edition of A Visual Guide to Stata Graphics is a complete guide to Stata’s graph command and the associated Graph Editor. Whether you want to tame the Stata graph command, quickly find out how to produce a graphical effect, or learn approaches that can be used to construct custom graphs, this is the book to read.

Dedication
Preface to the Fourth Edition
Preface to the Third Edition
Preface to the Second Edition
Preface to the First Edition

 

Acknowledgments

 

1. INTRODUCTION
Online supplements
Using this book
Types of Stata graphs
Schemes
Schemes included with Stata
Community-contributed schemes
Schemes included with this book
Setting schemes

Options
Building graphs
Point-and-click interface

 

2. TWOWAY GRAPHS 

Scatterplots
Regression fits and splines
Regression confidence interval fits
Line plots
Area plots
Bar plots
Range plots
Distribution plots
Contour plots
Options
Overlaying plots

 

3. SCATTERPLOT MATRIX GRAPHS
Marker options
Controlling axes
Matrix options
Graphing by groups

 

4. BAR GRAPHS
Y variables
Graphing bars over groups
Options for controlling gaps between bars
Options for sorting bars
Controlling the categorical axis
Controlling the legend and labeling bars
Controlling the y axis
Changing the look of bars
Graphing by groups

 

5. BOX PLOTS
Specifying variables and groups
Options for controlling gaps between boxes
Options for sorting boxes
Controlling the categorical axis
Controlling the legend
Controlling the y axis
Changing the look of boxes
Graphing by groups

 

6. DOT PLOTS
Specifying variables and groups
Options for controlling gaps between dots
Options for sorting dots
Controlling the categorical axis
Controlling the legend
Controlling the y axis
Changing the look of dot rulers
Graphing by groups

 

7. PIE CHARTS
Types of pie charts
Sorting pie slices
Changing the look and color and exploding pie slices
Slice labels
Controlling the legend
Graphing by groups

 

8. OPTIONS AVAILABLE FOR MOST GRAPHS 
Changing the look of markers
Creating and controlling marker labels
Connecting points and markers
Setting and controlling axis titles
Setting and controlling axis labels
Controlling axis scales
Selecting an axis
Graphing by groups
Controlling the legend
Adding text to markers and positions
Options for text and textboxes
More options controlling the display of text

 

9. STANDARD OPTIONS AVAILABLE FOR ALL GRAPHS
Creating and controlling titles
Using schemes to control the look of graphs
Schemes included with Stata
Community-contributed schemes
Graph schemes sensitive to color vision deficiency
The 538 family of schemes
The lean family of schemes

Schemes included with this book
Example #1: An overlaid scatterplot with fit lines
Example #2: An overlaid scatterplot with fit lines and confidence region

Example #3: A bar chart
The grstyle way of customizing graphs

Customizing schemes
Using the set scheme command

Sizing graphs and their elements

Sizing/resizing graphs with absolutely sized versus relatively sized units

Changing the look of graph regions

 

 

 

10. STYLES FOR CHANGING THE LOOK OF GRAPHS 
Angle
Color
Named colors
Color intensity
Increasing brightness
Decreasing brightness
The brightness spectrum

Color opacity
Overlapping colors
Specifying colors using RGB, CMYK, and HSV values

Clock position
Compass direction
Connecting points
Line patterns
Line width
Margin
Marker size
Orientation
Marker symbol
Text size

 

 

11. APPENDIX 
Overview of statistical graph commands
Common options for statistical graphs
The marginsplot command
Saving, redisplaying, and combining graphs
Exporting graphs
More examples: Putting it all together
Common mistakes
Author: Michael N. Mitchell
Edition: Fourth Edition
ISBN-13: 978-1-59718-365-9
©Copyright: 2022
Versione e-Book disponibile

Michael Mitchell’s A Visual Guide to Stata Graphics, Fourth Edition provides an essential introduction and reference for Stata graphics. The fourth edition retains the features that made the first three editions so useful:

 

  • A complete guide to Stata’s graph command
  • Exhaustive examples of customized graphs
  • Visual indexing of features—just look for a picture that matches what you want to do