2024-09-29 23:18:32 发布
网友
我感兴趣的是创建一个只有部分脊椎可见的绘图(例如,仅显示正值),而该绘图同时显示负值和正值
set_position # seems to only set the point where it intersects with the other axis set_visible # is an on-off switch. It does not allow for partial visibility.
有办法做到这一点吗
以ax为轴,如果x轴仅显示在0和0.5之间,则:
ax
ax.spines['bottom'].set_bounds((0, 0.5))
您可能还需要设置刻度,例如:
ax.set_xticks([0, 0.25, 0.5])
以
ax
为轴,如果x轴仅显示在0和0.5之间,则:您可能还需要设置刻度,例如:
相关问题 更多 >
编程相关推荐