Skip to content

Output flickering with ipywidgets interact #17146

@ianholst

Description

@ianholst

When using ipywidgets.interact to update a matplotlib plot (or actually any output, it seems) with a slider, the output severely flickers. This makes it difficult to see the effect of whatever parameter you are changing.

This video sort of captures it:

Screen.Recording.2025-11-11.145135.mp4

Steps to reproduce:

Run in a Jupyter notebook in VS Code:

import matplotlib.pyplot as plt
import ipywidgets
import numpy as np

def plot(a):
    plt.figure(figsize=[2,2])
    plt.ylim(0,1)
    plt.plot(np.linspace(0,1), a * np.linspace(0,1))
    plt.show()

ipywidgets.interact(plot, a=(0,1,0.1));

Environment data

  • VS Code version: 1.105.1
  • Jupyter Extension version: 2025.9.1
  • Python Extension version: 2025.16.0
  • OS: Windows
  • Python and/or Anaconda version: 3.12.0
  • Type of virtual environment used: none
  • Jupyter server running: local

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions