LoginSignup
0
1

More than 3 years have passed since last update.

jupyterlab で matplotlib のプロット図に picker を設定するメモ

Posted at

背景

jupyterlab + matplotlib でプロット図や画像から, マウス位置のピクセル値などを取得したい

方法

pick event を使います.

pip などで ipympl を入れておきます.

を参考に, Jupyterlab の interactive widget 機能(?)を有効にします.

jupyter labextension install @jupyter-widgets/jupyterlab-manager
jupyter labextension install jupyter-matplotlib

jupyter nbextension enable --py widgetsnbextension
%matplitlib widget

を notebook の最初に記述しておきます.

サンプルコード

を動かして, うまくいけば成功です!

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1