Announcement

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

  • How to create markers with xtline

    Hey,

    I have a panel data set and I would like to create a graph. Therefore, I used the "xtline" command. The problem is that I would like to add markers for each value I have in the sample. For a other graph I used the "twoway line" command and the option "msymbol(X)". However, this option seems to be unavailable for the "xtline" command (error message: "option msymbol() not allowed") . Is there a way to add markers to my graph with the "xtline" command?

    Thanks in advance!

    Best regards,
    Sebastian

  • #2
    If you add the option

    [CODE}
    recast(connected)
    [/CODE]

    marker symbols will be shown and can be varied.

    Please note the strong preference for full real names here, i.e. family name as well as given name. See FAQ Advice Section 6.

    Comment


    • #3
      Hi,

      I have the same query. In order to vary the marker symbols, how do I add them?

      I have tried code recast(connected) msymbol(Oh S T + - x Dh)

      recast(connected), msymbol(Oh S T + - x Dh)

      recast(connected,msymbol(Oh S T + - x Dh))

      It doesn't seem to change the marker symbols. Thanks.

      Best,

      Comment


      • #4
        help xtline explains.

        Code:
        . webuse grunfeld
        
        . xtset
               panel variable:  company (strongly balanced)
                time variable:  year, 1935 to 1954
                        delta:  1 year
        
        . xtline invest
        
        . set scheme s1color
        
        . xtline invest, ysc(log) overlay recast(connected)
        
        . xtline invest if company <= 3, ysc(log) overlay recast(connected) plot1opts(ms(Oh))  plot2opts(ms(Dh)) plot3opts(ms(Th))

        Comment


        • #5
          Thank you. It worked.

          Comment

          Working...
          X