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


From   Davide Cantoni <[email protected]>
To   [email protected]
Subject   Re: st: Suppress labeling of categorical axis values in graph bar/hbar
Date   Mon, 20 Dec 2010 22:20:47 +0100

Thanks, Nick, Eric, and Roger!

On 20 December 2010 17:08, Nick Cox <[email protected]> wrote:
> There's an ancient Stata saying that if -graph bar- seems to block your path, back up and try an equivalent approach with -twoway bar-.
>

It was great to learn the difference between -twoway bar- and -graph bar-!

Getting back to the original solution proposed by Eric:

> > The other thing I wonder is how to get rid of the numbers on the
> > categorical axis. In your second code, which works fine, there are
> > still the ordinal numbers of each observation, instead of the names,
> > left. There's no way to suppress those?
> >
>
>
> There are no numbers for each "make" categorical observation on my graph -- I'm not sure how/why you see them.  Did you augment the code I sent?  I ran this with Stata 11 MP, Mac OSX, using the -scheme s2color- (though I don't know how this makes a difference).

> Make sure there is a space between the double quotes in the line (location of space marked with a capital X below for illustration):
>
> if !inlist(`n', 1, 20, 40, 60 , 74)  ///
> replace o`varname' = o`varname' + `" `n' "X" "'
>
> You may have lost that space when copy/pasting the code from your email client to your Stata do-file editor

I do have a number for each "make" categorical observation -- running
on Stata for Mac, either 9 or 10. I don't have 11, but maybe you can
try it out on your Mac with -version 10-? I definitely used your code
and did not suppress the space between double quotes.

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