![]() I know I could subset and do something like this: ggplot(FO_adult, aes(x=reorder(prey_name, -Fi), Fi, fill=prey_name)) + Can I have these values on the plot just once and have it centered? My question is, is it possible to just have one label for the values that repeat? For example, 0.147 occurs twice (Daphnia and Goby) 0.053 for other prey 0.021, etc. ![]() Scale_y_continuous(expand = expansion(mult = c(0,0.1))) Legend.background = element_rect(fill = "white", color = 1), Labs(x="Prey", fill = "Prey Name", y = "Frequency of Occurrence (%)", Geom_text(aes(y = Fi, label = round(Fi, digits=3)), vjust = -0.5, My plot: ggplot(FO_adult, aes(x=reorder(prey_name, -Fi), Fi, fill=prey_name)) + "Fish.Eggs", "Goby", "Hemimysis", "Isopod", "Sphaeriidae", "Trichopteran", ![]() ![]() "Copepoda", "Cyclopoid", "Daphnia", "Dreissena", "EggMass", "Eurycercidae", "Chiro.Larvae", "Chiro.Pupae", "Chironomidae", "Chydoridae", My data: structure(list(prey_name = c("Amphipod", "Byths", "Chiro.Adult", Is it possible to remove certain/specific labels from geom_bar ggplot (geom_text) for repeated values and center this value on the plot/bars? ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |