Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Position of different legends for compact coefplots

    Hi,

    How can I combine multiple coefplots, each with its own legend positioned just below the corresponding plot (instead of the default placement on the right-hand side)?

    Thanks

    Code:
    sysuse auto
    eststo: reg mpg trunk length turn
    eststo: reg mpg trunk length turn if foreign==0
    eststo: reg mpg trunk length turn if foreign==1
    eststo: reg mpg trunk length turn if rep78==3
    eststo: reg mpg trunk length turn if rep78==4
    eststo: reg mpg trunk length turn if rep78==5
    coefplot est1 || est2 est3 || est4 est5 est6, drop(_cons) norecycle byopts(compact rows(1) legend(off))
    addplot 2: , legend(order(3 "Domestic" 5 "Foreign") on) norescaling
    addplot 3: , legend(order(7 "rep78=3" 9 "rep78=4" 11 "rep78=5")) norescaling
    Click image for larger version

Name:	graph3.png
Views:	1
Size:	47.0 KB
ID:	1768905

Working...
X