I assume you have the base image and the line data prepared. To plot a line above the image, I suggest to do the following.
After you plot the base image, add line and specify the X,Y,Z data.
Here, I used the same data for the base map and the line above for example. See following code:
[X,Y,Z] = peaks;
This code will give you