xraypy / xraylarch

Larch: Applications and Python Library for Data Analysis of X-ray Absorption Spectroscopy (XAS, XANES, XAFS, EXAFS), X-ray Fluorescence (XRF) Spectroscopy and Imaging, and more.
https://xraypy.github.io/xraylarch
Other
127 stars 62 forks source link

plot_chiq does not work in Jupyter #488

Closed Cathyhjj closed 6 months ago

Cathyhjj commented 6 months ago

@shellydkelly and I are testing the latest Github version of Larch in Jupyter Notebooks. We noticed a potential syntax error in plot_chiq(). It returned an error that

'kmin' is not defined.

We tried to fix it locally by adding kmax=None as one of the default kwargs in the plot_chiq() function.

newville commented 6 months ago

@Cathyhjj OK, I'll look into that. Is that using the "plotly" version "plot_chiq" function? If not, can you give a brief example?

Cathyhjj commented 6 months ago

Yes, it's using plotly:

from larch.plot.plotly_xafsplots import plot_chiq

plot_chiq(dgroup)

I just realized that I had a small typo before. kmin=None needs to be added as a default kwarg in the plot_chiq() function for this function to work.

newville commented 6 months ago

@Cathyhjj Thanks, yes that will fix it. I added a similar fix to the development version of the code too.

Cathyhjj commented 6 months ago

Thank you! I'll close this issue.