Skip to content

Commit da63228

Browse files
committed
FIX: reordering inline import to reduce error messages
1 parent 2bacd52 commit da63228

9 files changed

+15
-15
lines changed

notebooks/advanced_create_interfaces.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@
7676
"metadata": {},
7777
"outputs": [],
7878
"source": [
79-
"%matplotlib inline\n",
8079
"import nibabel as nb\n",
80+
"%matplotlib inline\n",
8181
"nb.load('/data/ds000114/sub-01/ses-test/anat/sub-01_ses-test_T1w.nii.gz').orthoview();"
8282
]
8383
},

notebooks/basic_interfaces.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@
6868
"metadata": {},
6969
"outputs": [],
7070
"source": [
71-
"%pylab inline\n",
7271
"from nilearn.plotting import plot_anat\n",
72+
"%pylab inline\n",
7373
"plot_anat('/data/ds000114/sub-01/ses-test/anat/sub-01_ses-test_T1w.nii.gz', title='original',\n",
7474
" display_mode='ortho', dim=-1, draw_cross=False, annotate=False);"
7575
]
@@ -709,8 +709,8 @@
709709
"outputs": [],
710710
"source": [
711711
"# we will be using plot_anat from nilearn package\n",
712-
"%matplotlib inline\n",
713712
"from nilearn.plotting import plot_anat\n",
713+
"%matplotlib inline\n",
714714
"plot_anat('/output/T1w_nipype_smooth.nii.gz', title='after smoothing',\n",
715715
" display_mode='ortho', dim=-1, draw_cross=False, annotate=False);"
716716
]

notebooks/basic_iteration.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@
141141
"metadata": {},
142142
"outputs": [],
143143
"source": [
144-
"%matplotlib inline\n",
145-
"from nilearn import plotting"
144+
"from nilearn import plotting\n",
145+
"%matplotlib inline"
146146
]
147147
},
148148
{

notebooks/basic_nodes.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@
197197
"metadata": {},
198198
"outputs": [],
199199
"source": [
200-
"%pylab inline\n",
201200
"from nilearn.plotting import plot_anat\n",
201+
"%pylab inline\n",
202202
"plot_anat(bet.inputs.in_file, title='BET input', cut_coords=(10,10,10),\n",
203203
" display_mode='ortho', dim=-1, draw_cross=False, annotate=False);\n",
204204
"plot_anat(res.outputs.out_file, title='BET output', cut_coords=(10,10,10),\n",
@@ -274,8 +274,8 @@
274274
},
275275
"outputs": [],
276276
"source": [
277-
"%pylab inline\n",
278277
"from nilearn.plotting import plot_anat\n",
278+
"%pylab inline\n",
279279
"plot_anat(smooth_node.inputs.in_file, title='smooth input', cut_coords=(10,10,10),\n",
280280
" display_mode='ortho', dim=-1, draw_cross=False, annotate=False);\n",
281281
"plot_anat(smooth_res.outputs.out_file, title='smooth output', cut_coords=(10,10,10),\n",

notebooks/basic_workflow.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@
6565
"metadata": {},
6666
"outputs": [],
6767
"source": [
68-
"%pylab inline\n",
6968
"import nibabel as nb\n",
69+
"%pylab inline\n",
7070
"\n",
7171
"# Let's create a short helper function to plot 3D NIfTI images\n",
7272
"def plot_slice(fname):\n",

notebooks/example_2ndlevel.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,8 @@
361361
"metadata": {},
362362
"outputs": [],
363363
"source": [
364-
"%matplotlib inline\n",
365364
"from nilearn.plotting import plot_stat_map\n",
365+
"%matplotlib inline\n",
366366
"anatimg = '/data/ds000114/derivatives/fmriprep/mni_icbm152_nlin_asym_09c/1mm_T1.nii.gz'"
367367
]
368368
},

notebooks/example_normalize.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,8 @@
512512
"metadata": {},
513513
"outputs": [],
514514
"source": [
515-
"%matplotlib inline\n",
516515
"from nilearn.plotting import plot_stat_map\n",
516+
"%matplotlib inline\n",
517517
"anatimg = '/data/ds000114/derivatives/fmriprep/mni_icbm152_nlin_asym_09c/1mm_T1.nii.gz'"
518518
]
519519
},

notebooks/handson_analysis.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1566,8 +1566,8 @@
15661566
"metadata": {},
15671567
"outputs": [],
15681568
"source": [
1569-
"%matplotlib inline\n",
15701569
"from nilearn.plotting import plot_glass_brain\n",
1570+
"%matplotlib inline\n",
15711571
"out_path = '/output/datasink_handson/2ndLevel/'"
15721572
]
15731573
},

notebooks/handson_preprocessing.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@
172172
"metadata": {},
173173
"outputs": [],
174174
"source": [
175-
"%matplotlib inline\n",
176175
"import pylab as plt\n",
177176
"import nibabel as nb\n",
177+
"%matplotlib inline\n",
178178
"plt.plot(nb.load(func_file).get_fdata()[32, 32, 15, :]);"
179179
]
180180
},
@@ -1324,9 +1324,9 @@
13241324
"metadata": {},
13251325
"outputs": [],
13261326
"source": [
1327-
"%matplotlib inline\n",
13281327
"from nilearn import image as nli\n",
13291328
"from nilearn.plotting import plot_stat_map\n",
1329+
"%matplotlib inline\n",
13301330
"output = '/output/work_preproc/_subject_id_07/'"
13311331
]
13321332
},
@@ -1412,9 +1412,9 @@
14121412
"metadata": {},
14131413
"outputs": [],
14141414
"source": [
1415-
"%matplotlib inline\n",
14161415
"from nilearn import image as nli\n",
14171416
"from nilearn.plotting import plot_epi\n",
1417+
"%matplotlib inline\n",
14181418
"output = '/output/work_preproc/_subject_id_07/'"
14191419
]
14201420
},
@@ -1487,8 +1487,8 @@
14871487
"metadata": {},
14881488
"outputs": [],
14891489
"source": [
1490-
"%matplotlib inline\n",
14911490
"import nibabel as nb\n",
1491+
"%matplotlib inline\n",
14921492
"output = '/output/work_preproc/_subject_id_07/'\n",
14931493
"\n",
14941494
"# Load the relevant datasets\n",

0 commit comments

Comments
 (0)