-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Hi,
I get the following issue when importing the plotting tool from pygix using from pygix import plotting as ppl
ValueError Traceback (most recent call last)
Cell In[1], line 3
1 import pygix
2 import fabio
----> 3 from pygix import plotting as ppl
File c:\Users--\anaconda3\envs\xrd\Lib\site-packages\pygix\plotting.py:46
39 mpl.rc('text', usetex=True)
41 latexpre = [r'\usepackage{siunitx}',
42 r'\sisetup{detect-all}',
43 r'\usepackage{helvet}',
44 r'\usepackage[EULERGREEK]{sansmath}',
45 r'\sansmath']
---> 46 mpl.rcParams['text.latex.preamble'] = latexpre
48 DEFAULT_UNIT = 'nm^-1'
49 LABELS_DICT = {
50 'raw': ['y (pixels)', 'x (pixels)'],
51 'angular': ['2theta_f (deg)', 'alpha_f (deg)'],
(...)
56 'qz': ['q_z (nm^-1)', 'Intensity (a.u.)'],
57 'qxy': ['q_xy (nm^-1)', 'Intensity (a.u.)']}
File c:\Users--\anaconda3\envs\xrd\Lib\site-packages\matplotlib_init_.py:734, in RcParams.setitem(self, key, val)
732 cval = self.validatekey
733 except ValueError as ve:
--> 734 raise ValueError(f"Key {key}: {ve}") from None
735 self._set(key, cval)
736 except KeyError as err:
ValueError: Key text.latex.preamble: Could not convert ['\usepackage{siunitx}', '\sisetup{detect-all}', '\usepackage{helvet}', '\usepackage[EULERGREEK]{sansmath}', '\sansmath'] to str