def index_bar(ax, vals,<EOL>facecolor='<STR_LIT:b>', edgecolor='<STR_LIT:l>',<EOL>width=<NUM_LIT:4>, alpha=<NUM_LIT:1.0>, ):
facecolors = (colorConverter.to_rgba(facecolor, alpha),)<EOL>edgecolors = (colorConverter.to_rgba(edgecolor, alpha),)<EOL>right = width/<NUM_LIT><EOL>left = -width/<NUM_LIT><EOL>bars = [ ( (left, <NUM_LIT:0>), (left, v), (right, v), (right, <NUM_LIT:0>)) for v in vals if v != -<NUM_LIT:1> ]<EOL>sx = ax.figure.dpi * (<NUM_LIT:1.0>/<NUM_LIT>)  <EOL>sy = ax.bbox.height / ax.viewLim.height<EOL>barTransform = Affine2D().scale(sx,sy)<EOL>offsetsBars = [ (i, <NUM_LIT:0>) for i,v in enumerate(vals) if v != -<NUM_LIT:1> ]<EOL>barCollection = PolyCollection(bars,<EOL>facecolors   = facecolors,<EOL>edgecolors   = edgecolors,<EOL>antialiaseds = (<NUM_LIT:0>,),<EOL>linewidths   = (<NUM_LIT:0.5>,),<EOL>offsets      = offsetsBars,<EOL>transOffset  = ax.transData,<EOL>)<EOL>barCollection.set_transform(barTransform)<EOL>minpy, maxx = (<NUM_LIT:0>, len(offsetsBars))<EOL>miny = <NUM_LIT:0><EOL>maxy = max([v for v in vals if v!=-<NUM_LIT:1>])<EOL>corners = (minpy, miny), (maxx, maxy)<EOL>ax.update_datalim(corners)<EOL>ax.autoscale_view()<EOL>ax.add_collection(barCollection)<EOL>return barCollection<EOL>
Add a bar collection graph with height vals (-1 is missing).

ax          : an Axes instance to plot to
width       : the bar width in points
alpha       : bar transparency