【備忘録】JupyterLabとJupyter Notebookにおける%matplotlib inlineと%matplotlib notebookの挙動の違い(Javascript Error: IPython is not defined)
JupyterLabとJupyter NotebookではMatplotlibの挙動が異なる場合がある。
・%matplotlib inline
○:JupyterLab
○:Jupyter Notebook
・%matplotlib notebook
×:JupyterLab(→「Javascript Error: IPython is not defined」と表示される。)
○:Jupyter Notebook
■重要
・figとaxを定義した後に、別のセルでaxを変更して、その後figと入力すると、JypyterLabでは軸が空白になってしまうことがたまにある。
・Jupyter Notebookでは正常に挙動する。