Statalist The Stata Listserver


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

Re: st: Re: RE: Special character in a plot's legend


From   "Svend Juul" <[email protected]>
To   <[email protected]>
Subject   Re: st: Re: RE: Special character in a plot's legend
Date   Wed, 24 Jan 2007 17:33:37 +0100

Michael wrote:
 
I just wanted to add to this by repeating a little code 
I posted last month to address this issue of special characters
that makes it quite simple to find the ASCII code for the
character you want and doesn't require changing the results
window font to match the graph window font.
--------------------------------------------------------------
 
Michael's graph is a beauty. I think, however, that the
following is even prettier.
 
Svend
 
clear
set obs 223
gen asciin=_n+32
gen ascii=char(asciin)
gen x=int(asciin/10)
gen y=mod(asciin,10)
 
set scheme lean1  // ( -findit lean scheme- )
 
twoway scatter y x , msymbol(i) ///
  mlab(ascii) mlabpos(0) mlabsize(large) ///
  ylabel(0(1)9 , nogrid notick) ymticks(-0.5(1)9.5 , grid) ///
  xlabel(3(1)25 , nogrid notick) xmticks(2.5(1)25.5 , grid) ///
  xtitle("First Digit(s) of ASCII Code") ///
  ytitle("Last Digit") ///
  xsize(6) ysize(4) plotregion(margin(zero))

 
________________________________________________________ 
 
Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6 
DK-8000 Aarhus C,  Denmark 
Phone, work:  +45 8942 6090 
Phone, home:  +45 8693 7796 
Fax:          +45 8613 1580 
E-mail:       [email protected] 
_________________________________________________________ 

*
*   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