We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
line_width param in view_connectome has no effect
The parameter `line_width` in `html_connectome.view_connectome()` is not associated with any functionality.
Should we remove it or is there a reason for it to be there?

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `nilearn/plotting/html_connectome.py`
Content:
```
1 import functools
2 import json
3 import warnings
4 
5 import numpy as np
6 from scipy import sparse
7 
8 from nilearn._utils import replace_parameters
9 from .. import datasets
10 from . import cm
11 
12 from .js_plotting_utils import (add_js_lib, HTMLDocument, mesh_to_plotly,
13                                 encode, colorscale, get_html_template,
14                                 to_color_strings)
15 
16 
17 class ConnectomeView(HTMLDocument):
18     pass
19 
20 
21 def _prepare_line(edges, nodes):
22     path_edges = np.zeros(len(edges) * 3, dtype=int)
23     path_edges[::3] = edges
24     path_edges[1::3] = edges
25     path_nodes = np.zeros(len(nodes) * 3, dtype=int)
26     path_nodes[::3] = nodes[:, 0]
27     path_nodes[1::3] = nodes[:, 1]
28     return path_edges, path_nodes
29 
30 
31 def _get_connectome(adjacency_matrix, coords, threshold=None,
32                     marker_size=None, cmap=cm.cold_hot, symmetric_cmap=True):
33     connectome = {}
34     coords = np.asarray(coords, dtype='<f4')
35     adjacency_matrix = adjacency_matrix.copy()
36     colors = colorscale(
37         cmap, adjacency_matrix.ravel(), threshold=threshold,
38         symmetric_cmap=symmetric_cmap)
39     connectome['colorscale'] = colors['colors']
40     connectome['cmin'] = float(colors['vmin'])
41     connectome['cmax'] = float(colors['vmax'])
42     if threshold is not None:
43         adjacency_matrix[
44             np.abs(adjacency_matrix) <= colors['abs_threshold']] = 0
45     s = sparse.coo_matrix(adjacency_matrix)
46     nodes = np.asarray([s.row, s.col], dtype=int).T
47     edges = np.arange(len(nodes))
48     path_edges, path_nodes = _prepare_line(edges, nodes)
49     connectome["_con_w"] = encode(np.asarray(s.data, dtype='<f4')[path_edges])
50     c = coords[path_nodes]
51     if np.ndim(marker_size) > 0:
52         marker_size = np.asarray(marker_size)
53         marker_size = marker_size[path_nodes]
54     x, y, z = c.T
55     for coord, cname in [(x, "x"), (y, "y"), (z, "z")]:
56         connectome["_con_{}".format(cname)] = encode(
57             np.asarray(coord, dtype='<f4'))
58     connectome["markers_only"] = False
59     if hasattr(marker_size, 'tolist'):
60         marker_size = marker_size.tolist()
61     connectome['marker_size'] = marker_size
62     return connectome
63 
64 
65 def _get_markers(coords, colors):
66     connectome = {}
67     coords = np.asarray(coords, dtype='<f4')
68     x, y, z = coords.T
69     for coord, cname in [(x, "x"), (y, "y"), (z, "z")]:
70         connectome["_con_{}".format(cname)] = encode(
71             np.asarray(coord, dtype='<f4'))
72     connectome["marker_color"] = to_color_strings(colors)
73     connectome["markers_only"] = True
74     return connectome
75 
76 
77 def _make_connectome_html(connectome_info, embed_js=True):
78     plot_info = {"connectome": connectome_info}
79     mesh = datasets.fetch_surf_fsaverage()
80     for hemi in ['pial_left', 'pial_right']:
81         plot_info[hemi] = mesh_to_plotly(mesh[hemi])
82     as_json = json.dumps(plot_info)
83     as_html = get_html_template(
84         'connectome_plot_template.html').safe_substitute(
85             {'INSERT_CONNECTOME_JSON_HERE': as_json})
86     as_html = add_js_lib(as_html, embed_js=embed_js)
87     return ConnectomeView(as_html)
88 
89 
90 def _replacement_params_view_connectome():
91     """ Returns a dict containing deprecated & replacement parameters
92         as key-value pair for view_connectome().
93         Avoids cluttering the global namespace.
94     """
95     return {
96         'coords': 'node_coords',
97         'threshold': 'edge_threshold',
98         'cmap': 'edge_cmap',
99         'marker_size': 'node_size',
100         }
101 
102 @replace_parameters(replacement_params=_replacement_params_view_connectome(),
103                     end_version='0.6.0',
104                     lib_name='Nilearn',
105                     )
106 def view_connectome(adjacency_matrix, node_coords, edge_threshold=None,
107                     edge_cmap=cm.bwr, symmetric_cmap=True,
108                     linewidth=6., node_size=3.,
109                     ):
110     """
111     Insert a 3d plot of a connectome into an HTML page.
112 
113     Parameters
114     ----------
115     adjacency_matrix : ndarray, shape=(n_nodes, n_nodes)
116         the weights of the edges.
117 
118     node_coords : ndarray, shape=(n_nodes, 3)
119         the coordinates of the nodes in MNI space.
120 
121     edge_threshold : str, number or None, optional (default=None)
122         If None, no thresholding.
123         If it is a number only connections of amplitude greater
124         than threshold will be shown.
125         If it is a string it must finish with a percent sign,
126         e.g. "25.3%", and only connections of amplitude above the
127         given percentile will be shown.
128 
129     edge_cmap : str or matplotlib colormap, optional
130 
131     symmetric_cmap : bool, optional (default=True)
132         Make colormap symmetric (ranging from -vmax to vmax).
133 
134     linewidth : float, optional (default=6.)
135         Width of the lines that show connections.
136 
137     node_size : float, optional (default=3.)
138         Size of the markers showing the seeds in pixels.
139 
140     Returns
141     -------
142     ConnectomeView : plot of the connectome.
143         It can be saved as an html page or rendered (transparently) by the
144         Jupyter notebook. Useful methods are :
145 
146         - 'resize' to resize the plot displayed in a Jupyter notebook
147         - 'save_as_html' to save the plot to a file
148         - 'open_in_browser' to save the plot and open it in a web browser.
149 
150     See Also
151     --------
152     nilearn.plotting.plot_connectome:
153         projected views of a connectome in a glass brain.
154 
155     nilearn.plotting.view_markers:
156         interactive plot of colored markers
157 
158     nilearn.plotting.view_surf, nilearn.plotting.view_img_on_surf:
159         interactive view of statistical maps or surface atlases on the cortical
160         surface.
161 
162     """
163     connectome_info = _get_connectome(
164         adjacency_matrix, node_coords, threshold=edge_threshold, cmap=edge_cmap,
165         symmetric_cmap=symmetric_cmap, marker_size=node_size)
166     return _make_connectome_html(connectome_info)
167 
168 
169 def _replacement_params_view_markers():
170     """ Returns a dict containing deprecated & replacement parameters
171         as key-value pair for view_markers().
172         Avoids cluttering the global namespace.
173     """
174     return {'coords': 'marker_coords',
175             'colors': 'marker_color',
176             }
177 
178 
179 @replace_parameters(replacement_params=_replacement_params_view_markers(),
180                     end_version='0.6.0',
181                     lib_name='Nilearn',
182                     )
183 def view_markers(marker_coords, marker_color=None, marker_size=5.):
184     """
185     Insert a 3d plot of markers in a brain into an HTML page.
186 
187     Parameters
188     ----------
189     marker_coords : ndarray, shape=(n_nodes, 3)
190         the coordinates of the nodes in MNI space.
191 
192     marker_color : ndarray, shape=(n_nodes,)
193         colors of the markers: list of strings, hex rgb or rgba strings, rgb
194         triplets, or rgba triplets (i.e. formats accepted by matplotlib, see
195         https://matplotlib.org/users/colors.html#specifying-colors)
196 
197     marker_size : float or array-like, optional (default=3.)
198         Size of the markers showing the seeds in pixels.
199 
200     Returns
201     -------
202     ConnectomeView : plot of the markers.
203         It can be saved as an html page or rendered (transparently) by the
204         Jupyter notebook. Useful methods are :
205 
206         - 'resize' to resize the plot displayed in a Jupyter notebook
207         - 'save_as_html' to save the plot to a file
208         - 'open_in_browser' to save the plot and open it in a web browser.
209 
210     See Also
211     --------
212     nilearn.plotting.plot_connectome:
213         projected views of a connectome in a glass brain.
214 
215     nilearn.plotting.view_connectome:
216         interactive plot of a connectome.
217 
218     nilearn.plotting.view_surf, nilearn.plotting.view_img_on_surf:
219         interactive view of statistical maps or surface atlases on the cortical
220         surface.
221 
222     """
223     if marker_color is None:
224         marker_color = ['red' for i in range(len(marker_coords))]
225     connectome_info = _get_markers(marker_coords, marker_color)
226     if hasattr(marker_size, 'tolist'):
227         marker_size = marker_size.tolist()
228     connectome_info["marker_size"] = marker_size
229     return _make_connectome_html(connectome_info)
230
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/nilearn/plotting/html_connectome.py b/nilearn/plotting/html_connectome.py
--- a/nilearn/plotting/html_connectome.py
+++ b/nilearn/plotting/html_connectome.py
@@ -159,6 +159,7 @@
     connectome_info = _get_connectome(
         adjacency_matrix, node_coords, threshold=edge_threshold, cmap=edge_cmap,
         symmetric_cmap=symmetric_cmap, marker_size=node_size)
+    connectome_info['line_width'] = linewidth
     return _make_connectome_html(connectome_info)

{"golden_diff": "diff --git a/nilearn/plotting/html_connectome.py b/nilearn/plotting/html_connectome.py\n--- a/nilearn/plotting/html_connectome.py\n+++ b/nilearn/plotting/html_connectome.py\n@@ -159,6 +159,7 @@\n     connectome_info = _get_connectome(\n         adjacency_matrix, node_coords, threshold=edge_threshold, cmap=edge_cmap,\n         symmetric_cmap=symmetric_cmap, marker_size=node_size)\n+    connectome_info['line_width'] = linewidth\n     return _make_connectome_html(connectome_info)\n", "issue": "line_width param in view_connectome has no effect\nThe parameter `line_width` in `html_connectome.view_connectome()` is not associated with any functionality.\r\nShould we remove it or is there a reason for it to be there?\n", "before_files": [{"content": "import functools\nimport json\nimport warnings\n\nimport numpy as np\nfrom scipy import sparse\n\nfrom nilearn._utils import replace_parameters\nfrom .. import datasets\nfrom . import cm\n\nfrom .js_plotting_utils import (add_js_lib, HTMLDocument, mesh_to_plotly,\n                                encode, colorscale, get_html_template,\n                                to_color_strings)\n\n\nclass ConnectomeView(HTMLDocument):\n    pass\n\n\ndef _prepare_line(edges, nodes):\n    path_edges = np.zeros(len(edges) * 3, dtype=int)\n    path_edges[::3] = edges\n    path_edges[1::3] = edges\n    path_nodes = np.zeros(len(nodes) * 3, dtype=int)\n    path_nodes[::3] = nodes[:, 0]\n    path_nodes[1::3] = nodes[:, 1]\n    return path_edges, path_nodes\n\n\ndef _get_connectome(adjacency_matrix, coords, threshold=None,\n                    marker_size=None, cmap=cm.cold_hot, symmetric_cmap=True):\n    connectome = {}\n    coords = np.asarray(coords, dtype='<f4')\n    adjacency_matrix = adjacency_matrix.copy()\n    colors = colorscale(\n        cmap, adjacency_matrix.ravel(), threshold=threshold,\n        symmetric_cmap=symmetric_cmap)\n    connectome['colorscale'] = colors['colors']\n    connectome['cmin'] = float(colors['vmin'])\n    connectome['cmax'] = float(colors['vmax'])\n    if threshold is not None:\n        adjacency_matrix[\n            np.abs(adjacency_matrix) <= colors['abs_threshold']] = 0\n    s = sparse.coo_matrix(adjacency_matrix)\n    nodes = np.asarray([s.row, s.col], dtype=int).T\n    edges = np.arange(len(nodes))\n    path_edges, path_nodes = _prepare_line(edges, nodes)\n    connectome[\"_con_w\"] = encode(np.asarray(s.data, dtype='<f4')[path_edges])\n    c = coords[path_nodes]\n    if np.ndim(marker_size) > 0:\n        marker_size = np.asarray(marker_size)\n        marker_size = marker_size[path_nodes]\n    x, y, z = c.T\n    for coord, cname in [(x, \"x\"), (y, \"y\"), (z, \"z\")]:\n        connectome[\"_con_{}\".format(cname)] = encode(\n            np.asarray(coord, dtype='<f4'))\n    connectome[\"markers_only\"] = False\n    if hasattr(marker_size, 'tolist'):\n        marker_size = marker_size.tolist()\n    connectome['marker_size'] = marker_size\n    return connectome\n\n\ndef _get_markers(coords, colors):\n    connectome = {}\n    coords = np.asarray(coords, dtype='<f4')\n    x, y, z = coords.T\n    for coord, cname in [(x, \"x\"), (y, \"y\"), (z, \"z\")]:\n        connectome[\"_con_{}\".format(cname)] = encode(\n            np.asarray(coord, dtype='<f4'))\n    connectome[\"marker_color\"] = to_color_strings(colors)\n    connectome[\"markers_only\"] = True\n    return connectome\n\n\ndef _make_connectome_html(connectome_info, embed_js=True):\n    plot_info = {\"connectome\": connectome_info}\n    mesh = datasets.fetch_surf_fsaverage()\n    for hemi in ['pial_left', 'pial_right']:\n        plot_info[hemi] = mesh_to_plotly(mesh[hemi])\n    as_json = json.dumps(plot_info)\n    as_html = get_html_template(\n        'connectome_plot_template.html').safe_substitute(\n            {'INSERT_CONNECTOME_JSON_HERE': as_json})\n    as_html = add_js_lib(as_html, embed_js=embed_js)\n    return ConnectomeView(as_html)\n\n\ndef _replacement_params_view_connectome():\n    \"\"\" Returns a dict containing deprecated & replacement parameters\n        as key-value pair for view_connectome().\n        Avoids cluttering the global namespace.\n    \"\"\"\n    return {\n        'coords': 'node_coords',\n        'threshold': 'edge_threshold',\n        'cmap': 'edge_cmap',\n        'marker_size': 'node_size',\n        }\n\n@replace_parameters(replacement_params=_replacement_params_view_connectome(),\n                    end_version='0.6.0',\n                    lib_name='Nilearn',\n                    )\ndef view_connectome(adjacency_matrix, node_coords, edge_threshold=None,\n                    edge_cmap=cm.bwr, symmetric_cmap=True,\n                    linewidth=6., node_size=3.,\n                    ):\n    \"\"\"\n    Insert a 3d plot of a connectome into an HTML page.\n\n    Parameters\n    ----------\n    adjacency_matrix : ndarray, shape=(n_nodes, n_nodes)\n        the weights of the edges.\n\n    node_coords : ndarray, shape=(n_nodes, 3)\n        the coordinates of the nodes in MNI space.\n\n    edge_threshold : str, number or None, optional (default=None)\n        If None, no thresholding.\n        If it is a number only connections of amplitude greater\n        than threshold will be shown.\n        If it is a string it must finish with a percent sign,\n        e.g. \"25.3%\", and only connections of amplitude above the\n        given percentile will be shown.\n\n    edge_cmap : str or matplotlib colormap, optional\n\n    symmetric_cmap : bool, optional (default=True)\n        Make colormap symmetric (ranging from -vmax to vmax).\n\n    linewidth : float, optional (default=6.)\n        Width of the lines that show connections.\n\n    node_size : float, optional (default=3.)\n        Size of the markers showing the seeds in pixels.\n\n    Returns\n    -------\n    ConnectomeView : plot of the connectome.\n        It can be saved as an html page or rendered (transparently) by the\n        Jupyter notebook. Useful methods are :\n\n        - 'resize' to resize the plot displayed in a Jupyter notebook\n        - 'save_as_html' to save the plot to a file\n        - 'open_in_browser' to save the plot and open it in a web browser.\n\n    See Also\n    --------\n    nilearn.plotting.plot_connectome:\n        projected views of a connectome in a glass brain.\n\n    nilearn.plotting.view_markers:\n        interactive plot of colored markers\n\n    nilearn.plotting.view_surf, nilearn.plotting.view_img_on_surf:\n        interactive view of statistical maps or surface atlases on the cortical\n        surface.\n\n    \"\"\"\n    connectome_info = _get_connectome(\n        adjacency_matrix, node_coords, threshold=edge_threshold, cmap=edge_cmap,\n        symmetric_cmap=symmetric_cmap, marker_size=node_size)\n    return _make_connectome_html(connectome_info)\n\n\ndef _replacement_params_view_markers():\n    \"\"\" Returns a dict containing deprecated & replacement parameters\n        as key-value pair for view_markers().\n        Avoids cluttering the global namespace.\n    \"\"\"\n    return {'coords': 'marker_coords',\n            'colors': 'marker_color',\n            }\n\n\n@replace_parameters(replacement_params=_replacement_params_view_markers(),\n                    end_version='0.6.0',\n                    lib_name='Nilearn',\n                    )\ndef view_markers(marker_coords, marker_color=None, marker_size=5.):\n    \"\"\"\n    Insert a 3d plot of markers in a brain into an HTML page.\n\n    Parameters\n    ----------\n    marker_coords : ndarray, shape=(n_nodes, 3)\n        the coordinates of the nodes in MNI space.\n\n    marker_color : ndarray, shape=(n_nodes,)\n        colors of the markers: list of strings, hex rgb or rgba strings, rgb\n        triplets, or rgba triplets (i.e. formats accepted by matplotlib, see\n        https://matplotlib.org/users/colors.html#specifying-colors)\n\n    marker_size : float or array-like, optional (default=3.)\n        Size of the markers showing the seeds in pixels.\n\n    Returns\n    -------\n    ConnectomeView : plot of the markers.\n        It can be saved as an html page or rendered (transparently) by the\n        Jupyter notebook. Useful methods are :\n\n        - 'resize' to resize the plot displayed in a Jupyter notebook\n        - 'save_as_html' to save the plot to a file\n        - 'open_in_browser' to save the plot and open it in a web browser.\n\n    See Also\n    --------\n    nilearn.plotting.plot_connectome:\n        projected views of a connectome in a glass brain.\n\n    nilearn.plotting.view_connectome:\n        interactive plot of a connectome.\n\n    nilearn.plotting.view_surf, nilearn.plotting.view_img_on_surf:\n        interactive view of statistical maps or surface atlases on the cortical\n        surface.\n\n    \"\"\"\n    if marker_color is None:\n        marker_color = ['red' for i in range(len(marker_coords))]\n    connectome_info = _get_markers(marker_coords, marker_color)\n    if hasattr(marker_size, 'tolist'):\n        marker_size = marker_size.tolist()\n    connectome_info[\"marker_size\"] = marker_size\n    return _make_connectome_html(connectome_info)\n", "path": "nilearn/plotting/html_connectome.py"}], "after_files": [{"content": "import functools\nimport json\nimport warnings\n\nimport numpy as np\nfrom scipy import sparse\nfrom .. import datasets\nfrom . import cm\n\nfrom .js_plotting_utils import (add_js_lib, HTMLDocument, mesh_to_plotly,\n                                encode, colorscale, get_html_template,\n                                to_color_strings)\n\n\nclass ConnectomeView(HTMLDocument):\n    pass\n\n\ndef _prepare_line(edges, nodes):\n    path_edges = np.zeros(len(edges) * 3, dtype=int)\n    path_edges[::3] = edges\n    path_edges[1::3] = edges\n    path_nodes = np.zeros(len(nodes) * 3, dtype=int)\n    path_nodes[::3] = nodes[:, 0]\n    path_nodes[1::3] = nodes[:, 1]\n    return path_edges, path_nodes\n\n\ndef _get_connectome(adjacency_matrix, coords, threshold=None,\n                    marker_size=None, cmap=cm.cold_hot, symmetric_cmap=True):\n    connectome = {}\n    coords = np.asarray(coords, dtype='<f4')\n    adjacency_matrix = adjacency_matrix.copy()\n    colors = colorscale(\n        cmap, adjacency_matrix.ravel(), threshold=threshold,\n        symmetric_cmap=symmetric_cmap)\n    connectome['colorscale'] = colors['colors']\n    connectome['cmin'] = float(colors['vmin'])\n    connectome['cmax'] = float(colors['vmax'])\n    if threshold is not None:\n        adjacency_matrix[\n            np.abs(adjacency_matrix) <= colors['abs_threshold']] = 0\n    s = sparse.coo_matrix(adjacency_matrix)\n    nodes = np.asarray([s.row, s.col], dtype=int).T\n    edges = np.arange(len(nodes))\n    path_edges, path_nodes = _prepare_line(edges, nodes)\n    connectome[\"_con_w\"] = encode(np.asarray(s.data, dtype='<f4')[path_edges])\n    c = coords[path_nodes]\n    if np.ndim(marker_size) > 0:\n        marker_size = np.asarray(marker_size)\n        marker_size = marker_size[path_nodes]\n    x, y, z = c.T\n    for coord, cname in [(x, \"x\"), (y, \"y\"), (z, \"z\")]:\n        connectome[\"_con_{}\".format(cname)] = encode(\n            np.asarray(coord, dtype='<f4'))\n    connectome[\"markers_only\"] = False\n    if hasattr(marker_size, 'tolist'):\n        marker_size = marker_size.tolist()\n    connectome['marker_size'] = marker_size\n    return connectome\n\n\ndef _get_markers(coords, colors):\n    connectome = {}\n    coords = np.asarray(coords, dtype='<f4')\n    x, y, z = coords.T\n    for coord, cname in [(x, \"x\"), (y, \"y\"), (z, \"z\")]:\n        connectome[\"_con_{}\".format(cname)] = encode(\n            np.asarray(coord, dtype='<f4'))\n    connectome[\"marker_color\"] = to_color_strings(colors)\n    connectome[\"markers_only\"] = True\n    return connectome\n\n\ndef _make_connectome_html(connectome_info, embed_js=True):\n    plot_info = {\"connectome\": connectome_info}\n    mesh = datasets.fetch_surf_fsaverage()\n    for hemi in ['pial_left', 'pial_right']:\n        plot_info[hemi] = mesh_to_plotly(mesh[hemi])\n    as_json = json.dumps(plot_info)\n    as_html = get_html_template(\n        'connectome_plot_template.html').safe_substitute(\n            {'INSERT_CONNECTOME_JSON_HERE': as_json})\n    as_html = add_js_lib(as_html, embed_js=embed_js)\n    return ConnectomeView(as_html)\n\n\ndef _deprecate_params_view_connectome(func):\n    \"\"\" Decorator to deprecate specific parameters in view_connectome()\n     without modifying view_connectome().\n     \"\"\"\n    @functools.wraps(func)\n    def wrapper(*args, **kwargs):\n        _warn_deprecated_params_view_connectome(kwargs)\n        kwargs = _transfer_deprecated_param_vals_view_connectome(kwargs)\n        return func(*args, **kwargs)\n    \n    return wrapper\n\n\n@_deprecate_params_view_connectome\ndef view_connectome(adjacency_matrix, node_coords, edge_threshold=None,\n                    edge_cmap=cm.bwr, symmetric_cmap=True,\n                    linewidth=6., node_size=3.,\n                    **kwargs):\n    \"\"\"\n    Insert a 3d plot of a connectome into an HTML page.\n\n    Parameters\n    ----------\n    adjacency_matrix : ndarray, shape=(n_nodes, n_nodes)\n        the weights of the edges.\n\n    node_coords : ndarray, shape=(n_nodes, 3)\n        the coordinates of the nodes in MNI space.\n\n    edge_threshold : str, number or None, optional (default=None)\n        If None, no thresholding.\n        If it is a number only connections of amplitude greater\n        than threshold will be shown.\n        If it is a string it must finish with a percent sign,\n        e.g. \"25.3%\", and only connections of amplitude above the\n        given percentile will be shown.\n\n    edge_cmap : str or matplotlib colormap, optional\n\n    symmetric_cmap : bool, optional (default=True)\n        Make colormap symmetric (ranging from -vmax to vmax).\n\n    linewidth : float, optional (default=6.)\n        Width of the lines that show connections.\n\n    node_size : float, optional (default=3.)\n        Size of the markers showing the seeds in pixels.\n\n    Returns\n    -------\n    ConnectomeView : plot of the connectome.\n        It can be saved as an html page or rendered (transparently) by the\n        Jupyter notebook. Useful methods are :\n\n        - 'resize' to resize the plot displayed in a Jupyter notebook\n        - 'save_as_html' to save the plot to a file\n        - 'open_in_browser' to save the plot and open it in a web browser.\n\n    See Also\n    --------\n    nilearn.plotting.plot_connectome:\n        projected views of a connectome in a glass brain.\n\n    nilearn.plotting.view_markers:\n        interactive plot of colored markers\n\n    nilearn.plotting.view_surf, nilearn.plotting.view_img_on_surf:\n        interactive view of statistical maps or surface atlases on the cortical\n        surface.\n\n    \"\"\"\n    connectome_info = _get_connectome(\n        adjacency_matrix, node_coords, threshold=edge_threshold, cmap=edge_cmap,\n        symmetric_cmap=symmetric_cmap, marker_size=node_size)\n    connectome_info['line_width'] = linewidth\n    return _make_connectome_html(connectome_info)\n\n\ndef _warn_deprecated_params_view_connectome(kwargs):\n    \"\"\" For view_connectome(), raises warnings about deprecated parameters.\n    \"\"\"\n    all_deprecated_params = {'coords': 'node_coords',\n                             'threshold': 'edge_threshold',\n                             'cmap': 'edge_cmap',\n                             'marker_size': 'node_size',\n                             }\n    used_deprecated_params = set(kwargs).intersection(all_deprecated_params)\n    for deprecated_param_ in used_deprecated_params:\n        replacement_param = all_deprecated_params[deprecated_param_]\n        param_deprecation_msg = (\n            'The parameter \"{}\" will be removed in Nilearn version 0.6.0. '\n            'Please use the parameter \"{}\" instead.'.format(deprecated_param_,\n                                                            replacement_param,\n                                                            )\n        )\n        warnings.filterwarnings('always', message=param_deprecation_msg)\n        warnings.warn(category=DeprecationWarning,\n                      message=param_deprecation_msg,\n                      stacklevel=3)\n\n\ndef _transfer_deprecated_param_vals_view_connectome(kwargs):\n    \"\"\" For view_connectome(), reassigns new parameters the values passed\n    to their corresponding deprecated parameters.\n    \"\"\"\n    coords = kwargs.get('coords', None)\n    threshold = kwargs.get('threshold', None)\n    cmap = kwargs.get('cmap', None)\n    marker_size = kwargs.get('marker_size', None)\n    \n    if coords is not None:\n        kwargs['node_coords'] = coords\n    if threshold is not None:\n        kwargs['edge_threshold'] = threshold\n    if cmap is not None:\n        kwargs['edge_cmap'] = cmap\n    if marker_size is not None:\n        kwargs['node_size'] = marker_size\n    return kwargs\n\n\ndef _deprecate_params_view_markers(func):\n    \"\"\" Decorator to deprecate specific parameters in view_markers()\n     without modifying view_markers().\n     \"\"\"\n\n    @functools.wraps(func)\n    def wrapper(*args, **kwargs):\n        _warn_deprecated_params_view_markers(kwargs)\n        kwargs = _transfer_deprecated_param_vals_view_markers(kwargs)\n        return func(*args, **kwargs)\n    return wrapper\n\n\n@_deprecate_params_view_markers\ndef view_markers(marker_coords, marker_color=None, marker_size=5., **kwargs):\n    \"\"\"\n    Insert a 3d plot of markers in a brain into an HTML page.\n\n    Parameters\n    ----------\n    marker_coords : ndarray, shape=(n_nodes, 3)\n        the coordinates of the nodes in MNI space.\n\n    marker_color : ndarray, shape=(n_nodes,)\n        colors of the markers: list of strings, hex rgb or rgba strings, rgb\n        triplets, or rgba triplets (i.e. formats accepted by matplotlib, see\n        https://matplotlib.org/users/colors.html#specifying-colors)\n\n    marker_size : float or array-like, optional (default=3.)\n        Size of the markers showing the seeds in pixels.\n\n    Returns\n    -------\n    ConnectomeView : plot of the markers.\n        It can be saved as an html page or rendered (transparently) by the\n        Jupyter notebook. Useful methods are :\n\n        - 'resize' to resize the plot displayed in a Jupyter notebook\n        - 'save_as_html' to save the plot to a file\n        - 'open_in_browser' to save the plot and open it in a web browser.\n\n    See Also\n    --------\n    nilearn.plotting.plot_connectome:\n        projected views of a connectome in a glass brain.\n\n    nilearn.plotting.view_connectome:\n        interactive plot of a connectome.\n\n    nilearn.plotting.view_surf, nilearn.plotting.view_img_on_surf:\n        interactive view of statistical maps or surface atlases on the cortical\n        surface.\n\n    \"\"\"\n    if marker_color is None:\n        marker_color = ['red' for i in range(len(marker_coords))]\n    connectome_info = _get_markers(marker_coords, marker_color)\n    if hasattr(marker_size, 'tolist'):\n        marker_size = marker_size.tolist()\n    connectome_info[\"marker_size\"] = marker_size\n    return _make_connectome_html(connectome_info)\n\n\ndef _warn_deprecated_params_view_markers(kwargs):\n    \"\"\" For view_markers(), raises warnings about deprecated parameters.\n    \"\"\"\n\n    all_deprecated_params = {'coords': 'marker_coords',\n                             'colors': 'marker_color',\n                             }\n    used_dperecated_params = set(kwargs).intersection(all_deprecated_params)\n    for deprecated_param_ in used_dperecated_params:\n        replacement_param = all_deprecated_params[deprecated_param_]\n        param_deprecation_msg = (\n            'The parameter \"{}\" will be removed in Nilearn version 0.6.0. '\n            'Please use the parameter \"{}\" instead.'.format(deprecated_param_,\n                                                            replacement_param,\n                                                            )\n        )\n        warnings.filterwarnings('always', message=param_deprecation_msg)\n        warnings.warn(category=DeprecationWarning,\n                      message=param_deprecation_msg,\n                      stacklevel=3,\n                      )\n\n\ndef _transfer_deprecated_param_vals_view_markers(kwargs):\n    \"\"\" For view_markers(), reassigns new parameters the values passed\n    to their corresponding deprecated parameters.\n    \"\"\"\n    coords = kwargs.get('coords', None)\n    colors = kwargs.get('colors', None)\n    \n    if coords is not None:\n        kwargs['marker_coords'] = coords\n    if colors is not None:\n        kwargs['marker_color'] = colors\n    return kwargs\n", "path": "nilearn/plotting/html_connectome.py"}]}