Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: RE: European Characters & Graphs


From   "Nick Winter" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: European Characters & Graphs
Date   Thu, 19 Dec 2002 15:41:11 -0500

> What are most obviously on offer are shown by
> 
> forval i = 192/255 {
> 	di "`i'  " char(`i)
> }
> 

One should note that the set of characters that are displayable on the
command line and in the results window--which this will show you--is not
necessarily the same as the set of characters displayable on a graph.
Those displayable on a graph will be dependent on which font you have
selected for the display (and printing) of graphs.

This code will create a graph showing the mappings for the current
graph-font:

	clear
	set obs 255
	gen str1 lab=char(_n)
	gen x=_n
	gen x2=x-9
	gen y=mod(_n,20)
	gen num=_n
	graph x x2 y , s([lab][num])

Then, to include any of those characters in titles, legends, and the
like, you could do this:

	forvalues i=1/255 {
		local c`i'=char(`i')
	}

which assigns a local macro to contain each character.  Then if I wanted
to insert charcter 135 (capital S with a funny thing above it, on my
screen) in a title, I could do this:

	graph <<whategver>> , t1title("`c135' is a very funny
character")

--Nick Winter

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