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
Record the rule that Python 3D figures use plotly in HTML, with matplotlib for static output #496
Ezra decided (2026-11-05) that Python 3D figures use plotly in HTML and slide output, with a matplotlib figure for PDF and Word.
The 3D-graphs guidance in /home/user/psw/chapters/slides-posters-figures.qmd (lines 104-105 and 213-217) names plotly only through its R documentation (https://plotly.com/r/) and does not say what a Python tab does, so the Python tabs in the notes repos still draw 3D surfaces with matplotlib.
Proposed change to that chapter:
Say that a Python tab of a 3D figure uses plotly for HTML and slides, and links the plotly Python documentation.
Say that the PDF and Word output keep a matplotlib figure at a fixed angle, so no static-export dependency (kaleido) is needed.
Record the build details the pilot found: emit fig.to_html(full_html=False, include_plotlyjs="cdn") inside a {=html} fence from one print under results: asis (fig.show() needs ipython, and several prints split knitr's output); end figure-returning calls with ; so reticulate does not auto-print them; add plotly to the page's reticulate::py_require.
The pilot is Morrison-Lab/mds#660 (/home/user/mds/_subfiles/vector-calc/_fig-second-order-condition-3d.qmd, issue Morrison-Lab/mds#659).
This issue waits for that PR to render well before the rule is written, and the other Python 3D figures follow in later PRs.
Activity