Filter löschen
Filter löschen

Quiver plot appears upside down.

10 Ansichten (letzte 30 Tage)
Kyle McKinlay
Kyle McKinlay am 20 Nov. 2021
Kommentiert: Kyle McKinlay am 21 Nov. 2021
Hello,
I'm trying to verify a PIV analysis method but first came across an issue with the quiver command. As seen from the first two attached images, the sense is such that there is no data on the upper left corner triangle. However, the quiver plot displays this data gap in the bottom left corner.
I'm using quiver(u,v), as I don't have x,y data. Does anyone have any suggestions please?
Thank you very much!

Akzeptierte Antwort

Dave B
Dave B am 20 Nov. 2021
Bearbeitet: Dave B am 20 Nov. 2021
Images are normally shown in what's called ij coordinates, meaning (in the all positive number case) the top left corner is 0,0, but quiver defaults to xy co-ordinates meaning (in the all positive number case) the bottom left corner is 0,0
Fortunately, MATLAB makes it easy to switch, just do:
axis ij
after making your quiver. Alternatively, you could do:
set(gca,'YDir','reverse')
which is what axis ij does.
  1 Kommentar
Kyle McKinlay
Kyle McKinlay am 21 Nov. 2021
Thank you very much for your help and quick reply! :)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Vector Fields finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by