allow commas in legend entries

By wrapping the legend entries in extra braces they can contain commas (','). Otherwise these are misinterpreted as entry separators.