<>
Just jitter the x-axis a bit and it works...
*************
clear*
input quintile total afi rfi
1 1096.83 717.27 .44
2 4045.8 1430.88 .35
3 5741.28 1747.3 .3
4 9429.86 2414.48 .27
5 19040.5 4688.59 .27
end
compress
list, noobs
clonevar quintiletotal=quintile
replace quintile=quintile+.15
replace quintiletotal=quintiletotal-.15
tw(bar total quintiletotal, barwidth(.25)) /*
*/ (bar afi quintile, barwidth(.25)) /*
*/ (line rfi quintile, yaxis(2) lcolor(blue)), /*
*/ xtitle(" ") legend(rows(1))
*************
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Ronnie
Babigumira
Gesendet: Dienstag, 29. September 2009 11:30
An: [email protected]
Betreff: st: Overlay connected line onto bar graph
Dear List
I am trying, without much luck, to re-create a chart a colleague has
produced in MS Excel. The data are
quintile total afi rfi
1 1096.83 717.27 .44
2 4045.8 1430.88 .35
3 5741.28 1747.3 .3
4 9429.86 2414.48 .27
5 19040.5 4688.59 .27
What they have done is overlay
-twoway connected rfi quintile- onto -gr bar tot afi, over(quintile)- to get
this
http://img24.imageshack.us/img24/2283/excelchart.png
How can I do this in Stata?
Ronnie
*
* 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/