Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • P pyOPALTools
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 8
    • Issues 8
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 1
    • Merge requests 1
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • OPAL
  • pyOPALTools
  • Merge requests
  • !75

Merged
Created Dec 19, 2021 by ext-piot_p@ext-piot_pDeveloper

fix latex font issues in py version >=39

  • Overview 7
  • Commits 4
  • Changes 1

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 Dec 19, 2021 by snuverink_j
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: latex-fix