Announcement

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

  • How to reverse axis in Stata graph

    Hi guys,

    Giving the attached picture as an example, currently the x axis is "fraction of the data", y axis is "Quantiles of Price".
    Now I want to reverse the axes (put "fraction of the data" vertically as the y axis, and put "Quantiles of Price" as the x axis)
    Could someone help me?

    Thanks a lot in advance!

    Stephen

  • #2
    In Stata reversing the axis refers to xsc(reverse) and/or ysc(reverse) which flip individual axes, left to right or top to bottom, as the case may be.

    You want to exchange axes, which is different. That plot is an (empirical (cumulative)) distribution plot. See (e.g.) distplot (SJ) . Note that the manual entry http://www.stata.com/manuals14/rdiagnosticplots.pdf refers you to related literature.

    Comment


    • #3
      Dear Nick Cox, thank you very much. This works!

      Comment


      • #4
        Nick Cox

        More generally, is it possible to exchange axes in a twoway graph? Assuming you already have it in Stata format? Or is there an option that does that when you draw it without having to change the variables?

        Comment


        • #5
          Belinda:

          If you mean decide that x should be y as vice versa,

          1. I know no quick fix here. Variable order needs to be changed; axis label, scale and title options all need to be flipped; other changes may be needed.

          2. That would have been better as a new thread, but that's a little deal.

          Comment

          Working...
          X