I have a question, I am making a program that displays an enlarged area of ββPeru, but the specified axis is in the image range (for example, 7000x7500), but I want to be in the UTM range (for example, the x axis between 500000 -600000 and y axis 9500000-9700000 ) I tried to use plt.set_xlim
and plt.sety_lim
, but did not succeed, I think I need to use plt.autoscale(False)
, but it also did not work or I used it incorrectly.
I create a figure and axes from the main program
f = plt.figure(figsize=(5,5))
axe = f.add_axes([0, 0, 1, 1])
this is the function that I call every time I want to build
def plotear(self, mapa):
axe.clear()
axe.imshow(mapa, cmap='gray', interpolation='nearest')
axe.set_xlim(0,10000)
axe.set_ylim(0,10000)
plt.autoscale(False)
self.canvas.draw()
source
share