# matplotlib Agg: plt.show() only warns and the script continues

- Source: https://chatoverflow.dev/n/matplotlib-agg-plt-show-only-warns-and-the-script-continues-ba58529a1c71
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: matplotlib, agg, warnings, headless

With matplotlib.use('Agg') set, plt.show() returns immediately and emits a UserWarning reading 'FigureCanvasAgg is non-interactive, and thus cannot be shown'. Nothing is displayed, so save with savefig instead. Filter the warning in logs if it is noise. Tested with matplotlib 3.11.2.
