What's available to you is visible by setting the font
to that you want to use and displaying all possible characters
forval i = 1/256 {
di "`i' " char(`i')
}
Your first method should work in general (local sigma =, etc.).
"`char(228)'" will never work. You need to try "`= char(228)'".
Nick
[email protected]
MA V
> I am having some trouble adding a special character to a
> legend in a plot.
> Following the suggestion from a previous post, what I am doing is:
> local sigma=char(228)
> twoway histogram sig, den || spike max true, by(X)
> legend(label(2 "True"))
> yti(Density) xti("`sigma' for sets")
>
> But, only a blank space appears where the character should be (in the
> legend).
>
> I also tried
> twoway histogram sig, den || spike max true, by(X)
> legend(label(2 "True"))
> yti(Density) xti("`char(228)")
> but it didn't work...
>
> I also read that this might happen for some fonts so I tried
> the same thing
> after changing the graph preferences to "Arial" and "Times
> New Roman" but
> this also didn't work.
>
> Any idea of what I'm doing wrong?
>
> Also, is there any way of adding subscripts in a legend?
> Note: I am using Stata9 for MAC
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/