<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>HK29</author_name>
  <author_url>https://blog.hatena.ne.jp/HK29/</author_url>
  <blog_title>PythonとVBAで世の中を便利にする</blog_title>
  <blog_url>https://hk29.hatenablog.jp/</blog_url>
  <categories>
    <anon>Python</anon>
    <anon>pandas</anon>
    <anon>グラフ化</anon>
  </categories>
  <description>本記事では、下図のような棒グラフをpandasのデータフレームにて、列名を指定して描く雛形コードを載せました。df.plot.bar()を使います。グラフの値を記入するには、ax.patchesを用います。 上図の元データは、下図のような表データです。これをpandasのDataFrame書式で列名を指定します。この例では、列名「species」がX軸ラベル、列名「petal_length」，「sepal_width」，「sepal_length」が凡例です。 ■本プログラム 冒頭の左図のような普通の棒グラフを描きたい場合には、 flag_stacked にFalseを指定します。一方、右図の…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhk29.hatenablog.jp%2Fentry%2F2022%2F09%2F10%2F141458&quot; title=&quot;Python 列名指定で棒グラフを描く「pandasのplot.bar()とax.patches」 - PythonとVBAで世の中を便利にする&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/H/HK29/20220910/20220910134821.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-09-10 14:14:58</published>
  <title>Python 列名指定で棒グラフを描く「pandasのplot.bar()とax.patches」</title>
  <type>rich</type>
  <url>https://hk29.hatenablog.jp/entry/2022/09/10/141458</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
