差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン 前のリビジョン | |||
| python:matplotlib:オブジェクト指向インターフェースでのグラフ作成 [2026/11/24 17:18] – [グラフ周囲の環境設定] mumeiyamibito | python:matplotlib:オブジェクト指向インターフェースでのグラフ作成 [2026/11/24 17:19] (現在) – mumeiyamibito | ||
|---|---|---|---|
| 行 15: | 行 15: | ||
| * 表示範囲の設定\\ <code python> | * 表示範囲の設定\\ <code python> | ||
| - | ax.set_xlim(bottom=X_MIN, | + | ax.set_xlim(bottom=X_MIN, |
| - | ax.set_ylim(bottom=Y_MIN, | + | ax.set_ylim(bottom=Y_MIN, |
| </ | </ | ||
| * '' | * '' | ||
| 行 24: | 行 24: | ||
| * 表示目盛り幅の設定 (実数) \\ <code python> | * 表示目盛り幅の設定 (実数) \\ <code python> | ||
| import matplotlib.ticker as ticker | import matplotlib.ticker as ticker | ||
| - | ax.xaxis.set_major_locator(ticker.MultipleLocator(TICK_X)) | + | ax.xaxis.set_major_locator(ticker.MultipleLocator(TICK_X)) |
| - | ax.yaxis.set_major_locator(ticker.MultipleLocator(TICK_Y)) | + | ax.yaxis.set_major_locator(ticker.MultipleLocator(TICK_Y)) |
| </ | </ | ||
| * '' | * '' | ||
| 行 31: | 行 31: | ||
| * 表示目盛り幅の設定 (分割数)\\ <code python> | * 表示目盛り幅の設定 (分割数)\\ <code python> | ||
| import matplotlib.ticker as ticker | import matplotlib.ticker as ticker | ||
| - | ax.xaxis.set_major_locator(ticker.LinearLocator(numticks=N_TICK_X)) | + | ax.xaxis.set_major_locator(ticker.LinearLocator(numticks=N_TICK_X)) |
| - | ax.yaxis.set_major_locator(ticker.LinearLocator(numticks=N_TICK_Y)) | + | ax.yaxis.set_major_locator(ticker.LinearLocator(numticks=N_TICK_Y)) |
| </ | </ | ||
| * '' | * '' | ||