1axes.set_xlim([xmin, xmax])
2axes.set_ylim([ymin, ymax])
3axes.set_zlim([zmin, zmax])
1import matplotlib.pyplot as plt
2import numpy as np
3
4fig = plt.figure()
5fig.set_size_inches(8, 8)
6ax = fig.add_axes([0.15,0.2,0.7,0.7])
7
8x = np.arange(0, 100, 0.1)
9y = np.sin(x)
10
11ax.plot(x,y, color='blue', label='Sine wave')
12
13#Set axis limits
14ax.set_xlim([25, 50])
15ax.set_ylim([-1, 1])
16
17plt.show()
18