Python グラフ描画用関数 新しいページはコチラ
提供: yonewiki
(→グラフ描画関係 書きかけの記事です。20191226~) |
(→グラフ描画関係 書きかけの記事です。20191226~) |
||
173行: | 173行: | ||
*'''matplotlib.axes._subplotsAxesSubplotオブジェクト変数名.set_xticks''' | *'''matplotlib.axes._subplotsAxesSubplotオブジェクト変数名.set_xticks''' | ||
− | + | グラフのX軸目盛りを調整するmatplotlib.axes._subplotsAxesSubplotオブジェクト変数名.set_xticks関数です。 | |
− | + | 例 | |
+ | x =[1, 2, 3, 4, 5] | ||
+ | y =[1, 2, 3, 4, 5] | ||
+ | fig = pl.figure() | ||
+ | axis = fig.add_subplot(1,1,1) | ||
+ | axis.plot(x, y) | ||
+ | axis.set_xticks([1,2,3,4,5]) | ||
*'''matplot.pyplotオブジェクト.figure''' | *'''matplot.pyplotオブジェクト.figure''' |