def new_plot(parent=None, subplot_kw=None, **fig_kw):
 if (subplot_kw is None):
  subplot_kw = {}
 canvas = new_canvas(**fig_kw)
 canvas.setParent(parent)
 fig = canvas.figure
 ax = fig.add_subplot(1, 1, 1, **subplot_kw)
 return (fig, ax)

def new_plot ( parent = None , subplot_kw = None , ** fig_kw ) : if ( subplot_kw is None ) : subplot_kw = { } canvas = new_canvas ( ** fig_kw ) canvas . setParent ( parent ) fig = canvas . figure ax = fig . add_subplot ( 1 , 1 , 1 , ** subplot_kw ) return ( fig , ax )
return new figure and axes .