Hi, I'm trying to add orginial data to xtline. Sometimes a unit exhibits a constant variable over severals years, and here I want to distinguish whether a flat line is due to, say 5 consecutive same values or due to only 2 same values with 3 gaps in between. I managed to code something like this in another software. For the green case, there are 3 years data for 5 year with gaps in between.
How can I finally modify the colour of data points? Sometimes data overlaps, and I need colour to distinguish between cases. I also don't need the additional var-label in the legend, which is created automatically. Here is some similar MWE:
Best regards
How can I finally modify the colour of data points? Sometimes data overlaps, and I need colour to distinguish between cases. I also don't need the additional var-label in the legend, which is created automatically. Here is some similar MWE:
Code:
clear input year pid var 2003 513 1500 2004 513 1550 2005 513 1500 2006 513 1600 2003 514 1600 2004 514 1600 2005 514 1700 2006 514 1800 end xtset pid year xtline var, overlay addplot(scatter var year)
Comment