Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: st: line on top of bar graph


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   AW: st: line on top of bar graph
Date   Thu, 18 Feb 2010 15:58:43 +0100

<> 


" You could use the graph editor to add a line on top of the bars."


Though you would have to draw the line by hand with the "Add line" tool,
which makes the whole process fairly unreliable. If you tried to edit the
y-axis properties, where there is a dialog geared towards adding a -yline-,
the initial problem of the line "popping under" would reappear.


HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Scott Merryman
Gesendet: Donnerstag, 18. Februar 2010 15:52
An: statalist@hsphsun2.harvard.edu
Betreff: Re: st: line on top of bar graph

You could use the graph editor to add a line on top of the bars.

Scott


On Thu, Feb 18, 2010 at 7:46 AM, Jeph Herrin <junk@spandrel.net> wrote:
>
> There must be a way to do this, but I can't seem to
> make it happen.
>
> I have a simple bar graph:
>
>  clear
>  set obs 1
>  gen var1=40
>  gen var2=60
>  graph bar var1 var2, bargap(20)
>
> and I want to add a reference line
>
>  graph bar var1 var2 , bargap(20) yline(30)
>
> The problem is, the added line goes *behind* the bars, and is
> mostly invisible. I want -yline- to go on top of the bars, but
> no combinatin of -yline- options or styles seems to make this
> happen. Any ideas?
>
> thanks,
> Jeph

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


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index