Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix bug #5006

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 28, 2015
Merged

fix bug #5006

merged 1 commit into from
Aug 28, 2015

Conversation

xuanyuansen
Copy link
Contributor

well, the columns here should be rows, as we want to give different colors by row index.
there is no problem in this example, because the matrix here is 5*5.
But if the length of rows is bigger than that of columns, it will raise Exception, such as
plt.bar(index, data[row], bar_width, bottom=y_offset, color=colors[row])
IndexError: index 2 is out of bounds for axis 0 with size 2

well, the columns here should be rows, as we want to give different colors by row index.
there is no problem in this example, because the matrix here is 5*5.
But if the length of rows is bigger than that of columns, it will raise Exception, such as
plt.bar(index, data[row], bar_width, bottom=y_offset, color=colors[row])
IndexError: index 2 is out of bounds for axis 0 with size 2
@tacaswell
Copy link
Member

Thanks! I'll merge as soon as travis passes.

tacaswell added a commit that referenced this pull request Aug 28, 2015
DOC: fix typo on example

closes #5005
@tacaswell tacaswell merged commit ce3eeaa into matplotlib:master Aug 28, 2015
@tacaswell
Copy link
Member

@xuanyuansen Thank you and congratulations on what I believe is your first contribution to mpl!

@xuanyuansen
Copy link
Contributor Author

Thanks! And yes, this is my first commit to mpl and my first commit on github. I hope I can commit more to mpl in the future, cause mpl really helps me a lot on my work of visualizing data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants