9951 explained code solutions for 126 technologies


python-matplotlibHow to zoom in chart


import matplotlib.pyplot as plt

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

loads Matplotlib module to use plotting capabilities

.plot(

plot specified data

.margins(

set chart margins to simulate zooming

-0.1, -0.1

zooms in when those values are negative

.show()

render chart in a separate window