"ax" does not work in plotting.plot_surf

I wanted to plot 2 surfaces of the same brain map but from different views on the same figure but 2 different subplots, thus, I initialized: fig,axes = plt.subplots(figsize = (10,10),ncols = 2,subplot_kw={‘projection’:‘3d’}), and I specified the “ax” argument being axes[0] or axes[1]. But the second subplot was plotted on top of the first one instead of being on the left and right.

code: https://colab.research.google.com/drive/15yMol4rQ9ligzle2lxlzApLY7qv4McYL?usp=sharing

could you provide a minimal example to reproduce the problem? this seems to work

from matplotlib import pyplot as plt
from nilearn import datasets, plotting

fsaverage = datasets.fetch_surf_fsaverage()
fig, axes = plt.subplots(
    figsize=(10, 10), ncols=2, subplot_kw={"projection": "3d"}
)
plotting.plot_surf(
    fsaverage["pial_left"], fsaverage["sulc_left"], axes=axes[0]
)
plotting.plot_surf(
    fsaverage["pial_left"], fsaverage["sulc_left"], view="medial", axes=axes[1]
)

fig.savefig("/tmp/surfaces.png")

Replace ax with axes in your code. That should work.

Thank you very much!