plt.gca() function is abbreviation from get current axes which return the class object of matplotlib.axes.Axes
import numpy as np
import matplotlib.pyplot as plt
plt.plot(x,y)
axes = plt.gca()
axes.set_xlim([xmin,xmax])
axes.set_ylim([ymin,ymax])
plt.show()
No comments:
Post a Comment