Setting Axis Range on a Matplotlib Chart
Python - Visualisation & EDA
Here we set the axis range to 40-52 for the X axis, 0-4000 for the primary y axis and 0-1200 for the secondary y axis.
ax.set_xlim(40,52) #Set range of X axis ax.set_ylim(0,4000) # Set range of primary y axis ax2.set_ylim(0,1200) # Set range of secondary y axis
By analyseup - Last Updated July 16, 2021, 12:52 p.m.