Statalist The Stata Listserver


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

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


From   "Michael Blasnik" <[email protected]>
To   <[email protected]>
Subject   st: Re: Tip - Special characters in labels, titles of graphs &c
Date   Tue, 12 Dec 2006 07:17:43 -0500

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

----- Original Message ----- From: "Paul Seed" <[email protected]>
To: <[email protected]>
Sent: Tuesday, December 12, 2006 6:35 AM
Subject: st: Tip - Special characters in labels, titles of graphs &c



It has been a bugbear of mine for some time that it seems
impossible to get special characters where I want them within Stata.
In particular the "mu" in "micromol/L", and the "superscript 2" in
"BMI (kg/m2)". I can remember some discussion previously on Statalist,
but no solution that I could track down. Maybe I've missed something

One approach, that I have just discovered, is to use
the Symbol command from the Insert menu within Word.
Then choose font arial and subset "basic Greek" to find "mu"; copy and paste
it into your Stata command as desired.
"superscript 2" is given similarly in the subset Latin-1.
As these symbols are likely to cause problems on some e-mail servers, I
have not inserted them here.
*
*   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