എക്സ്കാലിഡ്രോയിൽ ഇപ്പോൾ സപ്പോർട്ട് ഇല്ല, ഇത് വളരെ മോശമാണ്. ഒരു പരിഹാരമായി നിങ്ങൾ റെൻഡർ ചെയ്യേണ്ട ഗണിത സമവാക്യത്തിനായി ഒരു SVG ജനറേറ്റ് ചെയ്ത് അത് പേസ്റ്റ് ചെയ്യാം.
ഈ സ്ക്രിപ്റ്റ് ഉപയോഗിച്ച് നിങ്ങൾക്ക് SVG ജനറേറ്റ് ചെയ്യാം:
import matplotlib.pyplot as plt
# svg ബാക്കെൻഡ് ഉപയോഗിക്കുക
plt.switch_backend('svg')
# latex റെൻഡറിംഗ് പ്രവർത്തനക്ഷമമാക്കുക
plt.rcParams['text.usetex'] = True
# ഫിഗർ സൃഷ്ടിക്കുക
fig, ax = plt.subplots(figsize=(4, 2))
ax.axis('off') # അക്ഷങ്ങൾ ഇല്ല
latex_str = r"$\nabla \mathcal J(\theta)$"
ax.text(0.5, 0.5, latex_str, fontsize=20, ha='center', va='center')
fig.savefig("latex.svg", format="svg", bbox_inches='tight', transparent=True)
ഇതാ നിങ്ങളുടെ ഫലം: