Announcement

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

  • STATA: Centering a Stacked Bar graph around Zero

    I am fairly new to stata. I would like to create a stacked bar graph that centers around 0 (scale -100 to 100) instead of 1 to 100. Is there a simple way to do this? Here is the code I currently have and that chart that is produced.
    Thank you so much for your help!

    graph bar strongly_positive slightly_positive slightly_negative strongly_negative, over(asset_class_name) stack percent bar(1, fcolor(green) fintensity(inten80)) bar(2, fcolor(green) fintensity(inten50)) bar(3, fcolor(red) fintensity(inten50)) bar(4, fcolor(red) fintensity(inten80))

  • #2
    It's hard to answer this without a data extract. Could you please use -dataex- and provide one with the relevant variables?

    Comment


    • #3
      Cross-posted at https://stackoverflow.com/questions/...-graph-on-zero

      Please note our policy on cross-posting, which is that you are asked to tell us about it.

      Search this forum for posts on floatplot from SSC.

      I agree with Hemanshu Kumar that a data example would be very helpful.

      Sections of the FAQ Advice to visit:

      https://www.statalist.org/forums/help#stata

      https://www.statalist.org/forums/help#crossposting

      https://www.statalist.org/forums/help#spelling

      Comment

      Working...
      X