Announcement

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

  • Suppressing Individual Marker Labels

    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

    Click image for larger version

Name:	Graph1.jpg
Views:	2
Size:	343.4 KB
ID:	1697198

    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:


    Click image for larger version

Name:	Graph2.jpg
Views:	1
Size:	386.9 KB
ID:	1697199


    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.

    Attached Files

  • #2
    Code:
    xtline homosfree if partyvoted1<10, overlay addplot(scatter homosfree year1, mlabel(marker) msymbol(i))

    Comment

    Working...
    X