add_small_legend: A Function to Decrease the Size of a GGplot Legend

View source: R/addSmallLegend_function.R

add_small_legendR Documentation

A Function to Decrease the Size of a GGplot Legend

Description

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

Usage

add_small_legend(myPlot, pointSize = 0.5, textSize = 3, spaceLegend = 0.1)

Arguments

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

Examples

addSmallLegend(p)

JenC36/JACtools documentation built on Oct. 20, 2024, 8:05 a.m.