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

Re: st: special character question

From   "Vladimir Vakhitov" <>
Subject   Re: st: special character question
Date   Sun, 30 Mar 2008 22:41:37 -0400


Try this:

local gr=char(176)
local t=2000
di as err "Core meltdown temperature is `t' `gr'C !!!"

I think you will get the required symbol by "C" and the idea in general.

The first 256 symbols values of the -char- function are revealed through:

forvalues i=0/255 {
local s=char(`i')
di "`i'   `s'"

There is an access to ASCII symbols from Stata. The issue here is that
the symbol you need is in the upper part of the table (128 to 255),
which is subject to change depending on the language settings of the
OS locale and Results window. For example, in my case this is
Cyrillic. If yours is Western (which is default), you may try 186
instead of 176 in my first example. Symbol 186 looks nicer, but it may
change if you convert you picture into wmf rather than png or jpg and
later re-open on a system with different language settings. Symbol 176
is smaller, but it is stable across different languages.


2008/3/30, Chris Witte <>:
> I've searched the statalist archives, and found information as to how to insert special characters into a title, legend, ect., but I would like to know if it is possible to insert special characters into the "mlabel' option in a twoway connected graph?  The variable I am using represents a temperature, and I would like to tag on a degree symbol with "C" to be displayed on the graph as XX degrees Celsius (instead of just XX).  Is this possible, or is there another way to get around creating a new variable that has these extra characters added onto the end of the numerical value, and using that variable in the mlabel option?
>  I am using version 9.2 in Windows
>  Thanks,
>  Chris
>       ____________________________________________________________________________________
>  You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.
>  *
>  *   For searches and help try:
>  *
>  *
>  *

Volodymyr Vakhitov
*   For searches and help try:

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