First page Back Continue Last page Overview Graphics

Changing Default Range for Axis

X = np.linspace(0,

2 * np.pi,

50)

F = np.sin(X)

plot(X,F)

show()

X = np.linspace(0,

2 * np.pi,

50)

F = np.sin(X)

plot(X,F)

startx, endx = -0.1, 2*np.pi + 0.1

starty, endy = -1.1, 1.1

axis([startx, endx, starty, endy])

show()