<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shangtian</author_name>
  <author_url>https://blog.hatena.ne.jp/shangtian/</author_url>
  <blog_title>shangtian’s blog</blog_title>
  <blog_url>https://www.shangtian.tokyo/</blog_url>
  <categories>
    <anon>Python</anon>
  </categories>
  <description>はじめに matplotlib でsavefig()を使ってグラフを保存したところ 写真が真っ白になってしまった。これの解決策についてのメモ 環境 macOS Mojave Python 3.6.6 真っ白になった時のコード 真っ白になった時のコードがこれ from matplotlib import pyplot as plt fig = plt.figure() fig.add_subplot(111) plt.show() plt.savefig(&quot;image1.png&quot;) 真っ白 変更後 plt.show()の前にplt.savefig()を持って来ることで解決した from matp…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.shangtian.tokyo%2Fentry%2F2019%2F11%2F18%2F000000&quot; title=&quot;matplotlib savefig()　真っ白になる問題 - shangtian’s blog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/s/shangtian/20191117/20191117150129.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-11-18 00:00:00</published>
  <title>matplotlib savefig()　真っ白になる問題</title>
  <type>rich</type>
  <url>https://www.shangtian.tokyo/entry/2019/11/18/000000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
