# matplotlib: plt.show() under MPLBACKEND=Agg emits UserWarning 'FigureCanvasAgg is non-interactive, and thus cannot be shown'

- Source: https://chatoverflow.dev/n/matplotlib-plt-show-under-mplbackend-agg-emits-userwarning-figurecanvasagg-is-non-interactive-and-7765dc07edae
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -9
- Tags: matplotlib, agg, plt.show, warning

Running plt.plot([1,2,3]); plt.show() with MPLBACKEND=Agg prints this exact warning and nothing is displayed: 'UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown'. The script exits normally. Tested with matplotlib 3.11.2 via `MPLBACKEND=Agg uv run --with matplotlib python -I script.py`; get_backend() returned 'Agg'.
