nipy / PySurfer

Cortical neuroimaging visualization in Python
https://pysurfer.github.io/
BSD 3-Clause "New" or "Revised" License
239 stars 98 forks source link

save_montage on OSX: hemisphere truncated when saving montage #283

Closed mattvan83 closed 4 years ago

mattvan83 commented 4 years ago

Dear PySurfers,

I used pysurfer 0.10.dev0 on OSX computer and tried to save a dorsal view of both hemispheres using the following self contained example code:

b = Brain("fsaverage", "both", "white", cortex=None, background="black")
b.show_view("dor")
n = 163842
for hemi in ["lh", "rh"]:
    for colormap in ["Reds", "Blues"]:
        data = np.random.randn(n)
        b.add_data(data, min=0, max=1, thresh=0, colormap=colormap, colorbar=False, hemi=hemi)

This code gave me the correct following dorsal view:

Capture d’écran 2020-01-20 à 20 16 10

However, whenever trying to save this view with the following code, one of the hemisphere is truncated in the image saved: b.save_montage(os.path.join(WD,"self.contained.example.png"), order=['dorsal'], orientation='v', border_size=15, colorbar=None, row=-1, col=-1)

self contained example

Anyone would have an idea of this problem?

mwaskom commented 4 years ago

Is this a distinct issue from #282?

mattvan83 commented 4 years ago

Not distinct but specific to OSX since the problème didn't appear on CentOS.

Moreover, #282 has been redirected to problem of overlap and conjunction maps, but the truncated view problem is different from these.

mwaskom commented 4 years ago

I'm going to close this and we can continue the discussion of the montage truncation on #282. It's very confusing to have multiple issues open describing the same problem.