nilearn
does not automatically import the submodules such as plotting
. This is usually done to save memory and/or improve performance since there could be hundreds of submodules or each submodule could be very large or the submodule is not frequently used.
There could be other reasons and the decision to automatically import submodules ultimately depend on the library's author(s) which in turn could be based on the usage patterns of the library.
As the submodule plotting
is not automatically imported you have to import it explicitly. This can be done in two ways:
Also, plot_connectome
requires at least two arguments - 'adjacency_matrix' and 'node_coords' which I don't see in your code.