Announcement

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

  • Format axis to display date as "Apr-2018", etc

    I want to graph monthly time series, where I want the x axis to have verbal month and numeric year, like "Apr-2018", etc. I have set tsset, but I can not figure out how to achieve that format on x axis. The best I can do is 2012m4. Is there a way to get verbal month? Thank you!

  • #2
    Code:
    graph_command yvar month_var, xlabel(, format(%tmMon-CCYY))
    where month_var is a Stata internal format monthly date variable.

    Comment


    • #3
      Thank you! It worked!

      Comment


      • #4
        Is there any way to have this show up as two lines? Month on the first and year on second?

        Comment


        • #5
          Can you provide some example data using dataex?

          Comment


          • #6
            https://www.stata-journal.com/sjpdf....iclenum=gr0020

            Comment

            Working...
            X