Skip to content

Table: auto_set_column_width not working #5479

Closed

Description

@YujiShen
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

Activity

  1. mdboom commented on Nov 13, 2015

    @mdboom
    Member

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

  2. added this to the milestone on Nov 13, 2015
  3. tacaswell commented on Nov 13, 2015

    @tacaswell
    Member

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

  4. tacaswell commented on Nov 13, 2015

    @tacaswell
    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!

  5. YujiShen commented on Nov 13, 2015

    @YujiShen
    Author

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

  6. added
    Difficulty: Easyhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues
    on Feb 15, 2016
  7. modified the milestones: , on Dec 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Easyhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions