I am using geom_label_repel to add country labels to my scatterplot. However, when using it to only show certain countries, it works for some but not all of them. See figure below. Here is my code:
As you can see, for USA and FRA it works well. However, when I select "CHN" then China does not show up even though it's in the data and can be displayed when using labeling techniques different from geom_label_repel. Why is that?
I do not see the "CHN" filter in your code. Also, I'm not able to test your code since this is not a valid reprex. A reprex consists of the minimal code and data needed to recreate the issue/question you're having. You can find instructions how to build and share one here:
Yes it might be difficult to create a reprex as the issue might be due to overlapping bubbles for example. The problem only arises for some countries so when running the same code with "CHN" included in addition to "USA" and "FRA" none of the labels show up. So I was hoping someone would know why that could be the case.
yes I thought about that too and so I adjusted the max.overlaps to 0 as well as 1000 to see if it changes anything but unfortunately it doesn't. I also experimented with other parameters but couldn't make it work. I will see whether I can come up with a reprex.