#NEWLINE# def qqplot_2samples( data1 , data2 , xlabel = None , ylabel = None , line = None , ax = None ) : #NEWLINE# #INDENT# "\n    Q-Q Plot of two samples' quantiles.\n\n    Can take either two `ProbPlot` instances or two array-like objects. In the\n    case of the latter, both inputs will be converted to `ProbPlot` instances\n    using only the default values - so use `ProbPlot` instances if\n    finer-grained control of the quantile computations is required.\n\n    Parameters\n    ----------\n    data1, data2 : array-like (1d) or `ProbPlot` instances\n    xlabel, ylabel : str or None\n        User-provided labels for the x-axis and y-axis. If None (default),\n        other values are used.\n    line : str {'45', 's', 'r', q'} or None\n        Options for the reference line to which the data is compared:\n\n        - '45' - 45-degree line\n        - 's' - standardized line, the expected order statistics are scaled\n          by the standard deviation of the given sample and have the mean\n          added to them\n        - 'r' - A regression line is fit\n        - 'q' - A line is fit through the quartiles.\n        - None - by default no reference line is added to the plot.\n\n    ax : Matplotlib AxesSubplot instance, optional\n        If given, this subplot is used to plot in instead of a new figure being\n        created.\n\n    Returns\n    -------\n    fig : Matplotlib figure instance\n        If `ax` is None, the created figure.  Otherwise the figure to which\n        `ax` is connected.\n\n    See Also\n    --------\n    scipy.stats.probplot\n\n    Examples\n    --------\n    >>> x = np.random.normal(loc=8.5, scale=2.5, size=37)\n    >>> y = np.random.normal(loc=8.0, scale=3.0, size=37)\n    >>> pp_x = sm.ProbPlot(x)\n    >>> pp_y = sm.ProbPlot(y)\n    >>> qqplot_2samples(data1, data2, xlabel=None, ylabel=None, line=None, ax=None):\n\n    Notes\n    -----\n    1) Depends on matplotlib.\n    2) If `data1` and `data2` are not `ProbPlot` instances, instances will be\n       created using the default parameters. Therefore, it is recommended to use\n       `ProbPlot` instance if fine-grained control is needed in the computation\n       of the quantiles.\n\n    " #NEWLINE# check_data1 = isinstance ( data1 , ProbPlot ) #NEWLINE# check_data2 = isinstance ( data2 , ProbPlot ) #NEWLINE# if ( ( not check_data1 ) and ( not check_data2 ) ) : #NEWLINE# #INDENT# data1 = ProbPlot ( data1 ) #NEWLINE# data2 = ProbPlot ( data2 ) #NEWLINE# #UNINDENT# fig = data1 . qqplot ( xlabel = xlabel , ylabel = ylabel , line = line , other = data2 , ax = ax ) #NEWLINE# return fig