最近,研究活動(おもに実験)で得たデータを計算したり,可視化するのに使っているPython。可視化(グラフ作成)に使うMatplotlib(Seaborn)の使い方をすぐ忘れてしまうので,自分のために書き留めておこうと思う。 x = np.linspace(1,100,100) y = x**2 一番簡単なプロット ...
前回記事ではMatplotlibの基礎を学びましたが今回は応用でAnimation(動画およびGif)を作成します。モジュールは"matplotlib.animation"を使用していきます。 ー>ループの回数と同じ ー>リストを渡すとリスト内データがループする fargs:ループ用以外に引数がある ...
I grew tired of having to convert my units just for the sake of specifying the figure size. I'd like to specify the figure size directly in a metric unit, nominally centimeters (or millimeters, no ...
width = 600 height = 600 dpi = 96 buffer = 0.3 f, ax = plt.subplots(1, figsize=(width/dpi+buffer,height/dpi+buffer), dpi=dpi, frameon=False, tight_layout=True) # Code ...
一部の結果でアクセス不可の可能性があるため、非表示になっています。
アクセス不可の結果を表示する