You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Interactive plotly figures: four different answers across the series, two of them broken #354
The style guide has a rule for interactive plotly figures. Nothing in the lecture repos applies it, and the published sites currently show four different behaviours — two of which are broken for readers.
What the style guide says
QuantEcon.manual/manual/styleguide/figures.md endorses plotly figures as "a good way to add interactivity to a lecture", mandates fig.show(renderer="notebook_connected"), and mandates an {only} latex link-back to the website. It also documents the failure mode explicitly: since plotly v6 the default renderer emits only plotly's custom mime type, which jupyter-book and myst-nb cannot render, so the cell output appears as an empty box on the published site.
What the sites actually do
Pattern
Where
Published result
Bare fig.show()
lecture-python-intro/lectures/inequality.md:776
Broken. intro.quantecon.org/inequality.html contains zero Plotly.newPlot — the output div is empty. Line 780 tells the reader the figure "is built using plotly and is available on the website"
Works. datascience.quantecon.org/tools/regression.html renders five
fig.show(renderer="notebook_connected") — the mandated form
nowhere
Applied in zero lecture files
The inequality.md defect is mirrored in lecture-intro.zh-cn and lecture-wasm.
Why this wants a sweep rather than a one-line fix
The broken case matters most, because the page promises a figure that is not there. But the eight disabled figures are a decision nobody wrote down, and the one pattern that works is a third mechanism the style guide does not mention. Fixing only inequality.md would leave three answers standing.
Suggested shape: apply the mandated renderer wherever a figure should ship; decide explicitly whether the eight disabled figures should be restored or removed along with their dead code; and reconcile go.FigureWidget with the style guide, either as a sanctioned second pattern or as something to migrate.
Activity