Announcement

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

  • marker label positions on twoway scatter plot

    Dear all,

    I need help regarding marker label in twoway scatter graph. I am familiar with mlabposition mlabvposition mlabangle. I have data for 29 countries, and my only request is that country names on the graph do not overlap. However I specify, clock positions, radnom clock positions, size of label, for some countries, due to close values, some labels overlap. Is there a possibility to specify some no overlap option? I do not care if labels are horizontal, vertical, or any clock position.

    Please find attached the command and the graph:

    twoway (scatter y x, sort msize(vsmall) mlabel(count) mlabsize(vsmall) mlabpos(clock)

    Thank you for your help.

    Best regards,
    Aleksandra
    Attached Files

  • #2
    Please note advice at https://www.statalist.org/forums/help#stata to post images as .png and data as a data example.

    Even with only 29 countries and two variables there is no universal solution, but note a mlabvpos() function in egenmore from SSC.

    If these were my data I would use two or three letter codes for countries and no marker symbol. See e.g. https://www.iban.com/country-codes

    If you posted the data people so minded could show you different solutions.

    Comment

    Working...
    X