I have an image that I am plotting. The x-axis is reversed and I need to merely flip the image. I am trying to use set(gca,'xdir','reverse') to reverse the xaxis, but this reverses the x-axis for all plotting on top of the image after that. How do I only flip the x-axis of the image but leave the rest of the plots on top of the image the same? I shared a little of the code but it is hard to establish the necessary variables for any of the code to run. Anyone know how to flip the xaxis for the image but retain the xaxis for the points plotted over top of the image?
figure(1)hold on im = image('XData', [0 2500], 'YData', [0 800], 'CData', N_new(:,:,1), 'CDataMapping', 'scaled');colormap(flipud(pink))set(gca,'xdir','reverse')AxesH = gca;axis(AxesH, 'tight');plot(x_a, y_a, 'b') grid onhold off
Best Answer