0

For some reason I cannot find out how to change the alignment when using numpy.pyplot.errorbar. I am creating a plot like this:

plt.errorbar(nums, vafmean, yerr=vafstddev, linestyle="None", fmt='o')

The output plot displays mostly fine, but the data is pushed out to the far right and left edges of the plot, and there is no way that I can figure out to add something like align='center' to the plot. So I am looking for a way to get the data to plot more towards the center of the graph.enter image description here

1 Answer 1

1

You may set the limits of the graph,

plt.xlim(-2,3)

or you may create some padding around,

plt.margins(x=0.4)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.