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

From |
"Scott Merryman" <scott.merryman@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: graph added text behaving strangely |

Date |
Fri, 26 Oct 2007 16:46:33 -0500 |

I missed the -hbar- part. It appears that the second and third text element are horizontal at 20% of the x-axis and at the 15 and 10 location on the y-axis. The first element is at 25% of the x-axis and at the 20 location on the y-axis. If -graph bar- is used they are all on horizontal line. -graph hbar mpg, over(head) text( 20 25 "20_25" 15 20 "20_15" 10 20 "20_10") bar(1, fcolor(gs15)) - the text element are in a vertical line. -graph hbar mpg, over(head) text(25 20 "20_25" 20 15 "20_15" 20 10 "20_10") bar(1, fcolor(gs15)) - the text elements are in a horizontal line. Note in both cases I have had to reverse the order the x and y location for the first element. Or, this works as well: -graph hbar mpg, over(head) text(25 20 "" 25 20 "20_25" 15 20 "20_15" 10 20 "20_10") bar(1, fcolor(gs15))- Scott On 10/26/07, Dan Weitzenfeld <dan.weitzenfeld@emsense.com> wrote: > Scott, > > I expected 50_59 to be above 50_50 because in a horizontal bar chart, > the categorical axis is called the x axis, even though it is vertical. > > I have managed to produce a triangle while varying only one coordinate > in the auto.dta dataset: > > sysuse auto,clear > graph hbar mpg, over(head) text( 20 25 "20_25" 20 15 "20_15" 20 10 > "20_10") bar(1, fcolor(gs15)) > > Are you getting a triangle or a straight line when you run that code > (is it a problem with my version/install of stata? I'm using 10.0...) > > Thanks, > Dan > > > * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: graph added text behaving strangely***From:*"Dan Weitzenfeld" <dan.weitzenfeld@emsense.com>

**References**:**st: graph added text behaving strangely***From:*"Dan Weitzenfeld" <dan.weitzenfeld@emsense.com>

**Re: st: graph added text behaving strangely***From:*"Scott Merryman" <scott.merryman@gmail.com>

**Re: st: graph added text behaving strangely***From:*"Dan Weitzenfeld" <dan.weitzenfeld@emsense.com>

- Prev by Date:
**st: Infile errors** - Next by Date:
**Re: st: graph added text behaving strangely** - Previous by thread:
**Re: st: graph added text behaving strangely** - Next by thread:
**Re: st: graph added text behaving strangely** - Index(es):

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