positron icon indicating copy to clipboard operation
positron copied to clipboard

Support for `matplotlib`'s buttons to copy/download plots

Open rodrigosf672 opened this issue 1 month ago • 1 comments

This might be a duplicate because I might have seen this logged before, but logging here as well just to be sure.

Positron Version: 2025.12.0 (Universal) build 128
Code - OSS Version: 1.106.0
Commit: 96bc86a83af575c6ba24b0098e28a171c5de52f3
Date: 2025-11-24T17:57:17.950Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 25.1.0

Repro Steps

  1. Download this sample notebook https://github.com/posit-dev/qa-example-content/blob/main/workspaces/pokemon/ds-workflow1.ipynb

  2. Install dependencies

  3. Attempt to run a cell that contains a matplotlib plot (under Section 5. Exploratory Analysis)

  4. Notice that, in old notebooks, output is generated and user can click buttons to copy/download plot. In new notebooks, output is also generated, but buttons to copy/download plot do not exist.

Expected behavior

In new notebooks, matplotlib outputs should display the same toolbar options available in old notebooks, including buttons to copy the image, download it, and access standard plot controls.

Current behavior

In new notebooks, matplotlib outputs render successfully, but the toolbar buttons (copy, download, etc.) are missing, reducing feature parity with old notebooks.

rodrigosf672 avatar Nov 25 '25 21:11 rodrigosf672

@rodrigosf672 ty for jumping on this so quickly! For issues where we haven't built out the integration/ functionality yet can you log them as task/ enhancement? Let's use bugs for regressions to what we have implemented

cindyytong avatar Nov 26 '25 20:11 cindyytong

Updated title We may want to enable copy/download any plot produced in a cell output

cindyytong avatar Dec 02 '25 17:12 cindyytong

Some notes that can be helpful to the team once this issue gets picked up:

  • Depending on how this is implemented, copy/download buttons placed on any plots produced in cell output could conflict with existing buttons that are inherent to specific libraries.
  • For example, once fixed, plotly (#10805) would already have some default buttons.
  • If new buttons are added within Positron, we'd need to make sure it does't break/conflict with library-specific default buttons.

rodrigosf672 avatar Dec 02 '25 20:12 rodrigosf672