TransWikia.com

Matplotlib same LaTeX format for text and float-to-string part

TeX - LaTeX Asked on June 6, 2021

I am trying to work on the legend of my graph:

enter image description here

As you can see that I used the dollar symbol for timestep to make it latex (I hope I am not wrong) but I am unable to get the same font/format for the time value which I have converted from float to string.

Part of my code

...
while i < len(files):
....
time = '$timestep $'+ str(float(start))
lns1 = ax.plot(x,y,label=time,linewidth=3)
...

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP