Formatting a Bar Graph

Re: Formatting a Bar Graph

by Michael Peters -
Number of replies: 0

Emily,

  The easiest way (I find) to label a graph is to label your variables themselves

For examples with 1/0

I use

label define Gender 1 "Female" 0 "Male"

label values Gender Gender 

The above code for the variable Gender labels all values 1 female and all values 0 value

The next line tells stata that what you labeled as Gender goes with the variable called Gender.  

The same works for "Yes" "No" variables, and you could relabel them "No TBI" "Yes TBI", or whatever you want.

I am not aware of any way to get the actual code, when you use graph editor, a big drawback in my opinion of Stata.

 

MCP