Statalist


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

st: RE: exponents on graph axes


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: exponents on graph axes
Date   Wed, 30 Jan 2008 16:45:07 -0000

Stata does not support this explicitly, as far as I know, but that
doesn't matter much.  

Let's suppose your y values range from 1000 to 100,000,000 and you want 
to see "10^3" ... "10^8". Then loop over your powers and build up the
label: 

forval i = 3/8 { 
	local mylabel `mylabel' 10e`i' "10^`i'" 
} 

... , yla(`mylabel') ysc(log) 

The macro isn't compulsory and doing it on the fly is a little tedious
but also more transparent: 

... yla(10e3 "10^3" 10e4 "10^4") 

If you want to see the powers as superscripts, however, good question
and no solution from me except hacking PostScript.  

See also -mylabels- on SSC for some solutions to nearby problems. 

Nick 
[email protected] 

Feiveson, Alan H.

I would like to make a twoway graph on a log scale, but I don't
want numbers such as 1.0e+07, 1.0e+08, etc cluttering up my axes.
Instead I would like to have simply 10^7, 10^8, etc, as is seen in many
published graphs using log scales. Does Stata support this? Searching
help and the manuals, I don't see any kind of format that does this. 

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