clemente-lab / mmeds-meta

A database for storing and analyzing omics data
https://mmeds.org
2 stars 1 forks source link

Coloring of text in PCOA plots should be independent of coloring of points #360

Closed cleme closed 2 years ago

cleme commented 2 years ago

Describe the bug In PCOA plots, the color of text with geom_text_repel() is currently set to the color of the points that are being labelled.

To Reproduce Generate summaries of a study. Individual PCOA plots will have labels colored according to the color applied to points.

Expected behavior Label text should have a uniform color.

Screenshots Screen Shot 2021-12-09 at 10 35 41 AM

Proposed solution Change coloring with geom_text_repel(color="black", alpha=0.6...) or some other option. Consider if it is more important to have points displayed above text, or text displayed above the points.

adamcantor22 commented 2 years ago

This is a version with these changes versus the old version. To me, the old version seems much easier to read/understand. @cleme thoughts? Screenshot from 2021-12-28 10-16-10 Screenshot from 2021-12-28 10-16-56

cleme commented 2 years ago

Try lowering the alpha value for the text and increasing it for the dots: that would make them more visible compared to the text.

adamcantor22 commented 2 years ago

Went too far with lowering the text alpha here, but I think this shows the problem is actually stemming from using white as our midpoint on a white background. We should pick a new midpoint color(s) or go back to no midpoint.

Screenshot from 2021-12-28 15-12-05

cleme commented 2 years ago

Agreed. Change palettes to have no white midpoint, since white is background. That should solve the problem of text color.

adamcantor22 commented 2 years ago

Lmk any further visual tweaks. This is with text alpha = 0.45. Screenshot from 2022-01-03 09-57-47 Screenshot from 2022-01-03 09-58-01 Screenshot from 2022-01-03 09-58-33 :

cleme commented 2 years ago

Good to go.