I need to resize the markers in my plot (making them larger). How can I also change the width of the errors? I am using matplotlib . Thanks.
matplotlib
plot=ax.errorbar(x,y, yerr=[y1,y2], color='red', fmt='.', markersize='10', ecolor='red',capsize=4)
You can make the error panel thicker by setting the elinewidth attribute in the errorbar (x, y, ...) invocation of the error documentation . But the length of the error line is your data: you cannot change the length without changing the error displayed by it.
elinewidth
import matplotlib.pyplot as plt # define x,y, y1,y2 here ... plt.figure() plt.errorbar(x,y, yerr=[y1,y2], color='red', fmt='.', markersize='10', ecolor='red',capsize=4, elinewidth=2)
If you want to change the line width of the error panel cover to say 2, use the following:
(_, caps, _) = errorbar(x, y, yerr=[y1,y2], elinewidth=2) for cap in caps: cap.set_markeredgewidth(2)