


Stata graph commands often get long you can make them more readable by splitting them across multiple lines if you use /// to tell Stata the command continues on the next line. Without quotes, Stata will think you're trying to set title options.

The title text doesn't always need to go in quotes, but this one does because it contains a comma. For graphs describing surveys, the question text is often a useful title. This graph is also in dire need of an overall title, which can be added using the title() option. Note that this axis will be horizontal since you're now making a horizontal graph, but it's still referred to as the y axis. Make it more clear with a ytitle() option. You can fix this problem easily and naturally by making the whole graph horizontal rather than vertical. The categories are labeled using the value labels of the sat variable, but they're unreadable because they overlap. Unfortunately, the result is not very satisfactory: By default it will tell you the percentage of observations that fall in each category. The graph bar command tell Stata you want to make a bar graph, and the over() option tells it which variable defines the categories to be described. Begin with the sat variable (job satisfaction) and the most basic bar graph: The most basic task of a bar graph is to help you understand the distribution of a single categorical variable.
#SORT STATA HOW TO#
This article will show you how to make a variety of useful bar graphs using Stata. They can be understood at a glance by both technical and non-technical audiences, and often tell you much more than summary statistics will. Bar graphs are simple but powerful (or rather, powerful because they are simple) tools for conveying information.
