Announcement

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

  • How to remove/whiten out X-axis in hbar?

    How do I get rid of this vertical line (see yellow mark) in my hbar-chart? Below an MWE. I want to keep the category names (i.e. "Foreign" and "Domestic"), but I just want this axis-line either to be gone or white. How?
    Thank you so much!

    Click image for larger version

Name:	Chart.JPG
Views:	1
Size:	17.8 KB
ID:	1782916





    Code:
    sysuse auto, clear
    
    graph hbar (mean) price ,                                        ///
        over(foreign, sort(1) descending label(labsize(small)))      ///
        graphregion(color(white) lcolor(white))                      ///
        plotregion(color(white) lcolor(white))                       ///
        ylabel(none, noticks labsize(small))                         ///
        ytitle("")                                                   ///
        yscale(noline)                                               ///
        legend(off)

  • #2
    The vertical line you marked as yellow is NOT controlled by yscale option. Try to manipulate it in over(varname[, over_subopts]) option. See code below (red color):
    Code:
    graph hbar (mean) price ,                                        ///
        over(foreign, sort(1) descending label(labsize(small)) axis(noline))      ///
        graphregion(color(white) lcolor(white))                      ///
        plotregion(color(white) lcolor(white))                       ///
        ylabel(none, noticks labsize(small))                         ///
        ytitle("")                                                   ///
        yscale(noline)                                               ///
        legend(off)

    Comment


    • #3
      Ah this worked! Thank you!

      Comment

      Working...
      X