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: Re: Problem with -graph bar- and yscale(log) option


From   Nick Cox <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   RE: st: Re: Problem with -graph bar- and yscale(log) option
Date   Wed, 5 Oct 2011 16:40:43 +0100

I agree broadly with Maarten. It is difficult for me to see that bar charts mix with log scales at all. The key idea is naturally that bars encode magnitudes relative to some origin. If there is no origin, relative bar lengths just depend on some arbitrary choices about axis limits. 

On the other hand, this is precisely where -graph dot- can be useful. 

Nick 
[email protected] 

Maarten Buis

Such bar graphs by default include 0 on the y-axis, which makes sense
for such graphs but does not have an equivalent on a log-scale leading
to the problem you noticed. You can avoid 0 by adding the -exclude0-
option, but now it is up to you to decide whether that graph still
makes sense.

On Wed, Oct 5, 2011 at 3:23 PM, Aleksander Rutkowski wrote:

> I am using Stata/SE 11.2 on Windows. I have noticed that using -graph
> bar- with yscale(log) option produces very bad results: bars of equal
> height with unreadable y-axis labels (overlaid at the same point). As
> an illustration:
>
> sysuse auto
> graph bar (mean) trunk, over(foreign) yscale(log)
>
> Is it a bug or am I doing something wrong?

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