Force keys size to be smaller in multiple lines legend in ggplot

Is there any way to force legend key sizes to be independent from line height when we have legend text with multiple lines? I tried legend.key.height, ggtext::element_textbox_simple, and guides but none of them help to resize key legends independent from line height.

What I want is resize legend keys to be same size as the small grey ones while having my legend text exactly as it is.

enter image description here

  • 1

    See Set standard legend key size with long label names ggplot for two options.

    – 

  • Thanks @stefan. I tried to apply that method but not sure how. It is a bit ambiguous where I need to use those functions (For instance inside guides or within guide arg in scale_fill_manual). Need to invest more time to undesrand that I guess.

    – 

Leave a Comment