How to show image behind the figure?

3 ビュー (過去 30 日間)
Elder Winter
Elder Winter 2019 年 1 月 25 日
コメント済み: Elder Winter 2019 年 2 月 8 日
Hy all, i want to show my image behind the figure like the below image, let say my image 128x128 pixel, so i have 4x4 squares and i get the arrow (representation of the gradient magnitude and orientation)
But, i just got something like this
I didn't know how to show the gridlines and the arrows.
Any little help is important to me, thanks.
Btw, this is the code (if you need) :

採用された回答

Walter Roberson
Walter Roberson 2019 年 2 月 1 日
If the grid is not to go edge to edge then you will need to draw it yourself.
If it is to go edge to edge, then grid on
  1 件のコメント
Elder Winter
Elder Winter 2019 年 2 月 1 日
Ask.PNG
I want to show something like this, but if should be, i want to put the image behind that plot, if not, i will just put them both side by side. But the urgent one is how to show my magnitude and orientation like those plot

サインインしてコメントする。

その他の回答 (1 件)

Image Analyst
Image Analyst 2019 年 2 月 1 日
You can use line() to graw grid lines. You can use quiver() or annotation() to draw arrows.
  4 件のコメント
Walter Roberson
Walter Roberson 2019 年 2 月 6 日
quiver can create the arrows. plot() or line() or surf() or patch() to create the green lines. The same set of functions or viscircles or rectangle to create the circle .
Elder Winter
Elder Winter 2019 年 2 月 8 日
Okay, thank you very much.

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by