|
|
|
||||
|
|
|||||
The big new feature with Stata graphics is the introduction of the interactive graphics editor. Yes, a point-and-click graph editor in Stata. To use the editor, simply create a graph in Stata the way you usually do, and then click on File -> Start Graph Editor or click on this icon here.
We will start off by reading in a data set and creating a simple scatterplot of two continuous variables.
use http://www.ats.ucla.edu/stat/stata/notes/hsb2, clear
scatter read write
Now, let's open the graph editor. As you can see, you have some tools on the left and an Object Browser on the right.
Using the pointer tool, click on the dots to select them, and then double-click on them to open the menu. The add text tool allows you to add text wherever you want it. This is really nice, because now you don’t have to specify the exact coordinates in your syntax. You can add a line to your graph with the add line tool, or some markers to your graph with the add marker tool. You can change the size of the plot with the grid edit tool. Let's try a few of these things, and then let's look at the Object Browser to see how it can be useful.
We strongly suggest that you add as many features as you can to your graph using syntax, and then just do some “touch up” with the graph editor. We suggest this because there is no record of what you have done with the graph editor, so if you need to recreate the graph for some reason, you will have to redo everything that you have done with the graph editor.
UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services