Repository: nilearn/nilearn

Issue:
Axes Cutoff in Example 9.2.15.9 (plotting.plot_img_on_surf)
[`Example 9.2.15.9`](https://nilearn.github.io/auto_examples/01_plotting/plot_3d_map_to_surface_projection.html#plot-multiple-views-of-the-3d-volume-on-a-surface) features a quick plot showing multiple views of a volumetric stat map on an average surface. 

![sphx_glr_plot_3d_map_to_surface_projection_006](https://user-images.githubusercontent.com/8116564/116880214-5c580700-abe7-11eb-8af0-3c229cb1ffff.png)

However, the brain is cutoff on both axes (picture shown) both in the online example and when I use it on nilearn 0.7.1 within a jupyter notebook using the following code

```python
fig, ax = plotting.plot_img_on_surf(new_image,
                          views=['lateral','medial'],
                          hemispheres=['left', 'right'],
                          inflate=True,
                          colorbar=True
                         )
```
Perhaps this is easily fixed post-hoc by adjusting matplotlib parameters, but it is not obvious to me. 


Discussion:
Thanks for opening this @tvanasse !
Indeed, I can reproduce with:

```python
from nilearn.datasets import fetch_neurovault_motor_task
from nilearn.plotting import plot_img_on_surf

motor_images = fetch_neurovault_motor_task()
stat_img = motor_images.images[0]
plot_img_on_surf(stat_img,
                 views=['lateral'],
                 hemispheres=['left'],
                 colorbar=True)
```
![test](https://user-images.githubusercontent.com/2639645/116889329-b929e080-ac2c-11eb-89a2-085636087f6f.png)


Resolving patch:
diff --git a/nilearn/plotting/surf_plotting.py b/nilearn/plotting/surf_plotting.py
--- a/nilearn/plotting/surf_plotting.py
+++ b/nilearn/plotting/surf_plotting.py
@@ -2,9 +2,12 @@
 Functions for surface visualization.
 Only matplotlib is required.
 """
+import itertools
+
 import matplotlib.pyplot as plt
 import numpy as np
 
+from matplotlib import gridspec
 from matplotlib.colorbar import make_axes
 from matplotlib.cm import ScalarMappable, get_cmap
 from matplotlib.colors import Normalize, LinearSegmentedColormap
@@ -229,7 +232,6 @@ def custom_function(vertices):
     else:
         if figure is None:
             figure = axes.get_figure()
-            figure.set_size_inches(*figsize)
         axes.set_xlim(*limits)
         axes.set_ylim(*limits)
     axes.view_init(elev=elev, azim=azim)
@@ -771,7 +773,7 @@ def plot_img_on_surf(stat_map, surf_mesh='fsaverage5', mask_img=None,
                      views=['lateral', 'medial'],
                      output_file=None, title=None, colorbar=True,
                      vmax=None, threshold=None,
-                     cmap='cold_hot', aspect_ratio=1.4, **kwargs):
+                     cmap='cold_hot', **kwargs):
     """Convenience function to plot multiple views of plot_surf_stat_map
     in a single figure. It projects stat_map into meshes and plots views of
     left and right hemispheres. The *views* argument defines the views
@@ -876,50 +878,49 @@ def plot_img_on_surf(stat_map, surf_mesh='fsaverage5', mask_img=None,
                              mask_img=mask_img)
     }
 
-    figsize = plt.figaspect(len(modes) / (aspect_ratio * len(hemispheres)))
-    fig, axes = plt.subplots(nrows=len(modes),
-                             ncols=len(hemis),
-                             figsize=figsize,
-                             subplot_kw={'projection': '3d'})
-
-    axes = np.atleast_2d(axes)
-
-    if len(hemis) == 1:
-        axes = axes.T
-
-    for index_mode, mode in enumerate(modes):
-        for index_hemi, hemi in enumerate(hemis):
-            bg_map = surf_mesh['sulc_%s' % hemi]
-            plot_surf_stat_map(surf[hemi], texture[hemi],
-                               view=mode, hemi=hemi,
-                               bg_map=bg_map,
-                               axes=axes[index_mode, index_hemi],
-                               colorbar=False,  # Colorbar created externally.
-                               vmax=vmax,
-                               threshold=threshold,
-                               cmap=cmap,
-                               **kwargs)
-
-    for ax in axes.flatten():
+    cbar_h = .25
+    title_h = .25 * (title is not None)
+    w, h = plt.figaspect((len(modes) + cbar_h + title_h) / len(hemispheres))
+    fig = plt.figure(figsize=(w, h), constrained_layout=False)
+    height_ratios = [title_h] + [1.] * len(modes) + [cbar_h]
+    grid = gridspec.GridSpec(
+        len(modes) + 2, len(hemis),
+        left=0., right=1., bottom=0., top=1.,
+        height_ratios=height_ratios, hspace=0.0, wspace=0.0)
+    axes = []
+    for i, (mode, hemi) in enumerate(itertools.product(modes, hemis)):
+        bg_map = surf_mesh['sulc_%s' % hemi]
+        ax = fig.add_subplot(grid[i + len(hemis)], projection="3d")
+        axes.append(ax)
+        plot_surf_stat_map(surf[hemi], texture[hemi],
+                           view=mode, hemi=hemi,
+                           bg_map=bg_map,
+                           axes=ax,
+                           colorbar=False,  # Colorbar created externally.
+                           vmax=vmax,
+                           threshold=threshold,
+                           cmap=cmap,
+                           **kwargs)
+        # ax.set_facecolor("#e0e0e0")
         # We increase this value to better position the camera of the
         # 3D projection plot. The default value makes meshes look too small.
-        ax.dist = 6
+        ax.dist = 7 
 
     if colorbar:
         sm = _colorbar_from_array(image.get_data(stat_map),
                                   vmax, threshold, kwargs,
                                   cmap=get_cmap(cmap))
 
-        cbar_ax = fig.add_subplot(32, 1, 32)
+        cbar_grid = gridspec.GridSpecFromSubplotSpec(3, 3, grid[-1, :])
+        cbar_ax = fig.add_subplot(cbar_grid[1])
+        axes.append(cbar_ax)
         fig.colorbar(sm, cax=cbar_ax, orientation='horizontal')
 
-    fig.subplots_adjust(wspace=-0.02, hspace=0.0)
-
     if title is not None:
-        fig.suptitle(title)
+        fig.suptitle(title, y=1. - title_h / sum(height_ratios), va="bottom")
 
     if output_file is not None:
-        fig.savefig(output_file)
+        fig.savefig(output_file, bbox_inches="tight")
         plt.close(fig)
     else:
         return fig, axes


Test patch: