How to remove connecting area in fill_between() using Python and MatPlot
Question: I am graphing +-2 standard deviations from the mean on my graph (the green
points). However, I would rather have straight vertical lines on top of each
x-mean, because currently there is a connecting shade area between states that
is misleading. How can I do this? I've tried everything and can't figure it
out. Thanks in advance. (Since I'm new to Stack Overflow I can't post an image
of my graph unfortunately.)

    
    
    plt.scatter(x= joined.index.values, y = joined.poll_mean, color = "g")
    plt.scatter(x= joined.index.values, y = joined.spread,color = joined.color)      
    plt.fill_between(joined.index,(joined.poll_mean + 2*joined.poll_std).values, (joined.poll_mean - 2*joined.poll_std).values, color='g', alpha = .3)
    plt.xticks(joined.index.values, joined.state.values, rotation='vertical')
    


Answer: Are you trying to do error bars? There is a matplotlib package for that.

An example piece of code to do this (from
[here](http://matplotlib.org/1.2.1/examples/pylab_examples/errorbar_demo.html)):

    
    
    import numpy as np
    import matplotlib.pyplot as plt
    
    # example data
    x = np.arange(0.1, 4, 0.5)
    y = np.exp(-x)
    
    # example variable error bar values
    yerr = 0.1 + 0.2*np.sqrt(x)
    xerr = 0.1 + yerr
    
    # First illustrate basic pyplot interface, using defaults where possible.
    plt.figure()
    plt.errorbar(x, y, xerr=0.2, yerr=0.4)
    plt.title("Simplest errorbars, 0.2 in x, 0.4 in y")
    

Also as a tip, for people to better help you, provide code that can reproduce
your problem in full.

