Hi,
I'm looking to alter the appearance of legend labels to display as filled circles (specifically, shape 19).
I came across a solution using override.aes
on this page: link.
However, in my particular scenario where I'm utilizing geom_col
, this method doesn't seem to work.
library(tidyverse)
euro <- as.data.frame(euro)
euro$name <- rownames(euro)
euro
#> euro name
#> ATS 13.760300 ATS
#> BEF 40.339900 BEF
#> DEM 1.955830 DEM
#> ESP 166.386000 ESP
#> FIM 5.945730 FIM
#> FRF 6.559570 FRF
#> IEP 0.787564 IEP
#> ITL 1936.270000 ITL
#> LUF 40.339900 LUF
#> NLG 2.203710 NLG
#> PTE 200.482000 PTE
ggplot(data = euro, aes(x = name, y = euro, fill = name)) +
geom_col() +
guides(fill = guide_legend(
override.aes=list(shape = 19)))
Have you ever faced this problem? Is there a resolution?
I'm aware of a workaround involving an empty dataset for labels, but a more direct approach would be preferable.