Announcement

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

  • Remove axes from twoway with by()

    Hi,

    Any ideas on how to remove the x-axis from all panels in a twoway graph with the by-option? I have tried the following and xscale(off) did nothing:

    Code:
    sysuse auto, clear
    twoway scatter price mpg, by(foreign, note("")) xscale(off)
    Thank you!

  • #2
    Is this enough?

    Code:
    twoway scatter price mpg, by(foreign, note("")) xla(none)

    Comment


    • #3
      Originally posted by Nick Cox View Post
      Is this enough?

      Code:
      twoway scatter price mpg, by(foreign, note("")) xla(none)
      I would prefer to remove the axis completely, but definitely an improvement. Thank you!

      Comment


      • #4
        Whatever removing the axis completely means, you need to be specific. The interpretation here is no x-title and no line drawn on the x axis.

        Code:
        twoway scatter price mpg, by(foreign, note("")) xla(none) xtitle("") xsc(noline)

        Comment


        • #5
          Originally posted by Andrew Musau View Post
          Whatever removing the axis completely means, you need to be specific. The interpretation here is no x-title and no line drawn on the x axis.

          Code:
          twoway scatter price mpg, by(foreign, note("")) xla(none) xtitle("") xsc(noline)
          As stated in the first post, I would like to achieve the equivalent of xscale(off), if that option had worked with by(). Your code seems to do the trick, so thank you!

          Comment

          Working...
          X