Hi Stata users,
I am interested in suppressing marker labels in scatter plots based on some condition because the labels become unreadable in clusters.
Here is a replicable example:
What I had hoped would work was:
However, -if- is not allowed in the options for -scatter-.
Another way I tried was
but the -overlay- option is not allowed.
Any suggestions?
Thank you!
I am interested in suppressing marker labels in scatter plots based on some condition because the labels become unreadable in clusters.
Here is a replicable example:
Code:
sysuse auto, clear twoway scatter mpg price, mlabel(make)
Code:
twoway scatter mpg price, mlabel(make) if price >= 10000
Another way I tried was
Code:
twoway scatter price mpg if price < 10000 , overlay addplot(twoway scatter price mpg if price >= 10000, mlabel(make) )
Any suggestions?
Thank you!
Comment