def test_stacked_slicer(): # Test stacked slicers, like the XSlicer img = load_mni152_template() slicer = XSlicer.init_with_figure(img=img, cut_coords=3) slicer.add_overlay(img, cmap=plt.cm.gray) # Forcing a layout here, to test the locator code with tempfile.TemporaryFile() as fp: slicer.savefig(fp) slicer.close()
def test_stacked_slicer(): # Test stacked slicers, like the XSlicer mp.use('template', warn=False) import pylab as pl pl.switch_backend('template') pl.clf() img = load_mni152_template() slicer = XSlicer.init_with_figure(img=img, cut_coords=3) slicer.add_overlay(img, cmap=pl.cm.gray) # Forcing a layout here, to test the locator code slicer.savefig(tempfile.TemporaryFile()) slicer.close()
def test_stacked_slicer(): # Test stacked slicers, like the XSlicer mp.use('template', warn=False) import matplotlib.pyplot as plt plt.switch_backend('template') plt.clf() img = load_mni152_template() slicer = XSlicer.init_with_figure(img=img, cut_coords=3) slicer.add_overlay(img, cmap=plt.cm.gray) # Forcing a layout here, to test the locator code with tempfile.TemporaryFile() as fp: slicer.savefig(fp) slicer.close()