2825 explained code solutions for 75 technologies


python-matplotlibHow to zoom out chart


import matplotlib.pyplot as plt

plt.plot([3,2,4,5,6,1,1,4])
plt.margins(2, 2)
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

2, 2

zooms out when those values are positive

.show()

render chart in a separate window