Last active
January 25, 2024 19:20
-
-
Save bbdaniels/4df5990b87115f143f74a35d1f1516f3 to your computer and use it in GitHub Desktop.
Add percentage signs to bar graph labels
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local nb=`.Graph.plotregion1.barlabels.arrnels' | |
qui forval i=1/`nb' { | |
.Graph.plotregion1.barlabels[`i'].text[1]="`.Graph.plotregion1.barlabels[`i'].text[1]'%" | |
} | |
.Graph.drawgraph | |
// Rounding | |
local nb=`.Graph.plotregion1.barlabels.arrnels' | |
forval i=1/`nb' { | |
.Graph.plotregion1.barlabels[`i'].text[1] = "`: di %2.0f `.Graph.plotregion1.barlabels[`i'].text[1]''" | |
.Graph.plotregion1.barlabels[`i'].text[1]="`.Graph.plotregion1.barlabels[`i'].text[1]'%" | |
} | |
.Graph.drawgraph |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment