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

Re: st: special character question

From   Chris Witte <>
Subject   Re: st: special character question
Date   Sun, 30 Mar 2008 20:06:14 -0700 (PDT)

forgive me if I'm making a rookie error, but I can't get these local macros to work in the "mlabel" option of a twoway connected graph.  The manual states the correct syntax is: mlabel(varlist).  How do I include the macro into the varlist?  Below is part of my graph code, where "temp" is my variable noting the temperature value to be used as my marker label:

(connected mmtl time if study=="one" & sex=="f" & trt==1, lcolor(blue) lpattern("_####") lwidth(thick) msymbol(point) mcolor(gs0) mlabel(temp) mlabsize(large) mlabcolor(gs0))


----- Original Message ----
From: Vladimir Vakhitov <>
Sent: Sunday, March 30, 2008 9:41:37 PM
Subject: Re: st: special character question


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:

Special deal for Yahoo! users & friends - No Cost. Get a month of Blockbuster Total Access now
*   For searches and help try:

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