Announcement

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

  • Having Y-axis in exponent scales

    Dear Statalist,

    I've been looking at the graphs manual and couldn't find an answer to this.

    I am reporting the mean of a variable (on the Y-axis) by year (on the X-axis).
    The mean varies hugely, from ~0 to ~500. If I do nothing, STATA's output isn't very informative, and you cannot make anything from it. However, I do not want to take the Natural log or scale that variable.

    In R, one can scale the Y-axis itself so instead of normal increments of say 0, 10, 20, 30 it will grow exponentially: 2, 4, 8, 16, 32 etc, with the space space between each tick.

    Can you please tell me if/how I can do that in STATA? (I am using the latest version).STATA is giving me this.docx

    I'm attaching a drawing of my issue. I hope it will make it clearer.

    Thank you in advance.







  • #2
    Please upload images in .png format, as advised in the FAQs.

    Code:
    webuse grunfeld, clear
    line invest year if company==1, ysc(log) scheme(s1mono) ylab(200 (200) 800 1200 1500)
    Click image for larger version

Name:	Graph.png
Views:	1
Size:	17.6 KB
ID:	1593243

    Comment


    • #3
      If your data really include 0, then a logarithmic scale won't work any way, although there are twists you can apply. I don't see the connection between 2 4 8 16 32 and your description of your data. Negative values (alone) could be plotted in terms of -log(-data).

      Comment

      Working...
      X