9951 explained code solutions for 126 technologies

python-matplotlibHow to zoom out chart

import matplotlib.pyplot as plt

plt.margins(2, 2)
plt.show()ctrl + c
import matplotlib.pyplot as plt

loads Matplotlib module to use plotting capabilities


plot specified data


set chart margins to simulate zooming

2, 2

zooms out when those values are positive


render chart in a separate window