9
matplotlibでy軸の限界を設定する
matplotlibのy軸の範囲の設定についてサポートが必要です。これが失敗したコードです。 import matplotlib.pyplot as plt plt.figure(1, figsize = (8.5,11)) plt.suptitle('plot title') ax = [] aPlot = plt.subplot(321, axisbg = 'w', title = "Year 1") ax.append(aPlot) plt.plot(paramValues,plotDataPrice[0], color = '#340B8C', marker = 'o', ms = 5, mfc = '#EB1717') plt.xticks(paramValues) plt.ylabel('Average Price') plt.xlabel('Mark-up') plt.grid(True) plt.ylim((25,250)) このプロットのデータを使用すると、y軸の範囲が20と200になります。ただし、20と250の範囲が必要です。
416
python
matplotlib