def __init__(self, fig, *args, **kwargs):
self.figure = fig<EOL>if len(args)==<NUM_LIT:1>:<EOL><INDENT>s = str(args[<NUM_LIT:0>])<EOL>if len(s) != <NUM_LIT:3>:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>rows, cols, num = list(map(int, s))<EOL><DEDENT>elif len(args)==<NUM_LIT:3>:<EOL><INDENT>rows, cols, num = args<EOL><DEDENT>else:<EOL><INDENT>raise ValueError(  '<STR_LIT>')<EOL><DEDENT>total = rows*cols<EOL>num -= <NUM_LIT:1>    <EOL>if num >= total:<EOL><INDENT>raise ValueError( '<STR_LIT>')<EOL><DEDENT>self._rows = rows<EOL>self._cols = cols<EOL>self._num = num<EOL>self.update_params()<EOL>self._axes_class.__init__(self, fig, self.figbox, **kwargs)<EOL>
*fig* is a :class:`matplotlib.figure.Figure` instance.

*args* is the tuple (*numRows*, *numCols*, *plotNum*), where
the array of subplots in the figure has dimensions *numRows*,
*numCols*, and where *plotNum* is the number of the subplot
being created.  *plotNum* starts at 1 in the upper left
corner and increases to the right.

If *numRows* <= *numCols* <= *plotNum* < 10, *args* can be the
decimal integer *numRows* * 100 + *numCols* * 10 + *plotNum*.