Repository: nilearn/nilearn

Issue:
[BUG] Location of individual spheres does not match the "all spheres plot" in NiftiSpheresMasker reports
### Is there an existing issue for this?

- [X] I have searched the existing issues

### Operating system

- [ ] Linux
- [ ] Mac
- [ ] Windows

### Operating system version

Operating system used to build the stable documentation (2024-02-22)

### Python version

- [ ] 3.12
- [ ] 3.11
- [ ] 3.10
- [ ] 3.9
- [ ] 3.8

### nilearn version

nilearn version used to build the stable documentation (2024-02-22)

### Expected behavior

Location of individual spheres should match the "all spheres plot" in NiftiSpheresMasker reports

### Current behavior & error messages

See the report in the stable documentation [here](https://nilearn.github.io/stable/auto_examples/03_connectivity/plot_sphere_based_connectome.html#display-spheres-summary-report)

### Steps and code to reproduce bug

_No response_


Discussion:
Good catch. Thanks a bunch for reporting.
Will check if this is a new problem or if this was always there. 
OK things look fine when plotting on the default image

```python
from nilearn.maskers import NiftiSpheresMasker

coords = [(0, -52, 18), (-46, -68, 32)]

report = NiftiSpheresMasker(coords).fit().generate_report()

report.save_as_html("report.html")
```

![image](https://github.com/nilearn/nilearn/assets/6961185/866ebaf5-18ae-4a3e-a491-a3289d85a73f)

![image](https://github.com/nilearn/nilearn/assets/6961185/b6e56889-022f-4210-8919-01d7679669ed)


Resolving patch:
diff --git a/examples/03_connectivity/plot_sphere_based_connectome.py b/examples/03_connectivity/plot_sphere_based_connectome.py
--- a/examples/03_connectivity/plot_sphere_based_connectome.py
+++ b/examples/03_connectivity/plot_sphere_based_connectome.py
@@ -8,8 +8,8 @@
 and the Dosenbach-160 atlas (:footcite:t:`Dosenbach2010`).
 
 We estimate connectomes using two different methods: **sparse inverse
-covariance** and **partial_correlation**, to recover the functional brain
-**networks structure**.
+covariance** and **partial_correlation**,
+to recover the functional brain **networks structure**.
 
 We'll start by extracting signals from Default Mode Network regions and
 computing a connectome from them.
@@ -83,9 +83,9 @@
 # %%
 # Display spheres summary report
 # ------------------------------
-# By default all spheres are displayed. This can be tweaked by passing an
-# integer or list/array of indices to the ``displayed_spheres`` argument of
-# ``generate_report``.
+# By default all spheres are displayed.
+# This can be tweaked by passing an integer or list/array of indices
+# to the ``displayed_spheres`` argument of ``generate_report``.
 report = masker.generate_report()
 report
 
@@ -106,9 +106,9 @@
 # %%
 # Compute partial correlation matrix
 # -----------------------------------
-# Using object :class:`nilearn.connectome.ConnectivityMeasure`: Its
-# default covariance estimator is Ledoit-Wolf, allowing to obtain accurate
-# partial correlations.
+# Using object :class:`nilearn.connectome.ConnectivityMeasure`:
+# its default covariance estimator is Ledoit-Wolf,
+# allowing to obtain accurate partial correlations.
 
 from nilearn.connectome import ConnectivityMeasure
 
diff --git a/nilearn/maskers/nifti_spheres_masker.py b/nilearn/maskers/nifti_spheres_masker.py
--- a/nilearn/maskers/nifti_spheres_masker.py
+++ b/nilearn/maskers/nifti_spheres_masker.py
@@ -507,10 +507,10 @@ def _reporting(self):
             regions_summary["relative size (in %)"].append("not implemented")
             if idx in spheres_to_be_displayed:
                 display = plotting.plot_img(
-                    img, cut_coords=positions[idx], cmap="gray"
+                    img, cut_coords=seeds[idx], cmap="gray"
                 )
                 display.add_markers(
-                    marker_coords=[positions[idx]],
+                    marker_coords=[seeds[idx]],
                     marker_color="g",
                     marker_size=20 * radius,
                 )


Test patch: