8000 Proplot in jupyterlab generate continuous cpu usage · Issue #222 · proplot-dev/proplot · GitHub
[go: up one dir, main page]

Skip to content

Proplot in jupyterlab generate continuous cpu usage #222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ghislainp opened this issue Aug 26, 2020 · 1 comment
Closed

Proplot in jupyterlab generate continuous cpu usage #222

ghislainp opened this issue Aug 26, 2020 · 1 comment
Labels

Comments

@ghislainp
Copy link

Description

Proplot plots make busy jupyterlab all the time.

Steps to reproduce

A "Minimal, Complete and Verifiable Example" will make it much easier for maintainers to help you.

import proplot as pp
%matplotlib widget

f, axs = pp.subplots()

axs.plot([1, 5], [6, 7])

Expected behavior: Once plotted, jupyterlab should return to "idle" mode (when the mouse is not moving)

Actual behavior: Once plotted, jupyterlab switches between idle and busy very rapidly and loads the CPU.

Equivalent steps in matplotlib

Please make sure this bug is related to a specific proplot feature. If you're not sure, try to replicate it with the native matplotlib API. Matplotlib bugs belong on the matplotlib github page.

import matplotlib.pyplot as plt
%matplotlib widget

plt.plot([1, 5], [6, 7])

Proplot version

Proplot: 0.6.1
Matplotlib: 3.3.1
jupyterlab: 2.2.6
ipympl: 0.5.7

@lukelbd
Copy link
Collaborator
lukelbd commented Jun 30, 2021

Hi, this is probably related to #76. The problem proplot has with these interactive backends is its complicated geometry/layout algorithm updates subplot positions and figure sizes automatically... but the backends trigger these updates constantly.

I added support for %matplotlib notebook backend by (necessarily) disabling auto figure resizing, but after an hour of trying I couldn't get ipympl installed on my machine. However I think 38290e7 might solve the issue -- it disables auto-figure-sizing when ipympl is the backend.

Try out the development branch with pip install git+https://github.com/lukelbd/proplot.git if you're still interested.

@lukelbd lukelbd added the bug label Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants
0