Skip to content

Figure background is transparent when saving png from notebook backend. #8654

@efiring

Description

@efiring

Bug report

In Jupyter notebook with %matplotlib notebook:
Code for reproduction

import matplotlib.pyplot as plt
fig, ax = plt.subplots()
ax.plot([1,2])
fig.savefig('test.png')

I used a screenshot below instead of the file 'test.png' because the odd background only shows up in preview, which evidently uses a light gray background instead of the usual white.
Actual outcome
screenshot_gray_background

Expected outcome
I expect the white figure background that results in the above example when saving a pdf, or when using a different backend.

Matplotlib version

  • Operating System: OS X 10.12.4
  • Matplotlib Version: 2.0.2+7.ge6295a4a7
  • Python Version: 3.5.2
  • Jupyter Version (if applicable): 4.2.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy