Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: A -graph twoway bar- equivalent of the -bargap- option?

From   "Nick Cox" <>
To   <>
Subject   RE: st: A -graph twoway bar- equivalent of the -bargap- option?
Date   Thu, 9 Mar 2006 11:35:56 -0000

In addition, recall that I posted a rough version 
of a -textbarplot- program in reply to an earlier 
question of the same kind. A better version of 
-textbarplot- will be added to the SSC archive 
shortly, at Kit Baum's convenience. It is just 
a wrapper for -twoway bar- with some bells and whistles. 

In the spirit of Austin's reply, note that 
since you can put the bars where you want
them and vary -barwidth()- too, you don't 
need an equivalent to -bargap()-, as the 
same, indeed more, flexibility is provided directly. 


Austin Nichols
> You can change the x-values so the bars overlap, or change the barw()
> option so they overlap, or some combination of the two.  Is that not
> what you had in mind?
> . sysuse sp500, clear
> . twoway bar high date in 1/4, yla(1300(20)1340) barw(1.5)
> . replace date= date+(2-_n)/3 in 1/4
> . twoway bar high date in 1/4, yla(1300(20)1340)
Hiroshi Maeda

> > I've been experimenting with and comparing -graph bar- and 
> -graph twoway
> > bar- commands for some time. I've noticed that -graph bar- has a
> > -bargap- option, whereby one can control a gap between bars 
> defined by
> > multiple y-variables. I find the ability of -bargap- to 
> make adjacent
> > bars overwrap each other (e.g. -bargap(-50)-) very 
> attractive. Although
> > I find the -graph twoway bar- more flexible, I haven't found its
> > equivalent of -bargap- in the Graphics manual.
> >
> > Is there any way to implement the -bargap- option available in the
> > -graph bar- command in the -graph twoway bar- command?

*   For searches and help try:

© Copyright 1996–2020 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index