Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Two y axis bar graph with string x axis stata



    I am using Stata, and I am seeking to make a bar graph that has two separate y-axis with the x-axis being different countries.

    I have two variables (tlsize = total loan and trblgdp = total loan / GDP). My assumption was to use this code //

    twoway (bar tlsize country) (bar trblgdp country, yaxis(2))

    This said it won't work because country is a string variable, yet that is exactly what I want.

    I also tried this //

    graph bar (mean) trblgdp (mean) tlsize, over(country). This code works but I am unsure how to add a second y-axis. Any help would be appreciated.
Working...
X