Statalist


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

st: AW: lpattern() option doesn't work in -twoway bar-?


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: AW: lpattern() option doesn't work in -twoway bar-?
Date   Wed, 27 May 2009 16:53:14 +0200

<> 

You can also get the opposite behaviour...

*************
sysuse auto, clear
collapse price, by(rep78)
twoway (bar price rep78 if rep78 < 3, barwidth(0.8)) ///
  (bar price rep78 if rep78 >= 3, lpattern(dash) lcolor(black) ///
  fcolor(white) lwidth(medthick) barwidth(0.8)), ///
  name(first, replace) nodraw

sysuse auto, clear
separate price, by(rep78>=3)
graph bar (mean) price0 (mean) price1, over(rep78)/* 
 */  nofill bar(2, fcolor(none) lcolor(black)/* 
 */  lwidth(medthick) lpattern(dash)) legend(on)  /* 
 */  name(second, replace) nodraw
 
 gr combine first second
*************



HTH
Martin

-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Eva Poen
Gesendet: Mittwoch, 27. Mai 2009 16:35
An: Statalist
Betreff: st: lpattern() option doesn't work in -twoway bar-?

Dear all,

yesterday I stumbled across the following on an up-to-date Stata 10.1:

***
sysuse auto, clear
collapse price, by(rep78)
twoway (bar price rep78 if rep78 < 3, barwidth(0.8)) ///
  (bar price rep78 if rep78 >= 3, lpattern(dash) lcolor(black) ///
  fcolor(white) lwidth(medthick) barwidth(0.8))
***

On my machine, only the legend for the white bars has a dashed
outline, not the actual bars on the graph itself. It's the same for
any other pattern.

On the other hand,

graph bar (asis) price, over(rep78) bargap(0.2) bar(1, fcolor(white) ///
  lcolor(black) lwidth(medthick) lpattern(dash))

produces bars with a dashed outline.
Have I missed something very basic here?

Thanks,
Eva
*
*   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   |   What's new   |   Site index