はじめに
matplotlib FuncAnimationによる複数グラフでの外サイクロイドのアニメーションについて解説する。
コード
解説
複数グラフの設定
その他の設定

[matplotlib animation] 14. 外サイクロイド(epicycloid)
matplotlib FuncAnimationによる外サイクロイドのアニメーション
↑と同じ。axとax2にそれぞれ表示したいグラフを設定する。
subplot全体のタイトルの設定
fig.suptitle()でsubplot全体に対するタイトルを設定できる。
2×2のsubplotで表示
↑のコードのように、fig = plt.figure()でfigを作成するとグラフ同士が重なり、みにくい。
fig = plt.figure(figsize=(9,10)) として、figsizeを設定することでグラフの重ならないようにした。
3×3のsubplotで表示
同様に、fig = plt.figure(figsize=(12,13)) とすることでグラフの重なりを防いだ。
コードをダウンロード(.pyファイル) コードをダウンロード(.ipynbファイル)参考

サイクロイド - Wikipedia

matplotlib.animationを利用してgif画像を作る (FuncAnimation) - Qiita
matplotlibはデータ解析の可視化ツールとして一般的に用いられています.今回は,matplotlib.animation機能を使ってgif画像を作ってみたので,そのコードを紹介します.最終…
matplotlib.pyplot.suptitle — Matplotlib 3.10.0 documentation
コメント