Improved handling of underscores in latex plotting
This PR improves the escaping of underscores when plotting with latex; those underscores followed by latex grouping brackets {}
shouldn't be escaped - the assumption is that these are inside mathmode $$
.