Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content

fix latex font issues in py version >=39

ext-piot_p requested to merge ext-piot_p/pyOPALTools:latex-fix into master

added a condition to fix the missing re._alphanum_str() for python >=39. It seems for newer version nothing needs to be done. The codes below works fine with the proposed fix on fedora33 w/ 3.9.9.

from matplotlib import rc
from opal.opal import load_dataset
import matplotlib.pyplot as plt
import numpy as np

FontSize=22
FontSizeLabelAxis=22
rc('xtick',labelsize=FontSize)
rc('ytick',labelsize=FontSize)
rc('text', usetex=True)

x=np.linspace(-10,10,100)
plt.plot (x,x**2)
plt.xlabel (r'$x$ ', fontsize=FontSize)
plt.ylabel (r'$y=x^2$ ', fontsize=FontSize)
plt.tight_layout()
plt.show()

fixes #101 (closed)

Edited by snuverink_j

Merge request reports