Announcement

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

  • How to put integer ticks on y-axis on right places?

    Good morning, good afternoon, and good evening everyone in world.
    This forum always helpful and I would like to thank you on this board. I write this post because it is the first time I cannot find even any clue about my problem.


    I have a quick question to adjust my graph. Please look at the ticks on y-axis in following graph.

    Click image for larger version

Name:	Fig1_global_warming.png
Views:	1
Size:	131.0 KB
ID:	1723597



    Ticks with decimal point are on the exactly left of the gradation, but ticks in integers are not: slightly over the corrsponding gradations.

    how can I move the integer ticks to the right-left of the corresponding gradation?

    One subordinary question is that,
    Can I make a space (or gap) between the legend box and the note saying " Source: NASA's Goddard Institute for ... (GISS). "

    The code drawing the graph in the followings:
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    graph twoway connected raw year, msize(tiny) lwidth(vthin) lc(gs13) || ///
    lowess raw year, bw(.1) ///
    xlabel(1880(20)2020, labsize(small)) ylabel(-0.4(0.2)1.0, angle(0)) xtitle(year) ytitle(Temperature Anomaly (C)) title("Global Land-Ocean Temperature Index") ///
    xline(1880(20)2020, lc(bluishgray)) xsc(titlegap(*20)) ///
    legend(label(1 "Annual mean") label(2 "LOWESS smoothing")) note(Source: NASA's Goddard Institute for Space Studies (GISS))
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    I omit the dataset, because there is no room for confusing. (It consists of only two column: year and annual temperature index.)


    Thanks, in advance!
    Regards, Myeong-Hwan.

  • #2
    I've never seen a problem like that. So, I think we do need your data to see whether we can reproduce the problem.

    Comment


    • #3
      Hi. Nick.
      I attach the data drawing the figure, and I also attach the do-file.
      The data is public data, provided by NASA. So, I think there is no problem to upload on web.

      Thank you for your attention!
      Attached Files

      Comment


      • #4
        Dear Nick.

        I just re-setup the STATA. (upgrade from ver17 to ver18 at the same time.)
        I solved the problem.

        Thank you for reading.
        Sincere.

        Comment

        Working...
        X