8000 Issue when plotting brain surface of ones · Issue #197 · netneurolab/neuromaps · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Issue when plotting brain surface of ones #197

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

Open
1 task done
enicolaisen opened this issue Mar 19, 2025 · 0 comments
Open
1 task done

Issue when plotting brain surface of ones #197

enicolaisen opened this issue Mar 19, 2025 · 0 comments

Comments

@enicolaisen
Copy link

Description of issue

Hi!

I am trying to plot a brain surface consisting only of ones in order to later test a potential issue with the transformation between spaces. However, I was not able to. I would appreciate any help in order to sort out what I am doing wrong.

This is the code snippet to reproduce the issue:

dataL      = np.ones(163842)
dataL      = dataL.astype(np.float32)
imageL     = nib.gifti.GiftiImage()
gii_dataL  = nib.gifti.GiftiDataArray(dataL)
imageL.add_gifti_data_array(gii_dataL)

giftis     = (imageL,imageL)
plotting.plot_surf_template(giftis, template='fsaverage', density='164k', surf='inflated',cmap='viridis',colorbar=True,hemi=None, data_dir=None, mask_medial=True, threshold=None)

And this is the error I get:

ValueError: x and y arguments to pcolormesh cannot have non-finite values or be of type numpy.ma.MaskedArray with masked values

Could you please help me find out how can I plot a brain surface of ones?

Thanks in advance for your help!

Best,
Eli

Code of Conduct

  • I agree to follow the neuromaps Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0