Closed story645 closed 4 years ago
fig, axd = plt.subplot_mosaic([['imds']]) imd = ap.Image(axd['imds'], dsa) axd['imds'].add_image(imd) #inside imshow axd['imds'].set_aspect('equal') #inside imshow fig.colorbar(imd, ax=axd['imds']) fig.savefig("imd.png")
---------------------------------------------- AttributeErrorTraceback (most recent call last) <ipython-input-39-efecf9540aa3> in <module> 2 im = axd['im'].imshow(arr.T) 3 fig.colorbar(im, ax=axd['im']) ----> 4 fig.savefig("im.png") 5 6 fig, axd = plt.subplot_mosaic([['imds']]) ~\Anaconda3\envs\mplrelease\lib\site-packages\matplotlib\figure.py in savefig(self, fname, transparent, **kwargs) 2305 patch.set_edgecolor('none') 2306 -> 2307 self.canvas.print_figure(fname, **kwargs) 2308 2309 if transparent: ~\Anaconda3\envs\mplrelease\lib\site-packages\matplotlib\backend_bases.py in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, bbox_inches, pad_inches, bbox_extra_artists, backend, **kwargs) 2216 self.figure.set_edgecolor(origedgecolor) 2217 self.figure.set_canvas(self) -> 2218 return result 2219 2220 @classmethod ~\Anaconda3\envs\mplrelease\lib\contextlib.py in __exit__(self, type, value, traceback) 118 if type is None: 119 try: --> 120 next(self.gen) 121 except StopIteration: 122 return False ~\Anaconda3\envs\mplrelease\lib\site-packages\matplotlib\cbook\__init__.py in _setattr_cm(obj, **kwargs) 2064 for attr, orig in origs.items(): 2065 if orig is sentinel: -> 2066 delattr(obj, attr) 2067 else: 2068 setattr(obj, attr, orig) AttributeError: __delete__