r - ggplot2 footnote -


What is the best way to add a footnote to the bottom of the plot created with ggplot2? I have tried to use the ggplot2 annotated function as a combination of the logic noted here.

  p + annotate ("text", label = "footnote", x = unit ( 1, "NPC") - unit (2, "mm"), y = unit (2, "mm"), bus = c ("right", "bottom"), gp = gpar (cex = 0.7, col = Gray (.5)))  

But I'm getting the error in "as.data.frame.default (x [[i]], alternate = TRUE, stringfactors = stringsfactors : Operation can not be class c ("unit.arithmetic", "unit") in any data.frame ".

I will use something like this:

pdf (" filename.pdf ", width = 10, height = 6) # Print the appropriate graphics device (P) MefootNot () uses (grid.exe from the webpage above; ggplot2 is based on grid) dev.off ()


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -