#NEWLINE# def errorfill( x , y , yerr = None , xerr = None , color = None , ls = None , lw = None , alpha = 1 , alpha_fill = 0.3 , label = '' , label_fill = '' , ax = None , marker = None ) : #NEWLINE# #INDENT# 'Plot data with errors marked by a filled region.\n\n    Parameters\n    ----------\n    x, y : arrays\n        Coordinates of data.\n    yerr, xerr: [scalar | N, (N, 1), or (2, N) array]\n        Error for the input data.\n        - If scalar, then filled region spans `y +/- yerr` or `x +/- xerr`.\n    color : Matplotlib color\n        Color of line and fill region.\n    ls : Matplotlib line style\n        Style of the line\n    lw : Matplotlib line width, float value in points\n        Width of the line\n    alpha : float\n        Opacity used for plotting.\n    alpha_fill : float\n        Opacity of filled region. Note: the actual opacity of the fill is\n        `alpha * alpha_fill`.\n    label : str\n        Label for line.\n    label_fill : str\n        Label for filled region.\n    ax : Axis instance\n        The plot is drawn on axis `ax`. If `None` the current axis is used\n    ' #NEWLINE# ax = ( ax if ( ax is not None ) else plt . gca ( ) ) #NEWLINE# alpha_fill *= alpha #NEWLINE# if ( color is None ) : #NEWLINE# #INDENT# color = next ( ax . _get_lines . color_cycle ) #NEWLINE# #UNINDENT# if ( ls is None ) : #NEWLINE# #INDENT# ls = plt . rcParams [ 'lines.linestyle' ] #NEWLINE# #UNINDENT# if ( lw is None ) : #NEWLINE# #INDENT# lw = plt . rcParams [ 'lines.linewidth' ] #NEWLINE# #UNINDENT# ax . plot ( x , y , linestyle = ls , linewidth = lw , color = color , alpha = alpha , label = label , marker = marker ) #NEWLINE# if ( ( yerr is not None ) and ( xerr is not None ) ) : #NEWLINE# #INDENT# msg = 'Setting both `yerr` and `xerr` is not supported. Ignore `xerr`.' #NEWLINE# warnings . warn ( msg ) #NEWLINE# #UNINDENT# kwargs_fill = dict ( color = color , alpha = alpha_fill , label = label_fill ) #NEWLINE# if ( yerr is not None ) : #NEWLINE# #INDENT# ( ymin , ymax ) = extrema_from_error_input ( y , yerr ) #NEWLINE# fill_between ( x , ymax , ymin , ax = ax , ** kwargs_fill ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( xerr is not None ) : #NEWLINE# #INDENT# ( xmin , xmax ) = extrema_from_error_input ( x , xerr ) #NEWLINE# fill_between_x ( y , xmax , xmin , ax = ax , ** kwargs_fill )