made the code a bit nicer
new function to plot vectors with errobars