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]

st: mylabels axis label alignment with comma format


From   "Dimitriy V. Masterov" <[email protected]>
To   Statalist <[email protected]>
Subject   st: mylabels axis label alignment with comma format
Date   Thu, 12 Sep 2013 19:39:54 -0700

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/


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