Overlaying a power distribution plot over an image

I am trying to overlay a power distribution plot over an image with axis labels similar to what is shown here, but not successful. I would greatly appreciate help. Thanks in advance.
img = imagesc('image.jpg');
imagesc([min_x max_x], [min_y max_y], img);
hold on;
mesh(angle,distance,power);

 採用された回答

Walter Roberson
Walter Roberson 2017 年 4 月 13 日

0 投票

In your first line use imread rather than imagesc

4 件のコメント

Usman Tahir Virk
Usman Tahir Virk 2017 年 4 月 13 日
Thanks for the quick help, Walter. I really appreciate it. One more thing. How do I get some transparency in my plot so that I can still see some of the background, similar to the example I posted. Thanks a lot.
Walter Roberson
Walter Roberson 2017 年 4 月 14 日
opaqueness = 0.7; %for example
imagesc([min_x max_x], [min_y max_y], img, 'Alphadata', opaqueness);
You can also use an array for Alphadata in order to assign a different transparency to each point. That is probably something you should consider doing, using 0 for the alpha value outside of your blobs so that the background shows through completely there.
Walter Roberson
Walter Roberson 2017 年 4 月 14 日
I just realized you might be wanting the mesh plot to be the transparent part. If so then you should look at the various Alpha related properties at https://www.mathworks.com/help/matlab/ref/chartsurface-properties.html -- there are several.
Usman Tahir Virk
Usman Tahir Virk 2017 年 4 月 14 日
Thanks for the nice tips, Walter. You're awesome. Best regards.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeImages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by