View source: R/addSmallLegend_function.R
add_small_legend | R Documentation |
This function decreases the size of a ggplot legend for a specified plot. Works for shape, fill, and color legends. Taken from https://stackoverflow.com/questions/52297978/decrease-overal-legend-size-elements-and-text
add_small_legend(myPlot, pointSize = 0.5, textSize = 3, spaceLegend = 0.1)
myPlot |
specifies the plot legend to shrink |
pointSize |
specifies the size of data points |
textSize |
specifies the text size for the legend title and text |
spaceLegend |
specifies the spacing between legend lines |
addSmallLegend(p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.