set axis limits matplotlib
axes.set_xlim([xmin, xmax])
axes.set_ylim([ymin, ymax])
set axis limits matplotlib
axes.set_xlim([xmin, xmax])
axes.set_ylim([ymin, ymax])
matplotlib axes limits
axes.set_xlim([xmin, xmax])
axes.set_ylim([ymin, ymax])
axes.set_zlim([zmin, zmax])
matplotlib set axis limits
import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure()
fig.set_size_inches(8, 8)
ax = fig.add_axes([0.15,0.2,0.7,0.7])
x = np.arange(0, 100, 0.1)
y = np.sin(x)
ax.plot(x,y, color='blue', label='Sine wave')
#Set axis limits
ax.set_xlim([25, 50])
ax.set_ylim([-1, 1])
plt.show()
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us