Announcement

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

  • how to increase spreadness of scale labels in y-axis

    Hello there,

    In the graph attached, can you help me how i can move zero on the yaxis into the origin and one into the end of yaxis?
    Currently i simply used the option ylabel(0(.2)1) to the lfit but the labels on y axisis are not properly scattered. I want the scale on y-axis to be similar to the x-axis
    Attached Files
    Last edited by Anagaw Derseh; 20 Jul 2018, 02:00.

  • #2
    Try
    Code:
    aspectratio(1)

    Comment


    • #3
      Hi Scott Marryman,

      I tried code you suggested (aspectratio(1)) as an option but i found the following figure and that is not what i want. Here is my code:

      twoway scatter y x , mlabel(region) ylabel(0(.2)1) || lfit y x if region == "Afar" , lc(black) ylabel(0(.2)1) xlabel(0(.2)1) aspectratio(1)|| ///
      function p5 = `inter' + `slope' * x + `p5', ra(x) lc(orange) ylabel(0(.2)1) || ///
      function p95 = `inter' + `slope' * x + `p95', ra(x) lc(blue) ylabel(0(.2)1)



      Attached Files

      Comment


      • #4
        although "X" may be limited to the 0/1 range, it seems clear from your graphs that y is not so limited - but you have explicitly limited the labeling; you need to either restrict the y values to the 0/1 range or re-label

        Comment

        Working...
        X