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 border color to pie spots #45

Open
JThomasWatson opened this issue Dec 4, 2023 · 1 comment
Open

Add border color to pie spots #45

JThomasWatson opened this issue Dec 4, 2023 · 1 comment

Comments

@JThomasWatson
Copy link

Hi, I enjoy these plots quite a bit. Thank you for making the package! Is it possible to change the border color (what geom point calls "color," not "fill") based on another variable? There's a categorical variable that we'd like to include in these plots to show which spots belong to which class (border color), as well as the mixture of cells within (inner pie plot).

@JThomasWatson
Copy link
Author

Update - I found a workaround. plotSpatialScatterpie() requires a 2-column numeric matrix. I made a copy of that matrix as a data frame, adding the categorical variable I wanted to show. Then, adding + geom_point(data = data2, mapping = aes(x = coord_x, y = coord_y, color = layer), size = 2, alpha = 0.25) created another plot directly on top of the scatterpie, with the new geom_points being slightly larger than the pie plots so it achieves the same effect. I'll leave this open, though, as having a color argument in plotSpatialScatterpie() would be nice.

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

1 participant