Minor modification for option to supply a custom legend fragment formatter

Useful if you want to plot e.g. symbols in the legend.