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

Table: auto_set_column_width not working #5479

Closed
YujiShen opened this issue Nov 13, 2015 · 4 comments
Closed

Table: auto_set_column_width not working #5479

YujiShen opened this issue Nov 13, 2015 · 4 comments
Labels
Difficulty: Easy https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues
Milestone

Comments

@YujiShen
Copy link

fig, axs = plt.subplots(1, 2, figsize=(6, 3))
ax1, ax2 = axs
ax1.axis('off')
ax2.axis('off')

# Table1 use auto_set_column_width
tb1 = ax1.table(cellText=[['Long Text', 2],['Long Long text', 1]],
          rowLabels=["A","B"],
          colLabels=["Col1","Col2"],
          loc="center")
tb1.auto_set_font_size(False)
tb1.set_fontsize(12)
tb1.auto_set_column_width(["Col1","Col2"]) # NOT WORKING
tb1.auto_set_column_width([-1,0,1]) # NOT WORKING

# Table 2 use _autoColumns
tb2 = ax2.table(cellText=[['Long Text', 2],['Long Long text', 1]],
          rowLabels=["A","B"],
          colLabels=["Col1","Col2"],
          loc="center")
tb2.auto_set_font_size(False)
tb2.set_fontsize(12)
tb2._autoColumns = [-1,0,1]

matplotlib_issue_2

Matplotlib 1.5.0

@mdboom
Copy link
Member

mdboom commented Nov 13, 2015

@zairmubashar: As someone who recently improved the table code, I wonder if you have any thoughts.

@tacaswell tacaswell added this to the next bug fix release (2.0.1) milestone Nov 13, 2015
@tacaswell
Copy link
Member

@YujiShen This would be another place in the table code where any contributions would be welcome!

@tacaswell
Copy link
Member

Sorry, that did not come out right, the entire code base is a place where contributions would be welcome.

What I meant is that this is a great place in the code base to start contributing!

@YujiShen
Copy link
Author

@tacaswell Thanks! Great to hear that! I will learn how to contribute.

@tacaswell tacaswell added the Difficulty: Easy https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues label Feb 15, 2016
@dashed dashed mentioned this issue Feb 25, 2016
@QuLogic QuLogic modified the milestones: 2.1 (next point release), 2.0.1 (next bug fix release) Dec 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: Easy https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants