Skip to content

Savefig shrinks image #8805

Closed
Closed

Description

@skjerns

Bug report

Bug summary

When I save a figure my canvas is smaller as before. As I need to extract images from an interactive pyplot I cannot align them anymore afterwards.

Code for reproduction

import matplotlib.pyplot as plt
f = plt.Figure()
plt.plot([1,2,3])
f.savefig('test.png')

Actual outcome

Figure gets saved, figure shrinks. Subsequent figure is then a tiny bit smaller

Expected outcome

The figure gets saved, the canvas or figure size stays untouched.

Matplotlib version

  • Operating System: Win10 64
  • Matplotlib Version: 2.0.2
  • Python Version: 3.5.2
  • Spyder 3 using Qt5

Activity

  1. tacaswell commented on Jun 26, 2017

    @tacaswell
    Member

    Suspect this is a duplicate of #8736

  2. skjerns commented on Jun 27, 2017

    @skjerns
    Author

    Indeed, the fix suggested in #8736 did fix the problem, but only if I do not set a costum DPI.

  3. tacaswell commented on Jun 27, 2017

    @tacaswell
    Member

    closing in favor of #8736

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions