matplotlib - tight_layout() for FigureCanvasTkAgg -


i need add 2 subplots in canvas. im trying use figurecanvastkagg plots need 3-d interactive. there equvivalent of tight_layout feature available in canvas/figurecanvastkagg ? tried figurecanvastkagg.tight_layout() , gives error..

f = figure(figsize=(5,3), dpi=100)  = f.add_subplot(121) a.plot([1,2,3,4,5,6,7,8],[5,6,1,3,8,9,3,5])  a1 = f.add_subplot(122) a1.plot([1,2,3,4,5,6,7,8],[5,6,1,3,8,9,3,5])  canvas = figurecanvastkagg(f, self) canvas.show() canvas.tight_layout() canvas.get_tk_widget().grid(row=20,column=6,sticky=w) 

understood trials. tight_layout() associated figure , not backend.

f.tight_layout() inserted before canvas declaration solves issue


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -