Announcement

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

  • Ytitle options don't work on tsline graph

    Dear Forum members,

    This problem drives me crazy. The position and size for ytitle on my graph cannot be edited. I really tried everything. (I'll take care of xlabel later.) Here's the code:

    xtset cntry year
    set scheme s1mono
    graph twoway (tsline delibdem if cntry==157 & year>=2004, recast(connected) ylabel(, labsize(small)) lpattern(solid) msymbol(O)) ///
    (tsline delibdem if cntry==210 & year>=2004, recast(connected) ylabel(, labsize(small)) lpattern(shortdash_dot) msymbol(D)) ///
    (tsline delibdem if cntry==173 & year>=2004, recast(connected) ylabel(, labsize(small)) lpattern(shortdash) msymbol(T)) ///
    (tsline delibdem if cntry==17 & year>=2004, recast(connected) ylabel(, labsize(small)) lpattern(dash_dot) msymbol(S)) ///
    (tsline delibdem if cntry==202 & year>=2004, recast(connected) ylabel(, labsize(small)) lpattern(dot) msymbol(X)) ///
    (tsline delibdem if cntry==100 & year>=2004, recast(connected) ylabel(, labsize(small)) lpattern(dash) msymbol(A)), ///
    legend(label(1 "Czechia") label(2 "Hungary") label(3 "Lithuania") label(4 "Poland") label(5 "Slovenia") label(6 "Ukraine") ///
    region(lwidth(none)) col(2) rows(3) colgap(15) size(vsmall) ring(0) pos(7)) xlabel(2004(1)2021, labsize(small)) ylabel(0(0.1)1) ///
    ytitle("Deliberative democracy component index", size(medium)) xtitle("")


    Can anyone help? Thanks!
    Click image for larger version

Name:	delib_cee_tsline1.png
Views:	1
Size:	183.6 KB
ID:	1683463

    Last edited by Rafael Labanino; 27 Sep 2022, 05:00.

  • #2
    I found the solution. It must be a bug because I use Stata 15 on an M1 (and not Intel) Mac. The graph is shown incorrectly even in Stata's own graph window and in png format, but correctly when it is exported in eps format. Luckily, eps format is the preferred one by most journals. So, the code is correct after all.

    Comment


    • #3
      In eps format everything is as it supposed to be.
      Click image for larger version

Name:	Bildschirmfoto 2022-09-28 um 09.51.41.png
Views:	1
Size:	133.2 KB
ID:	1683575
      Last edited by Rafael Labanino; 28 Sep 2022, 01:52.

      Comment

      Working...
      X