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   "Michael Blasnik" <[email protected]>
To   <[email protected]>
Subject   Re: st: Re: RE: Special character in a plot's legend
Date   Wed, 24 Jan 2007 12:14:24 -0500

I like your tweak of the grid and also an offlist suggestion from Kit Baum about reversing the yscale which I added to by swapping the x and y to make the resulting graph read from left to right and top to bottom. Here's the revised graph command:

twoway scatter x y , msymbol(i) mlab(ascii) ///
mlabpos(0) mlabsize(large) ///
xlabel(0(1)9 , nogrid notick) xmticks(-0.5(1)9.5 , grid) ///
ylabel(3(1)25 , nogrid notick angle(h)) ymticks(2.5(1)25.5 , grid) ///
yscale(reverse) ytitle("First Digit(s) of ASCII Code") ///
xtitle("Last Digit") ysize(6) xsize(4) plotregion(margin(zero))

I like the lean schemes to and use my own variant on my machine, but think that it might be best to let people use their own scheme and just make sure that the ylabels are horizontal. I plan to submit this to SSC as soon as I can write up a help file.

Michael Blasnik

----- Original Message ----- From: "Svend Juul" <[email protected]>
To: <[email protected]>
Sent: Wednesday, January 24, 2007 11:33 AM
Subject: Re: st: Re: RE: Special character in a plot's legend


<snip>

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

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