Liz's Stata Guide

Commands: Graphics

This page covers commands for graphics.

Draws a histogram of a variable.
histogram varx

Draws scatter graphs.
scatter vary varx

graph bar; graph hbar
Draws bar graphs.
graph bar vary, over(groupvar)

graph pie
Draws pie charts.
graph pie, over(varx)

line; function
Graphs lines, either from data or a given function.
line vary varx, sort   - or -
twoway function y = f(x)

common graphing options
Some of the most common / useful options that can be used to change the appearance of most graphs.

last modified: 2 May 2007