1
我想設置的座標從1到N,而不是0到NMatplotlib設定座標
我不得不嘗試使用set_ylim()
或set_ybound
,但未能成功。
# Plot the pic.
fig = plt.figure()
ax = fig.add_subplot(111)
ax.set_title("Distribution of sequence order correlation values")
ax.axes.set_xlabel("Column index")
ax.axes.set_ylabel("Row index")
cax = ax.imshow(tar_data, interpolation='nearest')
cbar = fig.colorbar(cax)
你試過'plt.gca()。invert_yaxis()'? – ThePredator 2015-04-03 07:53:21
或者因爲這是'imshow',請嘗試'origin ='lower''或'origin ='upper'' – ThePredator 2015-04-03 07:54:18