Description Usage Arguments Value Author(s) Examples
Print a ggplot2 object to the console/knitr report adding footnote text under the plot. Use when you want the footnot to be underneath the plot labels. Only prints the footnote once on a facetted plot.
1 2 3 4 5 6 7 | printWithFootnote(
plotObject,
footnote,
fontface = "plain",
fontsize = 10,
hjust = -0.1
)
|
plotObject |
A ggplot2 plotobject |
footnote |
A path/filename for the graphic |
fontface |
fontface for the footnotw (default = "plain") |
fontsize |
size of the footnote font (default = 10) |
hjust |
Specify horizontal justification (Default = -0.1) |
Prints the graphic object to the console
John Thompson, jrt@thompsonclan.org
1 2 3 4 5 6 7 | #Write to the console or knitr report
printWithFootnote(Myggplot, footnote = "Footnote Text")
#Capture to a file
png ("myplot.png", width=5, height=4, unit="in")
printWithFootnote(Myggplot, footnote = "Footnote Text")
invisible(dev.off())
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.