g_legend: Extract the legend from a ggplot

View source: R/ggplot-extras.R

g_legendR Documentation

Extract the legend from a ggplot

Description

function developed by Hadley Wickham found in this (by Michael Kuhn) blog:http://blog.mckuhn.de/2013/04/2d-plot-with-histograms-for-each.html and was referencing: https://github.com/hadley/ggplot2/wiki/Share-a-legend-between-two-ggplot2-graphs

Usage

g_legend(a_ggplot)

Arguments

a_ggplot

a ggplot

Value

the legend

Author(s)

Hadley Wickham


barzine/barzinePhdR documentation built on Nov. 23, 2024, 8:54 p.m.