NOVITA'/TESTI

 

A Visual Guide to Stata Graphics, Third Edition - By Michael N. Mitchell

Table of Contents

Dedication

Acknowledgments

Preface

In its third edition, Michael Mitchell’s A Visual Guide to Stata Graphics remains the essential introduction and reference for Stata graphics. The third edition retains all the features that made the first two editions so useful:

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

New in this edition are treatments of contour plots, margins plots, and font handling. Mitchell dedicates a new subsection to contour plots, showing you how to control the number of levels, how to change the colors used, and how to produce effective legends. Over 30 graphs are used to demonstrate what you can accomplish with the new marginsplot command—graphs of estimated means and marginal means (with confidence intervals), interaction graphs, comparisons of groups, and more. Mitchell also adds a section that shows you how to get bold text, italic text, subscripts, superscripts, and Greek letters into your titles, axes, labels, and other text.

The book retains its visual style, presenting the reader with a color-coded, visual table of contents that runs along the right 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, the dataset and scheme used, and a section showing how to produce the result by using the Graph Editor. Because every feature, option, and edit is demonstrated with a graph or screen capture, you can often flip through a section of the book to find exactly the effect you are seeking.

The first chapter details how to use the book, the types of Stata graphs, how to use schemes to control the overall appearance of graphs, and how to use options to make specific modifications. It also outlines a process for building graphs with the graph command.

The second chapter is a complete overview of the Graph Editor. It includes over 120 color graphics and screen captures to show exactly how things are done and how they look on the graph. With pictures and words, Mitchell shows how to change the color, size, or placement of any titles, markers, annotations, or other objects on your graph by using just a few mouse clicks. More subtly, he shows how to change things such as the number of ticks and labels on your axes, the number of columns in your legends, the label on an individual point, and more. He even shows how to convert, for example, a scatterplot to a line plot and how to rotate or pivot bar charts. Mitchell also covers advanced topics such as how to draw lines and arrows on graphs so that they continue to reference your objects of interest even if you resize the graph, combine it with other graphs, or change the scale or range of the axes. In short, he exposes all the Graph Editor’s tools, from the simplest to the most powerful. Mitchell does not stop there; almost every example in the book shows you how to accomplish the desired graph or effect not only by using a command or command-line option but also by using the Graph Editor.

Of the Graph Editor, Mitchell writes,

[...] You need to use the Graph Editor for only a short amount of time to see what a smart and powerful tool it is. Whereas commands offer the power of repeatability, the Graph Editor provides a nimble interface that permits you to tangibly modify graphs like a potter directly handling clay.

In the third chapter, Mitchell discusses twoway graphs such as scatterplots, line plots, area plots, bar plots, range plots, contour plots, regression fits, and smooths. He shows how to create each of these types of graphs and how to use options (and the Graph Editor) to control how the graph looks. He also introduces graphing across groups of data and options for adding and controlling titles, notes, legends, and so forth. Beyond the basics, he shows how to easily overlay plots to obtain graphs such as regression fits with error contours and observed data scatters, local polynomial smooths with scatters of their underlying data, stock market–style graphs of open and closed values with quantities traded as a bar chart at the bottom, histograms with density smooths, and more. 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.

In the succeeding five chapters, Mitchell covers scatterplot matrices, bar graphs, box plots, dot plots, and pie charts. As with twoway graphs, he shows you how to create each of these graphs and how to adjust every aspect of the graph to your taste (or to a publisher’s required form).

In chapters 9 and 10, Mitchell undertakes an in-depth presentation of the options available across almost all graph types—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; apply schemes to control the look of the graph; change the look of graph regions; size graphs and their elements; and more. Again he shows how to make these changes both by using options and by using the Graph Editor.

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.

That completes the main body of the Visual Guide, but don’t skip the appendix. 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. To make this clear, he shows explicitly how to apply common options and common Graph Editor tools to statistical graphs. Then Mitchell takes you on a tour of the new marginsplot command. After that, he addresses combining graphs—showing you how to create complex and multipart images from previously created graphs.

In a crucial section entitled “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, scatterplots with range-finder confidence intervals in both dimensions, and population pyramids.

Mitchell then warns us about mistakes that can be made when typing graph commands and how to correct them. In the appendix, he even show us how to create our own scheme files. Scheme files allow you to control every aspect of how your graphs look without having to specify options. They are the answer to department or journal standards or if you just want all your graphs to have a common appearance different from the schemes shipped with Stata. As with the rest of the book, this section includes cross-references to the Stata Graphics Reference Manual to provide more depth on the subject. Finally, Mitchell reviews all datasets, schemes, and other online supplements available for the book.

The third 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, master the Stata Graph Editor, or learn approaches that can be used to construct custom graphs, this is the book to read.

Preface to the Third Edition
Preface to the Second Edition
Preface to the First Edition
  1. Introduction
    1. Using this book
    2. Types of Stata graphs
    3. Schemes
    4. Options
    5. Building graphs
  1. Editor
    1. Overview of the Graph Editor
    2. Object Browser
    3. Modifying objects
    4. Adding objects
    5. Moving objects
    6. Hiding and showing objects
    7. Locking and unlocking objects
    8. Using the Graph Recorder
    9. Graph Editor versus Stata commands
  1. Twoway Graphs
    1. Scatterplots
    2. Regression fits and splines
    3. Regression confidence intervals fits
    4. Line plots
    5. Area plots
    6. Bar plots
    7. Range plots
    8. Distribution plots
    9. Contour plots
    10. Options
    11. Overlaying plots
  1. Scatterplot Matrix Graphs
    1. Marker options
    2. Controlling axes
    3. Matrix options
    4. Graphing by groups
  1. Bar Graphs
    1. Y-variables
    2. Graphing bars over groups
    3. Options for controlling gaps between bars
    4. Options for sorting bars
    5. Controlling the categorical axis
    6. Legends and labeling bars
    7. Controlling the y-axis
    8. Changing the look of bars
    9. Graphing by groups
  1. Box Plots
    1. Specifying variables and groups
    2. Options for controlling gaps between boxes
    3. Options for sorting boxes
    4. Controlling the categorical axis
    5. Controlling legends
    6. Controlling the y-axis
    7. Changing the look of boxes
    8. Graphing by groups
  1. Dot Plots
    1. Specifying variables and groups
    2. Options for controlling gaps between dots
    3. Options for sorting dots
    4. Controlling the categorical axis
    5. Controlling legends
    6. Controlling the y-axis
    7. Changing the look of dot rulers
    8. Graphing by groups
  1. Pie Graphs
    1. Type of pie graphs
    2. Sorting pie slices
    3. Changing the look and color and exploding pie slices
    4. Slice labels
    5. Controlling legends
    6. Graphing by groups
  1. Options available for most graphs
    1. Changing the look of markers
    2. Creating and controlling marker labels
    3. Connecting points and markers
    4. Setting and controlling axis titles
    5. Setting and controlling axis labels
    6. Controlling axis scales
    7. Selecting an axis
    8. Graphing by groups
    9. Controlling legends
    10. Adding texts to markers and positions
    11. Options for text and textboxes
    12. More options for texts and text
  1. Standard options available for all graphs
    1. Creating and controlling titles
    2. Using schemes to control the look of graphs
    3. Sizing graphs and their elements
    4. Changing the look of graph regions
  1. Styles for changing the look of graphs
    1. Angles
    2. Colors
    3. Clock position
    4. Compass direction
    5. Connecting points
    6. Line patterns
    7. Line width
    8. Margins
    9. Marker size
    10. Orientation
    11. Marker symbols
    12. Text size
  1. Appendix
    1. Overview of stastistical graph commands
    2. Common options for statistical graphs
    3. The marginsplot command
    4. Saving, redisplaying, and combining graphs
    5. More examples: Putting it all together
    6. Common mistakes
    7. Customizing schemes
    8. Online supplements

Subject Index

© Copyright StataCorp LP 2002-2015.


 
Copyright © 2015 TStat All rights reserved via Rettangolo, 12/14 - 67039 - Sulmona (AQ) - Italia