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: Suppress labeling of categorical axis values in graph bar/hbar


From   Davide Cantoni <[email protected]>
To   [email protected]
Subject   st: Suppress labeling of categorical axis values in graph bar/hbar
Date   Sat, 18 Dec 2010 22:13:07 +0100

Hello,

I would like to draw a bar chart displaying the values of a given
variable for all the observations in the dataset. However, since there
are many observations, I would like to label only some of them (some
representative cases). Conceptually, this is similar to this working
example:

*** begin example
sysuse auto, clear
graph hbar (asis) price, over(make, sort(price))
*** end example

As you can see, putting all the labels on the categorical axis leads
to overcrowding. What I would like to do is to label only some
representative examples, e.g. only "Renault Le Car", "VW Diesel" and,
say, "Lincoln Versailles".  I guess I can achieve the suppression of
labels with some relabel() command inside the over() parenthesis, but
given the large number of observations, this would be incredibly
cumbersome. Any other suggestions?

Thanks in advance,

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