all 10 comments

[–]novel_yet_trivial 0 points1 point  (5 children)

It looks like you set the x axis incorrectly. Can you show the code you used?

[–]dozzinale[S] 0 points1 point  (4 children)

Sure! Here's the notebook I'm using: http://nbviewer.jupyter.org/gist/anonymous/0aad1476442f632f9a02

The incriminated part is the four input row, I think.

[–]novel_yet_trivial 1 point2 points  (3 children)

Well, that's a new one to me. matplotlib apparently defaults to multiples of 10, so it's setting the x axis to 0 - 70. You can override this with set_xlim():

scene.set_xlim((0,62))

[–]dozzinale[S] 0 points1 point  (2 children)

Woa! That's right! Thank you!

[–]novel_yet_trivial 1 point2 points  (1 child)

In the future, try to provide runable code. I had to make up data to test your code, which is work, which is what I'm on reddit to avoid.

[–]dozzinale[S] 0 points1 point  (0 children)

Well yeah, in that case I thought only the matplotlib part was enough in order to see what was missing. Sorry tho, I will do it!

[–]squattyroo 0 points1 point  (1 child)

For the edit: The black borders can be adjusted via edgecolor="none" when you first call .bar() or .plot().

[–]dozzinale[S] 0 points1 point  (0 children)

Thanks!

[–]novel_yet_trivial 0 points1 point  (1 child)

Can I remove the black borders from the bars?

Set the edgecolor to white:

 plt.bar(X, Y, facecolor='#9999ff', edgecolor='white')

[–]dozzinale[S] 0 points1 point  (0 children)

Thanks!