Hi All:
I'm trying to make some graphs and have encountered a problem (what seems to be a bug) in the use of subscripts with text in Stata graphs. If anyone knows of a fix I'd appreciate the help. Below are a few examples of what I've encountered. Note: (1) the graphs do not require datat, (2) I'm using Stata 15.
The Problem: Some subscripts appear as superscripts, or nearly superscripts (i.e., in the syntax below, the 2 for tau 2 and the 1 for the y 1 at xaxis=-10 appear as superscripts, while all of the other subscripts appear as expected).
Qualifications and tests:
(1) If "size(large)" is removed from the "text" specification in the above only the tau 2 superscript problem remains.
(2) If, instead of "text," I use "xlabel" to define the Tau labels at the bottom of the graph the problem described in (1) persists.
(3) Syntax for a similar graph, but with one vertical line and thus one tau label, works just fine (see below for syntax).
Syntax for (3)--below--works just fine:
I'm trying to make some graphs and have encountered a problem (what seems to be a bug) in the use of subscripts with text in Stata graphs. If anyone knows of a fix I'd appreciate the help. Below are a few examples of what I've encountered. Note: (1) the graphs do not require datat, (2) I'm using Stata 15.
The Problem: Some subscripts appear as superscripts, or nearly superscripts (i.e., in the syntax below, the 2 for tau 2 and the 1 for the y 1 at xaxis=-10 appear as superscripts, while all of the other subscripts appear as expected).
Code:
graph twoway /// (function y=normalden(x,0,4), range(-16 16) lw(medthick)), /// xline(3, lpattern(dash)) /// xline(-5, lpattern(dash)) /// text(.118 -5 "{&tau}{sub:1}", place(c) size(large)) /// text(.118 3 "{&tau}{sub:2}", place(c) size(large)) /// yscale(range(0 .11)) /// xlabel("") /// ylabel("") /// ytitle("") xtitle("") /// yscale(off) /// text(.107 -10 "y{sub:1} = 0", place(c) size(large)) /// text(.107 -1 "y{sub:1} = 1", place(c) size(large)) /// text(.107 8 "y{sub:1} = 2", place(c) size(large)) /// title({bf:B}, size(huge) ring(11) pos(11)) /// legend(off) name(panelB, replace) /// graphregion(fcolor(white)) plotregion(style(none))
(1) If "size(large)" is removed from the "text" specification in the above only the tau 2 superscript problem remains.
(2) If, instead of "text," I use "xlabel" to define the Tau labels at the bottom of the graph the problem described in (1) persists.
(3) Syntax for a similar graph, but with one vertical line and thus one tau label, works just fine (see below for syntax).
Syntax for (3)--below--works just fine:
Code:
graph twoway /// (function y=normalden(x,0,4), range(-16 16) lw(medthick)), /// xline(3, lpattern(dash)) /// xlabel(3 "{&tau}") /// yscale(range(0 .11)) /// ylabel("") /// ytitle("") xtitle("") /// yscale(off) /// text(.107 -8 "y{subscript:1} = 0", place(c) size(large)) /// text(.107 8 "y{subscript:1} = 1", place(c) size(large)) /// title({bf:A}, size(huge) ring(11) pos(11)) /// legend(off) name(panelA, replace) /// graphregion(fcolor(white)) plotregion(style(none))
Comment