Changing Bar Labels

By Kuai Kaui Wang · Published 4 November 2026
graphicsstata

Below is a worked example of changing bar chart labels in Stata:

Please note that it is sometimes more convenient to use value labels rather than graph label options to change graph bar labels. In my example it also allows the legend to be spread over the width of the graph.

The commands used are:

clear all

sysuse auto

label define origin 0 "Europe de l'Ouest" 1 "Asie de l'Est", modify

graph hbar mpg trunk turn, over(foreign) stack name(two,replace)

4 views 0 found this useful