Matplotlib Errorbar Caps Missing

后端 未结 3 1807
你的背包
你的背包 2020-12-01 15:54

I\'m attempting to create a scatter plot with errorbars in matplotlib. The following is an example of what my code looks like:

import matplotlib.pyplot as pl         


        
3条回答
  •  独厮守ぢ
    2020-12-01 16:49

    It has to do with the rcParams in matplotlib. To solve it, add the following lines at the beginning of your script:

    import matplotlib
    matplotlib.rcParams.update({'errorbar.capsize': 2})
    

    It also works with plt.bar().

提交回复
热议问题