Announcement

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

  • Positioning labels with addplot

    Dear users, I am struggling with the following problem

    I want to use coefplot to show the a set of coefficients (coming from different models) that I have stored. I would like to specify the label for each coefplot with the command addplot, but I am not figuring out how to do it.

    Here my code:

    Code:
    coefplot Asani_empt   Bsani_empt Csani_empt Gsani_empt  ||   Dsani_empt   Esani_empt Fsani_empt  ,  byopts(legend(off))  
    addplot 1: , legend(order(2 "a" 4 "b" 6 "c" 8 "d") on)  norescaling
    addplot 2: , legend(order(1 "e" 3 "f") on) norescaling
    I would like to put the legend at the bottom (position 6).

    Do you have any advise?

    Best and thanks, GP

  • #2
    Code:
    addplot 1: , legend(order(2 "a" 4 "b" 6 "c" 8 "d") on pos(6)) norescaling
    should work. Note that coefplot and addplot are from SSC (FAQ Advice #12).

    Comment


    • #3
      Dear Andrew, thanks for your tip.

      I tried your suggestion but the legend remains at the same place (position 3).

      Is there something I should specify within the command coefplot?

      Thanks a lot, Giorgio

      Comment


      • #4
        You can try:

        Code:
        ... byopts(legend(off)) legend(pos(6))
        or

        Code:
        ... byopts(legend(off) pos(6))
        If neither works, provide a reproducible example.

        Comment

        Working...
        X