Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The secret sauce is that you can ask legend_label to use the LaTeX representation of the function like so:

p1=plot(y1, (t,-5,5), gridlines=True,color='red', legend_label='$'+latex(y1)+'$')

See this live example.