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: hbar & labels


From   María Edo <[email protected]>
To   [email protected]
Subject   st: hbar & labels
Date   Mon, 21 Mar 2011 09:02:16 -0300

Hello,

I have a horizontal graph bar in which each bar represents the total
population for a certain age (from 10 to 99 years).
Labels are too many (10 to 99) and make the graph look messy.
I would like to reduce the number of labels that appear in the graph,
for instance, only multiples of 5 (10, 15, 20, ....99)

My code is the following:

input age totpop
10  100
11  200
12  150
13   300
14   220
15   330
end
graph bar totot, over(age, label(alternate labsize(*.5)) )

Let´s say, in this small dataset case, I would only like the labels
"10" and "15" to appear.
I am sure there is a trivial way of achieving this, but I haven't been
able to find it.
Many thanks,

Maria

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


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