Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overlapping pies #20

Open
cgdmkns opened this issue Jun 21, 2024 · 2 comments
Open

overlapping pies #20

cgdmkns opened this issue Jun 21, 2024 · 2 comments
Assignees

Comments

@cgdmkns
Copy link

cgdmkns commented Jun 21, 2024

Dear Tom,
Thanks for this package; it's convenient to use for great plots.
I've successfully created a map with pie charts representing the STRUCTURE results of my data. However, the pie charts are overlapping due to the close proximity of my populations. Is there a way to plot these pie charts separately, with lines or arrows pointing to their exact coordinates using mapmixture?
Thanks in advance,
Cigdem

@Tom-Jenkins
Copy link
Owner

Hi @cgdmkns,

To incorporate this is not trivial which is why the package does not currently support this. However, I am looking into how best to implement this programmatically in future versions.

It would be ideal to use ggrepel, but this package currently supports only text and label geoms. The pies in mapmixture are currently rendered on the map as annotation custom objects, because this allows users to easily project their maps to a different CRS without distortion of the pie charts.

Nevertheless, you could achieve your goal by (A) programming the pie chart positions manually, or (B) by plotting two maps where one is a zoomed-in map (you could then plot an inset map). If you provide your current code and a subset of your data, I could look into how you could approach option A.

@cgdmkns
Copy link
Author

cgdmkns commented Jun 26, 2024

Thanks for the quick reply! I understand that adding this feature is complex. I'll try to plot different maps and zoom in on the locations of the populations, as you suggested as option B. By the way, I sent you an email including a subset of my data and code.

Best regards,
Cigdem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants