inequality: the plotly figure (fig:plotly-gini-gdppc-years) renders nothing on the website

Open Beginner friendly
#871 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
80/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
jupyter-notebook, plotly, python

Research direction

Open lectures/inequality.md at lines 767–776 and lectures/_config.yml line 79; the payload names the two renderer options and the suppressed mystnb.unknown_mime_type warning. Choose one renderer fix, rebuild the inequality lecture, and confirm the figure appears in the built page. Done means the plotly output renders without the silent mime-type drop; also check whether removing the suppression affects other pages.

Written by the indexing model from the issue text.

Description

bug

The plotly figure in inequality.md (fig:plotly-gini-gdppc-years, lectures/inequality.md:767–:776) renders nothing on the website. On https://intro.quantecon.org/inequality.html the cell's output is empty (checked 2026-11-15).

Why. plotly 6's default renderer in a Jupyter kernel emits only application/vnd.plotly.v1+json. myst-nb has no renderer for that mimetype, so it drops the output with a mystnb.unknown_mime_type warning. lectures/_config.yml:79 suppresses that warning, and the build passes without a word.

The rm -r _build/.doctrees step in publish.yml plays no part in this: the figure is missing with or without it (QuantEcon/actions#98, where this was found).

Options

  • fig.show(renderer="notebook_connected"), which emits text/html. The #98 repro's test page renders a figure this way, in every build.
  • Setting plotly.io.renderers.default once in the lecture, before the figure.
  • Either way, dropping mystnb.unknown_mime_type from suppress_warnings would turn the next such drop into a warning rather than a silent gap. Other pages may rely on that suppression, though.

Claude Code (on behalf of mmcky)

Dominant language
Jupyter Notebook
Stars
67
Forks
35
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from QuantEcon/lecture-python-intro

All issues in QuantEcon/lecture-python-intro

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.