大きさとスタイルをかえる |
大きさの初期値は640X480ピクセルです。この大きさは変えられます。
plt.subplotsの引数で大きさを設定します。3.2とか2.4とかで指定しているので、何だ?
と思うでしょう?これは大きさを指定する要素としてdpiがあります。初期値は100です。指定した数にdpiを掛けた数が実際のピクセル数になります。
横は3.2x100=320ピクセル、縦は2.4x100=240ピクセルです。次にスタイルを適応します。
複数のスタイルを設定することができます。スタイルはこんなにあります。 Solarize_Light2.mplstyle _classic_test_patch.mplstyle bmh.mplstyle classic.mplstyle dark_background.mplstyle fast.mplstyle fivethirtyeight.mplstyle ggplot.mplstyle grayscale.mplstyle seaborn-bright.mplstyle seaborn-colorblind.mplstyle seaborn-dark-palette.mplstyle seaborn-dark.mplstyle seaborn-darkgrid.mplstyle seaborn-deep.mplstyle seaborn-muted.mplstyle seaborn-notebook.mplstyle seaborn-paper.mplstyle seaborn-pastel.mplstyle seaborn-poster.mplstyle seaborn-talk.mplstyle seaborn-ticks.mplstyle seaborn-white.mplstyle seaborn-whitegrid.mplstyle seaborn.mplstyle tableau-colorblind10.mplstyle 多くて全部試す気になれません。 |