plt.xticks()を使えば,x軸のグリッド間隔を決められるが,この関数の引数は配列で渡せる. xticks(一定間隔の配列(ここではπ ...
# Turning on the grid for x axis and saving the plot # plt.grid(True, axis='x') # plt.savefig("Plots/fig_with_grid_x.png") # Turning on the grid for y axis and saving ...
違いを簡単にまとめておこうと思います。 pandas matplotlib DataFrameのあとに"."をつけて使う。e.g. df.plot "index"がX軸として扱われる。 "figsize"でFigureのSizeを指定できる。e.g. figsize= (10,5) "grid"でグリッド表示の有無を指定できる。e.g. grid=True ...
x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] # Creating data points y as a function of x. Squares of x, Cubes of x, Reverse of x, Fibbonacci places of x ...