每当我更改值时,在高位列中出现负值时,y = 0轴就会上下移动,但是我想将y = 0轴的位置固定在中间,并希望相应地增加列高
答案 0 :(得分:0)
您可以使用for i in df.index:
df.set_index('to')
a = df.at[i,'From'] #row of from value
b = a - 1 #correct index value of row
ax = df.at[b, 'x'] #x value of from
ay = df.at[b, 'y'] #y of from
plt.plot([ax,df.at[i,'x']],[ay,df.at[i,'y']],'grey', linewidth=0.5)
函数创建轴的镜像,并且中间始终为零:
tickPositioner
实时演示: http://jsfiddle.net/BlackLabel/o97Lmdqa/
API参考: https://api.highcharts.com/highstock/yAxis.tickPositioner