Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

re: st: Re: Tip - Special characters in labels, titles of graphs &c


From   David Airey <[email protected]>
To   [email protected]
Subject   re: st: Re: Tip - Special characters in labels, titles of graphs &c
Date   Tue, 12 Dec 2006 08:34:12 -0600

You can refer to them using the char() function. In Arial, I believe that mu is char(181) and superscript 2 is char(178). For convenience, especially if you want to use these characters repeatedly, you may want to load them into local macros prior to the graph command:

local mu=char(181)
local squared=char(178)

graph tw scatter weight mpg , title("here is mu: `mu', here is mpg squared: mpg`squared' ")

When you used MS Word to access these characters, you may have noticed that the dialog box shows you the way to directly enter each special character using a alt-###. Those numbers are the same as the numbers you should feed Stata's char() function.

M Blasnik



The char(178) doesn't work on my Mac. Char(181) does.


local mu=char(181)
local squared=char(179)
sysuse auto
graph tw scatter weight mpg , ///
title("here is mu: `mu', here is mpg squared: mpg`squared'")

-Dave
Oops. Neither does char(179) work.
*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index