Announcement

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

  • highlighting a specific serie in a panel graph

    Hi Statalisters,


    Is the a simple way to highlighting the serie id = 160 ,in the following a panel graph?

    Code:
    clear
    webuse pennxrate
    drop if inlist(id,143,171)
    xtline ppp, overlay legend(off)
    by highlighting, I mean plotting a thicker line, for instance.

    thanks


  • #2
    I found it difficult to get series 160 to show clearly by addling options to xtline. Here is a more direct approach:

    Code:
    line ppp year, lw(thin) lc(gs8) c(L) || line ppp year if id == 160, lw(vthick) legend(order(2 "160"))

    Comment


    • #3
      Yes Nick, I, also, was not able to implementing it using

      Code:
      addplot(plot)            add other plots to the generated graph
      option, in xtline command.

      Wondering someone else did it once.

      thanks for your reply.


      Comment


      • #4
        this seems to work:

        Code:
        xtline ppp, overlay legend(off) addplot(line ppp year if id == 160, lw(vthick) legend(order(2 "160")))
        to highlighting the serie id = 160.

        Comment


        • #5
          fabplot

          Comment


          • #6
            Sure; #4 works, but I don't think it's clear.

            Comment

            Working...
            X