Graphics Reference
In-Depth Information
2
Twoway graphs
The graph twoway command represents not just a single kind of graph but actually
over thirty different kinds of graphs. Many of these graphs are similar in appearance and
function, so I have grouped them into eight families, which form the first eight sections
of this chapter. These first eight sections, which cover scatterplots to distribution plots,
cover the general features of these plots and briefly mention some important options. These
are followed by a section giving an overview of the options that can be used with twoway
graphs. (For further details about the options that can be used with twoway graphs, see
Options (235) and the sections within that chapter.) The chapter concludes with a section
illustrating how you can overlay twoway graphs. For more details about graph twoway ,see
[ G ] graph twoway .
2.1
Scatterplots
This section covers the use of scatterplots. Because scatterplots are so commonly used,
this section will cover more details about the use of these graphs than subsequent sections.
Also, this section will introduce some of the kinds of options that can be used with many
kinds of twoway plots, with cross-references to Options (235).
graph twoway scatter ownhome propval100
Here is a basic scatterplot. Note that
this command starts with graph
twoway , which indicates that this is a
twoway graph. scatter indicates that
we are creating a twoway scatterplot.
These are followed by the variable to be
placed on the
y
-axis and then the
variable for the
-axis.
Uses allstates.dta & scheme vg s2c
x
0
20
40
60
80
100
% homes cost $100K+
35
The electronic form of this topic is solely for direct use at UCLA and only by faculty, students, and staff of UCLA.
Search WWH ::




Custom Search