Announcement

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

  • Note alignment in twoway graphs

    Dear statalisters,

    I would like to align some notes below a twoway graph. So far I have only been able to obtain left-aligned notes (see the attached graph). Notes as they are could be fine, but at the same time they are not very nice-looking. I was wondering whether there is a way to align them at the center, or whether I have to surrender to removing notes from the graph and add them in my latex file.

    I use STATA 14.0. The command is
    Code:
        #delimit ;
    
        twoway (kdensity asymm if asymm_FT !=., lcolor(navy) lwidth(medthick)) || 
        (kdensity asymm_FT, lcolor(emerald) lwidth(medthick) lpattern(dash_dot)), 
        ytitle("Density") 
        ytitle(, size(small) margin(medsmall)) 
        ylabel(, labsize(small) glwidth(vthin) glcolor(gs15))
        xtitle("Asymmetry in ECP") 
        legend(order(1 "Full sample (lmt)" 2 "F&T 2010 sample") size(small)) 
        graphregion(fcolor(white) lcolor(white))
        note("lmt = Only Felbermayr and Toubal 2010s sample is plotted." "Asymmetry is computed on the full sample available");
    Thanks a lot for any help,

    Filippo
    Attached Files

  • #2
    How much of the total probability is lost because smoothed beyond zero? Better to smooth on log scale and back-transform? See tkdensity (SSC)

    Documented that note() allows pos() and ring() suboptions:

    tinfo is

    "string" ["string" [...]] [, suboptions]

    string may contain Unicode characters and SMCL tags to render mathematical symbols, italics, etc.; see
    [G-4] text.

    suboptions Description
    ----------------------------------------------------------------------------------------------------------
    prefix and suffix add to title text
    position(clockposstyle) position of title -- side
    ring(ringposstyle) position of title -- distance
    span "centering" of title
    textbox_options rendition of title


    Code:
    sysuse auto, clear
    scatter mpg weight, note(This note is centered, pos(6)) caption(British people say centred, pos(6))
    Last edited by Nick Cox; 16 Jan 2019, 10:23.

    Comment


    • #3
      Dear Nick Cox,

      Thank you very much for both the tkdensity recommendation and the note's suboptions...I completely missed them so far!

      Best,

      Filippo

      Comment

      Working...
      X