简体   繁体   中英

How to make Matplotlib mouse interactive plots less laggy?

I want to make some interactive plots with Matplotlib, by plotting some extra graphics objects on mouse movements. Luckily, one of the interactive plot I want to present has already been coded and can be found on the Matplotlib website as a code example: looking glass example .

Unfortunately, I find the performance very poor; in the gif you can see how much the rendering is lagging compared to the mouse movement.

在此处输入图像描述

Is it this the best performance that Matplotlib can provide for this task? I need to embed the interactive plots in some PyQt applications, so I could always switch to PyQtGraph, but if possible I would like to continue using Matplotlib.

The new package Quibbler might be helpful here: https://github.com/Technion-Kishony-lab/quibbler

for transparency: I am one of the developers of Quibbler.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM