jdhao's digital space
Recent content on jdhao's digital space
马上订阅 jdhao's digital space RSS 更新: https://jdhao.github.io/index.xml
How to Change Intersection Point of X and Y Axis in Matplotlib
2018年5月21日 11:02
In this post, I will share how to position the intersection of x and y axis at a specific point using Matplotlib.
The spines #
In order to re-position x and y axis, we need to understand an important concept in Matplotlib —spines. According to Matplotlib documentation:
Spines are the lines connecting the axis tick marks and noting the boundaries of the data area. They can be placed at arbitrary positions. See function:set_position for more information.