Skip to content
Prev 350867 / 398502 Next

geom_text in ggplot (position)

This may or may not be helpful, but you can create a dataframe with the
geom_text exactly where you want it to be (although it will probably be a
lot of extra work and will take time fiddling with it to see if you like
how it looks - and I think it looks fine the way you have it already).

Example for just one of the values, you would have to do this for each:

text75 <- data.frame(cO = factor("B", levels = c("A","B")), cat = "0",
recuento = 50, variables = factor("PE_35", levels = c("PE_35", "PE_49")))

                   ggplot(melted, aes(x = cat, y =
recuento,ymax=max(recuento)*1.05, fill =
                                        cO)) +
                     geom_bar(stat = 'identity', position = 'stack',
col="black") +
                     facet_grid(~ variables)+
                     geom_text(data = text75, label = "75", size = 10, face
= "bold")

*?~ Kristina*

??
Kristina Wolf
?
?
Ph.D. Candidate, Graduate Group in Ecology
M.S. Soil Science
?,
?
B.S. Animal Science?
?
KristinaMWolf.com
Restoration Ecology Lab
?
Department of Plant Sciences
?
University of California, Davis?
?
(530) 750-9771

"We have to remember that what we observe is not nature herself, but nature
exposed to our method of questioning." ~ Werner Heisenberg


On Tue, May 12, 2015 at 9:50 AM, AURORA GONZALEZ VIDAL <
aurora.gonzalez2 at um.es> wrote: