Fix intermittent missing fit plots in docs - #67
Merged
Conversation
shum23
marked this pull request as ready for review
July 27, 2026 14:35
phrgab
reviewed
Jul 27, 2026
phrgab
left a comment
Owner
There was a problem hiding this comment.
There appear to be formatting changes only on file_loaders.md, unrelated to the fixes - is that correct? If so, are you able to drop these changes before we merge?
Collaborator
Author
phrgab
approved these changes
Jul 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The interactive fit plots in the docs (e.g.
6_data_fitting.ipynb) would sometimes fail to appear and leave a blank space where the sliders and figure should be. Refreshing the page sometimes fixed it, sometimes didn't. It also seemed to vary by browser.It turns out both sphinx and bokeh try to load MathJax, and whether this caused a crash depended on which one loaded first. That's why it looked random.
Bokeh 3.9's bundled MathJax uses MathJax 3 API and is still migrating to v4 but Sphinx recently switched its default to MathJax 4 in v9.0, see
sphinx.ext.mathjaxPin
mathjax_pathto MathJax 3 indocs/source/conf.pyas a workaround according to sphinx's docs, matching what bokeh's bundle expects.Note: Should revisit if/when bokeh adds mathjax 4 support.
Also reduced the embedded states of the fit plots there to make them manageable for docs builds