9951 explained code solutions for 126 technologies


python-matplotlibHow to set X axis range


import matplotlib.pyplot as plt
plt.plot([1,2,3])
plt.xlim(-1, 4)
plt.show()ctrl + c
import matplotlib.pyplot as plt

loads Matplotlib module to use plotting capabilities

.plot(

plot specified data

xlim

set min and max values for X axis

.show()

render chart in a separate window