<s> from matplotlib . backends . backend_qt4agg import FigureCanvasQTAgg as FigureCanvas <EOL> from matplotlib . figure import Figure <EOL> from PyQt4 import QtGui , QtCore <EOL> class MplCanvas ( FigureCanvas ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , parent = None , width = <NUM_LIT:5> , height = <NUM_LIT:4> , dpi = <NUM_LIT:100> ) : <EOL> self . fig = Figure ( figsize = ( width , height ) , dpi = dpi ) <EOL> self . axes = self . fig . add_subplot ( <NUM_LIT> ) <EOL> self . axes . autoscale ( enable = True , axis = '<STR_LIT:y>' , tight = True ) <EOL> FigureCanvas . __init__ ( self , self . fig ) <EOL> self . setParent ( parent ) <EOL> FigureCanvas . setSizePolicy ( self , <EOL> QtGui . QSizePolicy . Expanding , <EOL> QtGui . QSizePolicy . Expanding ) <EOL> FigureCanvas . updateGeometry ( self ) <EOL> def update_figure ( self ) : <EOL> self . draw ( ) <EOL> FigureCanvas . updateGeometry ( self ) </s>
