Announcement

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

  • Reducing the gap between x-axis line and bar

    Hi all,

    webuse auto, clear
    hist mpg, freq

    gives me a nice histogram and there is no gap between x-axis line and bar, like below.

    Click image for larger version

Name:	hist.png
Views:	2
Size:	34.3 KB
ID:	1543749

    But,

    twoway histogram mpg, freq

    gives me the same histogram but some "gap" between x-axis line and bar...

    Click image for larger version

Name:	hist.png
Views:	2
Size:	35.6 KB
ID:	1543748



    Is there any way to control this gap with "graph" or "twoway" command, not "histogram"? Surely, I played with yscale and ylabel options, but did not work.

    I thought someone asked about this already. I tried to find a solution in Statalist, but couldn't find any.

    Thanks in advance.

  • #2
    Add:
    Code:
      plotregion(margin(zero))

    Comment


    • #3
      Scott Merryman, Thank you so much! It works like a charm!

      Comment

      Working...
      X