I would like to label specific points on a line graph.
I have two graphs. One is a panel line graph with overlay.
Code: xtline homosfree if partyvoted1<10, overlay

I'd like to label only the first and last value for "homosfree" on each line.
I tried adding a scatterplot to the panel line graph.
Code:
generate marker=.
replace marker = homosfree if year1==2002
replace marker = homosfree if year1==2020
xtline homosfree if partyvoted1<10, overlay addplot(scatter homosfree year1, mlabel(marker))
It produces this graph:

But I cannot hide individual labels and markers for the values between the earliest and latest years. Even missing values are labeled ".".
How do I suppress specific or individual makers and labels for specific values in this line graph? Can I do this in the graphing editor?
Thanks.
I have two graphs. One is a panel line graph with overlay.
Code: xtline homosfree if partyvoted1<10, overlay
I'd like to label only the first and last value for "homosfree" on each line.
I tried adding a scatterplot to the panel line graph.
Code:
generate marker=.
replace marker = homosfree if year1==2002
replace marker = homosfree if year1==2020
xtline homosfree if partyvoted1<10, overlay addplot(scatter homosfree year1, mlabel(marker))
It produces this graph:
But I cannot hide individual labels and markers for the values between the earliest and latest years. Even missing values are labeled ".".
How do I suppress specific or individual makers and labels for specific values in this line graph? Can I do this in the graphing editor?
Thanks.
Comment