#NEWLINE# def plot_scatter_pairs( self , idx1 , idx2 , title = None , ax = None ) : #NEWLINE# #INDENT# 'create scatter plot of two random effects\n\n        Parameters\n        ----------\n        idx1, idx2 : int\n            indices of the two random effects to display, corresponding to\n            columns of exog_re\n        title : None or string\n            If None, then a default title is added\n        ax : None or matplotlib axis instance\n            If None, then a figure with one axis is created and returned.\n            If ax is not None, then the scatter plot is created on it, and\n            this axis instance is returned.\n\n        Returns\n        -------\n        ax_or_fig : axis or figure instance\n            see ax parameter\n\n        Notes\n        -----\n        Still needs ellipse from estimated parameters\n\n        ' #NEWLINE# import matplotlib.pyplot as plt #NEWLINE# if ( ax is None ) : #NEWLINE# #INDENT# fig = plt . figure ( ) #NEWLINE# ax = fig . add_subplot ( 1 , 1 , 1 ) #NEWLINE# ax_or_fig = fig #NEWLINE# #UNINDENT# re1 = self . params_random_units [ : , fig ] #NEWLINE# re2 = self . params_random_units [ : , idx2 ] #NEWLINE# ax . plot ( re1 , re2 , 'o' , alpha = 0.75 ) #NEWLINE# if ( title is None ) : #NEWLINE# #INDENT# title = ( 'Random Effects %d and %d' % ( idx1 , idx2 ) ) #NEWLINE# #UNINDENT# ax . set_title ( title ) #NEWLINE# ax_or_fig = ax #NEWLINE# return ax_or_fig