Announcement

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

  • changing the color of just one bar in a bar chart; white gap appearing

    I've followed the instructions here: https://www.statalist.org/forums/for...gory-bar-chart.

    But I end up with the single differently colored bar moved slightly to the right, creating a white gap in the chart to the left of that bar. I've attached a pic.

    Any ideas as to what is happening?

    import delimited using "$wake/Muni-NonMuni_LandArea2023.csv", clear

    drop if county == "North Carolina"

    destring totallandarea, replace

    sort totallandarea
    gen x = _n

    separate totallandarea, by(county == "Wake")

    graph bar totallandarea0 totallandarea1, over(x, lab(nolab)) b1title("North Carolina counties") ///
    bar(1, color(red)) bar(2, color(black)) ytitle("Size in square miles") legend(off)


    Attached Files

  • #2
    You're missing the nofill option. See https://journals.sagepub.com/doi/pdf...867X1101100310

    Comment


    • #3
      Thanks, Nick! That was driving me crazy.

      Comment

      Working...
      X