In one of my projects I wanted to display the scatterpie legend labels on the left side of the legend key. This can be done in ggplot2 legends, but I realised that it was not possible to do this for the scatterpie legend. I added the label_position argument to geom_scatterpie_legend() to allow this behaviour. I also added the ... argument which allows you to customise the key labels (colour, size, font, ...). This PR introduces these arguments as I think users could benefit from greater flexibility.
# legend at bottom-right with labels at left
p + geom_scatterpie_legend(d$radius, x=140, y=-70, label_position="left")
# example of label customisation: smaller text, in bold and serif font
p + geom_scatterpie_legend(d$radius, x=-140, y=-70, fontface="bold", size=3.5, family="serif")
In one of my projects I wanted to display the scatterpie legend labels on the left side of the legend key. This can be done in
ggplot2
legends, but I realised that it was not possible to do this for thescatterpie
legend. I added thelabel_position
argument togeom_scatterpie_legend()
to allow this behaviour. I also added the...
argument which allows you to customise the key labels (colour, size, font, ...). This PR introduces these arguments as I think users could benefit from greater flexibility.Reprex (using example from the vignette):