Announcement

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

  • remove extra labels/keep certain labels for graphs

    Hi all,
    I want to draw multiple lines in one graph. Actually, I have more than 30 lines.
    At first, I want to label all of the lines. And the code is like
    legend(label(1 "") label(2 "")... label(30 ""))
    But later I found out that Stata only label at most 15 lines.

    So, I tried to remove labels for most of the lines, but keep 2 or 3 important ones.
    I don't know how to do this.
    legend(off) seems to remove all labels.

    Does anyone know how to do this?
    Thanks in advance.

  • #2
    Also, I realized that I can always do what I want in the graph editor.
    I'm just wondering whether I can do it through do.file
    Thanks a lot!

    Comment


    • #3
      Code:
      . webuse grunfeld, clear
      
      . xtline invest, overlay
      
      . xtline invest, overlay legend(order(3 7))

      Comment


      • #4
        Originally posted by Nick Cox View Post
        Code:
        . webuse grunfeld, clear
        
        . xtline invest, overlay
        
        . xtline invest, overlay legend(order(3 7))
        Thanks a lot!

        Comment

        Working...
        X