Skip to content

Commit

Permalink
Merge pull request #172 from liuzhenqi77/fix-plotting
Browse files Browse the repository at this point in the history
[FIX] Fix plotting issue
  • Loading branch information
liuzhenqi77 authored Sep 18, 2024
2 parents af78397 + 9f11acb commit cca0cbb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion neuromaps/nulls/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Functions for computing null models."""

__all__ = [
'naive_nonparametric', 'alexander_bloch', 'vazquez_rodriguez', 'vasa',
'alexander_bloch', 'vazquez_rodriguez', 'vasa',
'hungarian', 'baum', 'cornblath', 'burt2018', 'burt2020', 'moran'
]

Expand Down
11 changes: 7 additions & 4 deletions neuromaps/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,13 @@ def plot_surf_template(data, template, density, surf='inflated',
ax.disable_mouse_rotation()
plot_surf(geom, img, hemi=HEMI[hemi], axes=ax, view=view, **opts)
poly = ax.collections[0]
poly.set_facecolors(
_fix_facecolors(ax, poly._original_facecolor,
*geom, view, hemi)
)
try:
poly.set_facecolors(
_fix_facecolors(ax, poly._original_facecolor,
*geom, view, hemi)
)
except AttributeError:
pass

if not opts.get('colorbar', False):
fig.tight_layout()
Expand Down

0 comments on commit cca0cbb

Please sign in to comment.