def update_params(self):
rows = self._rows<EOL>cols = self._cols<EOL>num = self._num<EOL>pars = self.figure.subplotpars<EOL>left = pars.left<EOL>right = pars.right<EOL>bottom = pars.bottom<EOL>top = pars.top<EOL>wspace = pars.wspace<EOL>hspace = pars.hspace<EOL>totWidth = right-left<EOL>totHeight = top-bottom<EOL>figH = totHeight/(rows + hspace*(rows-<NUM_LIT:1>))<EOL>sepH = hspace*figH<EOL>figW = totWidth/(cols + wspace*(cols-<NUM_LIT:1>))<EOL>sepW = wspace*figW<EOL>rowNum, colNum =  divmod(num, cols)<EOL>figBottom = top - (rowNum+<NUM_LIT:1>)*figH - rowNum*sepH<EOL>figLeft = left + colNum*(figW + sepW)<EOL>self.figbox = mtransforms.Bbox.from_bounds(figLeft, figBottom,<EOL>figW, figH)<EOL>self.rowNum = rowNum<EOL>self.colNum = colNum<EOL>self.numRows = rows<EOL>self.numCols = cols<EOL>if <NUM_LIT:0>:<EOL><INDENT>print('<STR_LIT>', rows, cols, num)<EOL>print('<STR_LIT>', left, bottom, right, top)<EOL>print('<STR_LIT>', self.figBottom)<EOL>print('<STR_LIT>', self.figLeft)<EOL>print('<STR_LIT>', self.figW)<EOL>print('<STR_LIT>', self.figH)<EOL>print('<STR_LIT>', self.rowNum)<EOL>print('<STR_LIT>', self.colNum)<EOL>print('<STR_LIT>', self.numRows)<EOL>print('<STR_LIT>', self.numCols)<EOL><DEDENT>
update the subplot position from fig.subplotpars