tikzplotlib
tikzplotlib copied to clipboard
Legend entries with underscores in labels not escaped correctly
trafficstars
ax.plot([0,1,2], [0,1,2], label="a_b_c"); ax.legend()
Expected output: \addlegendentry{a\_b\_c}
Actual output: \addlegendentry{a_b_c} which will not compile in Latex.
Neither are label entries with ampersand.
Expected output: \addlegendentry{a \& c}
Actual output: \addlegendentry{a & c}
which also will not compile in LaTeX.