Skip to content

Commit

Permalink
avoid GTK issues by enforcing Qt5
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkedavida committed Jun 5, 2024
1 parent cea9b3b commit 96fe3f1
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ pip install latqcdtools
```
Besides this, there is a `latexify()` command you can use when plotting to make your
plot font match typical LaTeX documents. In order for this command to work, you need
to have LaTeX installed on your system. We recommend installing TeXLive-Full.
to have LaTeX installed on your system. The easiest is to install `texlive-full`, but
if that is not possible, it may be enough to install `texlive-mathscience` in addition
to the basic stuff.


## Getting started and documentation
Expand Down
2 changes: 1 addition & 1 deletion examples/main_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

latexify()

xdata, ydata, edata = readTable("../testing/statistics/wurf.dat", usecols=(0,2,3))
xdata, ydata, edata = readTable("../tests/statistics/wurf.dat", usecols=(0,2,3))

plot_dots(xdata,ydata,edata)

Expand Down
2 changes: 1 addition & 1 deletion examples/main_fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def fit_func(x, params):
return a*x**2 + b*x + c


xdata, ydata = readTable("../testing/statistics/wurf.dat", usecols=(0,2))
xdata, ydata = readTable("../tests/statistics/wurf.dat", usecols=(0,2))

# We initialize our Fitter object. The function has to look like
# func(x, params, *args).
Expand Down
8 changes: 6 additions & 2 deletions latqcdtools/base/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@
import itertools
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.colors
import matplotlib.ticker as ticker
import matplotlib
import latqcdtools.base.logger as logger
from latqcdtools.base.check import checkEqualLengths, checkType
from latqcdtools.base.utilities import isHigherDimensional, toNumpy , envector
from latqcdtools.base.readWrite import readTable


# This is to avoid possible problems with colors and themes. As far as I can tell,
# everything works with PyQt5.
matplotlib.use('Qt5Agg')


ZOD = 10 # Orders different layers
INITIALIZE = True # A global flag to ensure we only initialize once
LEGEND = False # A global flag to apply legend attributes when we have one
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ matplotlib
numba
numpy
pathos
PyQt5
pytest
pyyaml
scipy
sympy
pytest

0 comments on commit 96fe3f1

Please sign in to comment.