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
Open
@enicolaisen

Description

@enicolaisen

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type 3425

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0