Skip to content
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

Bug on the pyplot.table colColours property (version 1.3.0) #4960

Closed
danielcestari opened this issue Aug 19, 2015 · 6 comments
Closed

Bug on the pyplot.table colColours property (version 1.3.0) #4960

danielcestari opened this issue Aug 19, 2015 · 6 comments

Comments

@danielcestari
Copy link

When trying to set colors for the label columns in the table method the first row got collapsed with the columns labels row.

Test code:
from matplotlib import pyplot as plt
data=[[1,2,3],[4,5,6],[7,8,9]]; labels=['A', 'B', 'C']; colors=['r', 'g', 'b'];

"PROBLEM"
plt.table(cellText=data, rowLabels=labels, colLabels=labels, loc='center', colColours=colors); plt.axis('off'); plt.show()

"GOT CORRECT"
plt.table(cellText=data, rowLabels=labels, colLabels=labels, loc='center', rowColours=colors); plt.axis('off'); plt.show()

@WeatherGod
Copy link
Member

I am not seeing any problems with this in the development branch. Without images, though, I can't be sure exactly what you mean by "first row got collapsed with the column labels row".

@jenshnielsen
Copy link
Member

@WeatherGod beat me to it ;) but anyway

Can you test that with master or at least 1.4.3
1.3.0 is a very old release.

I can't reproduce the problem on master as far as I understand the issue. Here is what I see

download 1

download

@WeatherGod
Copy link
Member

@jenshnielsen , is it just me, or is the alignment of the text all screwy?

@jenshnielsen
Copy link
Member

It could certainly be better, not sure if that is a new thing. I usually never use plt.table

@jenshnielsen
Copy link
Member

Comparing 1.4.3 to master I would say thats about the same. The Zorder have changed thou and it looks like the example is build with different fonts on 1.4.3 and Master(Travis).

@danielcestari
Copy link
Author

The file matplotlib/lib/matplotlib/table.py of my version (1.3.0) is different from the current one.
I'm not able to update my matplotlib but replacing the lines of my version that correspond to the lines 602-609 solve the problem.

Just to clarify that was my problem before
figure_1

Thanks for the fast reply and sorry for the inconvenient.

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

No branches or pull requests

3 participants