How Does Jupyter Display a Plot?... - Samuel Chen & Matthias Köppe, University of California, Davis
How Does Jupyter Display a Plot? Making Passagemath Plots Work in Any Notebook - Samuel Chen & Matthias Köppe, University of California, Davis When plotting in passagemath, I noticed that plots sometimes displayed text instead of an image. passagemath is a modular version of the math software SageMath. SageMath has its own display system, but the system is not in many notebook environments. I learned that IPython's DisplayFormatter collects the available representations and the notebook frontend chooses which one to display. In contrast, SageMath asks the frontend what it supports and renders just one thing. By adding repr_svg, repr_png, and repr_latex methods, IPython can collect those representations so plots and formulas now display in a plain ipykernel environment like Colab.