{"id":4057,"library":"ipympl","title":"Matplotlib Jupyter Extension","description":"ipympl is a Matplotlib Jupyter Extension that leverages the Jupyter interactive widgets framework to enable interactive features of Matplotlib within Jupyter Notebooks, JupyterLab, Google Colab, and VSCode notebooks. It provides a proper Jupyter interactive widget for figure canvases, allowing them to be positioned in interactive widget layouts. The library is actively maintained with regular releases, currently at version 0.10.0.","status":"active","version":"0.10.0","language":"python","source_language":"en","source_url":"https://github.com/matplotlib/ipympl","tags":["jupyter","matplotlib","interactive","plotting","widgets","visualization"],"install":[{"cmd":"pip install ipympl","lang":"bash","label":"PyPI"},{"cmd":"conda install -c conda-forge ipympl","lang":"bash","label":"Conda"}],"dependencies":[{"reason":"Core plotting library that ipympl extends.","package":"matplotlib","optional":false},{"reason":"Jupyter interactive widgets framework for interactivity.","package":"ipywidgets","optional":false},{"reason":"Required for Jupyter kernel interaction.","package":"ipykernel","optional":false}],"imports":[{"note":"ipympl is activated via a Jupyter magic command, not a direct Python import. '%matplotlib widget' also works.","wrong":"import ipympl","symbol":"%matplotlib ipympl","correct":"%matplotlib ipympl"}],"quickstart":{"code":"import matplotlib.pyplot as plt\nimport numpy as np\n\n%matplotlib ipympl\n\nfig, ax = plt.subplots()\nx = np.linspace(0, 2 * np.pi, 100)\ny = np.sin(3 * x)\nax.plot(x, y)\nplt.show()","lang":"python","description":"This quickstart demonstrates how to activate the ipympl backend using the Jupyter magic command and create a basic interactive Matplotlib plot. Run this code in a Jupyter Notebook or JupyterLab environment to see the interactive features."},"warnings":[{"fix":"Upgrade to JupyterLab 3+ or refer to the official ipympl documentation's 'Compatibility Table' for specific `jupyter-matplotlib` versions required for older JupyterLab installations. For older JupyterLab versions, e.g., `conda install -c conda-forge nodejs jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter-matplotlib` might be needed.","message":"For JupyterLab versions 1 or 2, `ipympl` requires manual installation of the `jupyter-matplotlib` labextension and specific version compatibility. For JupyterLab >= 3, installation via pip/conda is usually sufficient as the extension is automatically handled. Ensure your `ipympl` and `jupyter-matplotlib` versions are compatible.","severity":"breaking","affected_versions":"< 0.9.4 (JupyterLab 1/2 support), all versions with non-standard setups"},{"fix":"Verify that `pip list` or `conda list` shows `ipympl` in your active kernel's environment. If issues persist, check the browser's developer console for JavaScript errors related to Jupyter widgets.","message":"ipympl comprises both a Python (backend) and a JavaScript (frontend) component. In certain complex environments (e.g., custom Jupyter deployments, mixing environments), a version mismatch between these components can lead to non-interactive plots or errors. Always ensure both frontend and backend are from the same installation environment.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Add `from google.colab import output; output.enable_custom_widget_manager()` at the beginning of your Colab notebook, before `%matplotlib ipympl`.","message":"When using `ipympl` in Google Colab, you must explicitly enable the custom widget manager before activating the Matplotlib backend, otherwise plots will not be interactive.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'0.10.0':62 'activ':54 'allow':42 'canvas':41 'colab':28 'current':59 'enabl':18 'extens':3,9 'featur':20 'figur':40 'framework':16 'googl':27 'interact':14,19,37,48,65 'ipympl':4 'jupyt':2,8,13,24,36,63 'jupyterlab':26 'layout':50 'leverag':11 'librari':52 'maintain':55 'matplotlib':1,7,22,64 'notebook':25,31 'plot':66 'posit':46 'proper':35 'provid':33 'regular':57 'releas':58 'version':61 'visual':68 'vscode':30 'widget':15,38,49,67 'within':23","created_at":"2026-04-12T03:39:09.019074+00:00","updated_at":"2026-04-17T14:46:31.276787+00:00","problems":{"verify_error":"no import statement found"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.10.0","cli_name":"","cli_version":null,"type":"library","homepage":"http://matplotlib.org/ipympl","github":"https://github.com/matplotlib/ipympl","docs":null,"changelog":null,"pypi":"https://pypi.org/project/ipympl/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["ai-ml","web-framework"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-08-29","next_check":"2026-07-05","install_tag":null}}