I want to build a curve on the image. I would only see a curve in a certain range. So:
plt.figure()
plt.imshow(img)
plt.plot(x, my_curve)
plt.axis([0, X, Y, 0])
But in this way the image is displayed in this range, but I do not want this. I would like to see the whole image with part of the curve. How to apply axes only on the second chart?
EDIT: I cannot use slice arrays. I am in this case (this is an example):
x = [0 0 0 10 10 10 30 30 30 40 40 40]
my_curve = [0 0 0 10 10 10 30 30 30 40 40 40]
Well, I need to see a straight line only between 25 and 35. If I remove each element from this range, I get only a point (30,30).
source
share