Image plot with quiver vector overlain
8 views (last 30 days)
I am trying to plot a quiver vectors on top of an image (png file).
So far, I have been able to plot the image. However, I am having the following problems....
- The y axis is inverted, and I have no idea how to inverse the image
- The quiver plot does not show up on top of the image
Can anyone help direct me to some resources on this or help with my code? I would be forever greatful.
I = imread('GH2017.png');
RI = imref2d(size(I));
RI.XWorldLimits = [335300 336189];
RI.YWorldLimits = [5934952 5935582];
- The quiver plot works with data in X and D matrices, however does not plot on top of the image
- On a graph, the top left coordinate should be 5935582 and 335300 and the bottom right coordinate should be 5934952 and 336189. Cheers
Scott MacKenzie on 26 Feb 2022
Edited: Scott MacKenzie on 26 Feb 2022
quiver is drawing on top of the image. You haven't provided any data or code that can be executed, so it's hard to tell what the problem is. My hunch is that the quiver lines are being drawn off the image. Try swapping the x and y values in quiver:
If that doesn't work, please post the data for X and D and we'll dig a little deeper.