Skip to Content
Pythonデータサイエンスハンドブック ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習
book

Pythonデータサイエンスハンドブック ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習

by Jake VanderPlas, 菊池 彰
May 2018
Intermediate to advanced
556 pages
13h 21m
Japanese
O'Reilly Japan, Inc.
Content preview from Pythonデータサイエンスハンドブック ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習
4.3
 単純な線グラフ
233
In[13]: plt.plot(x, np.sin(x))
plt.axis('equal');
図4-16 出力解像度の単位を合わせた、「equal」レイアウトの例
plt.axis()
メソッドによる軸の範囲指定、およびその他の機能の詳細については、
plt.axis()
docstring
を参照してください。
4.3.3
 プロットへのラベル付け
最後に、タイトル、軸ラベル、単純な凡例付け方法を簡単に紹介します。
タイトルと軸のラベルは最も簡単なラベルです。ラベルを素早く設定するためのメソッドが用意
されています( 4-17)。
In[14]: plt.plot(x, np.sin(x))
plt.title("A Sine Curve")
plt.xlabel("x")
plt.ylabel("sin(x)");
図4-17 軸ラベルとタイトルの例
234
4
章 
Matplotlib
による可視化
オプションの引数を使用して、ラベルの位置、サイズ、およびスタイルを調整できます。詳細に
ついては、
Matplotlib
のマニュアルと各関数の
docstring
を参照してください。
1
つの軸に複数の線が表示されている場合は、凡例
legend
)を付加してそれぞれの線にラベルを
付ける ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pythonデータサイエンスハンドブック 第2版 ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習

Pythonデータサイエンスハンドブック 第2版 ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習

Jake VanderPlas, 菊池 彰
初めてのGraphQL ―Webサービスを作って学ぶ新世代API

初めてのGraphQL ―Webサービスを作って学ぶ新世代API

Eve Porcello, Alex Banks, 尾崎 沙耶, あんどうやすし

Publisher Resources

ISBN: 9784873118413Other