has2k1 / plotnine

A Grammar of Graphics for Python
https://plotnine.org
MIT License
3.92k stars 210 forks source link

Add specific gene labels to geom_point volcanoplot #722

Closed jesswhitts closed 9 months ago

jesswhitts commented 9 months ago

Hi,

I have a volcano plot which I made using this code:

( p9.ggplot(de_comp, p9.aes("lfc_mean", "-log10_pscore", color="significance"))

I want to add gene name labels for a few pre-defined genes (which I currently have as a list) How do I do this? I have tried geom_text but can't get it to work

Best, Jess

has2k1 commented 9 months ago

Please create a small example that can run.

jesswhitts commented 9 months ago

I solved this, I wanted geom_labels not geom_text