Skip to content

Commit d3f2ff3

Browse files
authored
Merge pull request #501 from zivy/matplotlibBackendClarity
Replace the usage of widget with ipympl.
2 parents 30f30ea + 53274e2 commit d3f2ff3

15 files changed

+19
-18
lines changed

Python/03_Image_Details.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1436,7 +1436,7 @@
14361436
"metadata": {},
14371437
"outputs": [],
14381438
"source": [
1439-
"%matplotlib widget\n",
1439+
"%matplotlib ipympl\n",
14401440
"import gui\n",
14411441
"\n",
14421442
"gui.RegistrationPointDataAquisition(\n",

Python/04_Image_Display.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"source": [
5858
"import SimpleITK as sitk\n",
5959
"\n",
60-
"%matplotlib widget\n",
60+
"%matplotlib ipympl\n",
6161
"import matplotlib.pyplot as plt\n",
6262
"import gui\n",
6363
"\n",

Python/05_Results_Visualization.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"metadata": {},
7171
"outputs": [],
7272
"source": [
73-
"%matplotlib widget\n",
73+
"%matplotlib ipympl\n",
7474
"\n",
7575
"import numpy as np\n",
7676
"import itertools\n",

Python/21_Transforms_and_Resampling.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@
774774
"outputs": [],
775775
"source": [
776776
"# Temporarily change the matplotlib back-end to enable mouse interaction\n",
777-
"%matplotlib widget\n",
777+
"%matplotlib ipympl\n",
778778
"intensity_profiles_image = sitk.ReadImage(fdata(\"training_001_ct.mha\"))\n",
779779
"point_gui = gui.PointDataAquisition(image=intensity_profiles_image);"
780780
]

Python/30_Segmentation_Region_Growing.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@
6060
"metadata": {},
6161
"outputs": [],
6262
"source": [
63-
"# To use interactive plots (mouse clicks, zooming, panning) we use the notebook back end. We want our graphs\n",
64-
"# to be embedded in the notebook, inline mode, this combination is defined by the magic \"%matplotlib widget\".\n",
65-
"%matplotlib widget\n",
63+
"# To use interactive plots (mouse clicks, zooming, panning) we use the ipympl back end. We want our graphs\n",
64+
"# to be embedded in the notebook, inline mode, this combination is defined by the magic \"%matplotlib ipympl\".\n",
65+
"%matplotlib ipympl\n",
6666
"\n",
6767
"import SimpleITK as sitk\n",
6868
"\n",

Python/33_Segmentation_Thresholding_Edge_Detection.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"%run update_path_to_download_script\n",
6868
"from downloaddata import fetch_data as fdata\n",
6969
"\n",
70-
"%matplotlib widget\n",
70+
"%matplotlib ipympl\n",
7171
"import gui\n",
7272
"import matplotlib.pyplot as plt\n",
7373
"\n",

Python/35_Segmentation_Shape_Analysis.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"import SimpleITK as sitk\n",
2626
"import pandas as pd\n",
2727
"\n",
28-
"%matplotlib widget\n",
28+
"%matplotlib ipympl\n",
2929
"\n",
3030
"import matplotlib.pyplot as plt\n",
3131
"import gui\n",

Python/36_Microscopy_Colocalization_Distance_Analysis.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"import numpy as np\n",
2626
"import pandas as pd\n",
2727
"\n",
28-
"%matplotlib widget\n",
28+
"%matplotlib ipympl\n",
2929
"import gui\n",
3030
"\n",
3131
"%run update_path_to_download_script\n",

Python/63_Registration_Initialization.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"%run update_path_to_download_script\n",
6363
"from downloaddata import fetch_data as fdata\n",
6464
"\n",
65-
"%matplotlib widget\n",
65+
"%matplotlib ipympl\n",
6666
"import gui\n",
6767
"\n",
6868
"\n",

Python/67_Registration_Semiautomatic_Homework.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@
7070
"metadata": {},
7171
"outputs": [],
7272
"source": [
73-
"# To use interactive plots (mouse clicks, zooming, panning) we use the notebook back end. We want our graphs\n",
74-
"# to be embedded in the notebook, inline mode, this combination is defined by the magic \"%matplotlib widget\".\n",
75-
"%matplotlib widget\n",
73+
"# To use interactive plots (mouse clicks, zooming, panning) we use the ipympl back end. We want our graphs\n",
74+
"# to be embedded in the notebook, inline mode, this combination is defined by the magic \"%matplotlib ipympl\".\n",
75+
"%matplotlib ipympl\n",
7676
"\n",
7777
"import numpy as np\n",
7878
"import SimpleITK as sitk\n",

0 commit comments

Comments
 (0)