JimWhiting91 / genotype_plot

A set of functions to visualise genotypes based on a VCF
Other
84 stars 17 forks source link

Issue adding dendogram tip labels: "could not find function "geom_text" " #16

Closed MilesLuca closed 7 months ago

MilesLuca commented 7 months ago

Hi @JimWhiting91!

Love your tool, has been really helpful for visualising fixed SNPs in my data! I'm having an issue trying to plot the dendogram tip labels back on the clustered plot. Have been following your suggested code on your page, but for some reason ggplot2 can't find the function geom_text.

  dendro_with_tips <- new_plot$dendrogram +
+                     geom_text(aes(x=1:length(new_plot$dendro_labels),
+                     y=-2.5,
+                     label=new_plot$dendro_labels))
Error in geom_text(aes(x = 1:length(new_plot$dendro_labels), y = -2.5,  :
  could not find function "geom_text"

Any suggestions on how to fix this?

Thanks!

MilesLuca commented 7 months ago

Hi @JimWhiting91!

Hmph, my apologies, just realised there was an issue with my R not loading ggplot2 properly. Not related to the tool!

My bad!