Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: mylabels axis label alignment with comma format


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: mylabels axis label alignment with comma format
Date   Fri, 13 Sep 2013 07:28:59 +0100

Can you show us the contents of the local macro? Is -mylabels- producing a crazy macro or -kdensity- being awkward? (I can't experiment with Stata right now.)

On 13 Sep 2013 at 03:39, "Dimitriy V. Masterov" <[email protected]> wrote:

I am having trouble getting small values to align correctly when using
the comma format and Nicholas Cox's -mylabels-. The first kernel
density plot below looks great, but when I try to format the axis
labels, the numbers on the left drift too far to the right.

sysuse auto, clear
replace price = price/100 if price <5000
gen lnp=ln(price)
mylabels 1 300 6000 18000, myscale(ln(@)) local(labels)
kdensity lnp, xlabel(`labels')
mylabels 1 300 6000 18000, myscale(ln(@)) local(labels) format(%6.0fc)
kdensity lnp, xlabel(`labels')


DVM
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index