Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: marker size issue in plot_connectome #2185 #2186

Merged
merged 9 commits into from
Oct 28, 2019
6 changes: 5 additions & 1 deletion nilearn/plotting/displays.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ def _add_markers(self, marker_coords, marker_color, marker_size, **kwargs):
if self.direction == 'r' and xc >= 0:
relevant_coords.append(cidx)
elif self.direction == 'l' and xc <= 0:
relevant_coords.append(cidx)
relevant_coords.append(cidx)
xdata = xdata[relevant_coords]
ydata = ydata[relevant_coords]
# if marker_color is string for example 'red' or 'blue', then
Expand All @@ -414,6 +414,10 @@ def _add_markers(self, marker_coords, marker_color, marker_size, **kwargs):
if not isinstance(marker_color, _utils.compat._basestring) and \
len(marker_color) != 1:
marker_color = marker_color[relevant_coords]

if not isinstance(marker_size, numbers.Number):
marker_size = marker_size[relevant_coords]
robbisg marked this conversation as resolved.
Show resolved Hide resolved


defaults = {'marker': 'o',
'zorder': 1000}
Expand Down