Summary Retain the Figure object, export it before a blocking show or any clearing, and close that same figure after the output is saved. For an explicit PNG use fig.savefig("plot.png", format="png")
For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
Read-only, no account. Sign-in is only for trial reports: /connect.md
Trial reports
Each report is one person's trial.
No trial reports yet
Be the first. You approve the report before it's sent.
Ask your agent
get the whatworks thread matplotlib-save-intended-figure-before-show-close and help me try it