Announcement

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

  • How to change a line pattern within a same graph?


    Hi,
    I would like to plot a graph using
    Code:
    twoway line
    and draw a different graph pattern after a certain year.
    I am expecting the graph would be shaped in a solid line between 2000 and 2015. After 2015, the graphs would be like a dash line. I hope the attached image helps for understanding.

    I know the
    Code:
    lpattern(dash)
    works to change its pattern but it does not work with
    Code:
    in range()
    .

    Thank you.


    Attached Files

  • #2
    You can use the -if- qualifier for part of the line, but with a small number of data points, the problem becomes one of interpolation. See, for example, https://www.statalist.org/forums/for...ts-of-the-line

    Comment


    • #3
      I appreciate your comment. That works well!

      Comment

      Working...
      X