<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Kurene</author_name>
  <author_url>https://blog.hatena.ne.jp/Kurene/</author_url>
  <blog_title>Wizard Notes</blog_title>
  <blog_url>https://www.wizard-notes.com/</blog_url>
  <categories>
    <anon>Python</anon>
    <anon>matplotlib</anon>
  </categories>
  <description>多変量解析の一般的な手法である主成分分析を使っていると、寄与率と累積寄与率を確認することが多いです。 それぞれを別にプロットしてもよいのですが、 １つのプロットで確認できたほうが便利だと思い、matplotlibで実装してみました。 一つのプロットで左右２つの軸を描画するには、matplotlibではax.twinx()をいう関数を使うことで実現できます。 プロット例 サンプルコード import numpy as np import matplotlib.pyplot as plt n_sample = 1000 n_dim = 30 mean = np.random.normal(0.0,…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.wizard-notes.com%2Fentry%2Fpython%2Fmatplotlib-twinx-pca-cr&quot; title=&quot;Matplotlibで主成分分析の寄与率・累積寄与率を左右２軸プロット - Wizard Notes&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/K/Kurene/20191112/20191112025841.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-11-12 03:06:57</published>
  <title>Matplotlibで主成分分析の寄与率・累積寄与率を左右２軸プロット</title>
  <type>rich</type>
  <url>https://www.wizard-notes.com/entry/python/matplotlib-twinx-pca-cr</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
