Skip to content

Gap between X-axis and and imshow 2D plot in matplotlib 2.0.0 #8010

Open

Description

@fkbreitl

These lines produce a gap between the X axis and the image:

    plt.rcParams['figure.figsize'] = [8, 7]
    plt.imshow([[1, 3], [2, 1]])
    plt.savefig('gap.jpg', dpi=50)

gap

Activity

  1. added this to the milestone on Feb 2, 2017
  2. dstansby commented on Feb 2, 2017

    @dstansby
    Member

    Yep, this is reproducible on current master. It is saving to a .jpg file with a low dpi that causes the gap to appear.

  3. fkbreitl commented on Feb 3, 2017

    @fkbreitl
    Author

    The cause is not just the low dpi but more complex.
    If I use plt.rcParams['figure.figsize'] = [8, 7.01] or dpi=49 the gab disappears.

  4. WeatherGod commented on Feb 3, 2017

    @WeatherGod
    Member
  5. fkbreitl commented on Feb 3, 2017

    @fkbreitl
    Author

    I can imagine that it could be hard to fix but also a good thing to do since its an indication of something not running as smoothly as it should which could cause all sorts of trouble later.

  6. modified the milestones: , on May 3, 2017
  7. modified the milestones: , on Oct 9, 2017
  8. github-actions commented on Apr 6, 2023

    @github-actions

    This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

  9. QuLogic commented on Apr 26, 2023

    @QuLogic
    Member

    Seems to still be a problem on main, and not specific to jpg:
    gap

  10. github-actions commented on Apr 26, 2024

    @github-actions

    This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

  11. added
    status: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.
    on May 27, 2024
  12. added
    keepItems to be ignored by the “Stale” Github Action
    and removed
    status: inactiveMarked by the “Stale” Github Action
    status: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.
    on May 27, 2024
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

    keepItems to be ignored by the “Stale” Github Action

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions