User Tools

Site Tools


python:matplotlib:基本的な使い方

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
python:matplotlib:基本的な使い方 [2018/01/20 22:52]
koudai
python:matplotlib:基本的な使い方 [2018/01/20 23:06]
koudai
Line 41: Line 41:
  
 plt.plot(x, y) plt.plot(x, y)
-plt.savefig("sin.png"  # プロットしたグラフを画面表示する+plt.savefig("sin.png"  # プロットしたグラフをファイルsin.png保存する
 </file> </file>
  
Line 73: Line 73:
 x = np.arange(-np.pi, np.pi, 0.1) x = np.arange(-np.pi, np.pi, 0.1)
 y = np.sin(x) y = np.sin(x)
-plt.title("graph"      # グラフのタイトル +plt.title("graph"  # グラフのタイトル 
-plt.xlabel("x"      # x軸(横軸)のラベル+plt.xlabel("x"     # x軸(横軸)のラベル
 plt.ylabel("sin x" # y軸(縦軸)のラベル plt.ylabel("sin x" # y軸(縦軸)のラベル
  
python/matplotlib/基本的な使い方.txt · Last modified: 2021/06/27 22:04 (external edit)