Python グラフ描画用関数 新しいページはコチラ

提供: yonewiki
移動: 案内, 検索
(グラフ描画関係)
(グラフ描画関係)
120行: 120行:
 
  import matplotlib.pyplot as pl
 
  import matplotlib.pyplot as pl
 
  fig = pl.figure(figsize=(8, 6))
 
  fig = pl.figure(figsize=(8, 6))
 +
 +
*'''matplotlib.figure.Figureオブジェクト変数名.subplots_adjust(hspace=xxx, wspace=xxx)'''
 +
グラフを生成するmatplotlib.figure.Figureオブジェクト変数名.subplots_adjust(hspace=xxx, wspace=xxx)
 +
左右の余白は wspace、上下の余白は hspace で指定します。デフォルト値は上下間 左右間 共に0.2で、上下はデフォルトだとグラフタイトルと目盛りが重なりやすいようです。上下左右にグラフを並べない場合は特に意味は無い指定になります。
 +
 +
import matplotlib.pyplot as pl
 +
fig = pl.figure()
 +
fig.subplots_adjust(wspace=0.4, hspace0.4)
  
 
*'''matplotlib.axes._subplotsAxesSubplotオブジェクト変数名.set_xlabel('引数1')'''
 
*'''matplotlib.axes._subplotsAxesSubplotオブジェクト変数名.set_xlabel('引数1')'''

2019年12月26日 (木) 00:00時点における版



個人用ツール
名前空間

変種
操作
案内
ツールボックス