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

Add PhyloPic base R legend #99

Merged
merged 9 commits into from
Jan 3, 2024
Merged

Add PhyloPic base R legend #99

merged 9 commits into from
Jan 3, 2024

Conversation

LewisAJones
Copy link
Collaborator

This PR adds the function add_phylopic_legend(). It allows users to add a legend using PhyloPic silhouettes to base R. The function makes use of legend() and add_phylopic_base() to do most of the groundwork. I’ve tried to make the function as flexible as possible while also trying to maintain ease of use. Note, I’ve forced some arguments from legend() to be ignored to avoid any undesirable behaviour.

Closes #83.

@LewisAJones LewisAJones added this to the 1.3.0 milestone Dec 21, 2023
@LewisAJones LewisAJones self-assigned this Dec 21, 2023
@LewisAJones LewisAJones linked an issue Dec 21, 2023 that may be closed by this pull request
Copy link
Collaborator

@willgearty willgearty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks @LewisAJones! I noticed that the location of the phylopics seems a little off, especially when the legend is on the left side of the plot. I also made some suggestions that I think would make the function more user-friendly.

R/add_phylopic_legend.R Outdated Show resolved Hide resolved
R/add_phylopic_legend.R Outdated Show resolved Hide resolved
R/add_phylopic_legend.R Show resolved Hide resolved
R/add_phylopic_legend.R Outdated Show resolved Hide resolved
@LewisAJones
Copy link
Collaborator Author

Thanks for the quick review and constructive feedback @willgearty! I’ve gone ahead and implemented your changes. Let me know if you see any final tweaks needed!

Copy link
Collaborator

@willgearty willgearty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick changes @LewisAJones! Everything looks good to me, great job!

@willgearty willgearty merged commit 030b5e8 into main Jan 3, 2024
11 checks passed
@willgearty willgearty deleted the base-legend branch January 3, 2024 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

silhouette legend for base R
2 participants