how to create a circular heat map

73 次查看(过去 30 天)
Hi,
Thanks,
Razvan

采纳的回答

Image Analyst
Image Analyst 2012-9-27
pcolor can do circular maps. But what does your angular dimension represent, and why is that representation any better than a rectangular representation (a rectangular image)?
  7 个评论
Image Analyst
Image Analyst 2012-9-28
If you have a 2D array of data, you can use cart2pol() to change it, but I haven't really played around with that so I'm no expert on that.
Razvan
Razvan 2012-9-28
That only translates the coordinates from Cartesian to polar (or cylindrical for 3d data), but doesn't really bend the horizontal plot into a circular plot. Thanks anyway.

请先登录,再进行评论。

更多回答(1 个)

Christian Günther
Christian Günther 2022-5-16
编辑:Christian Günther 2022-5-16
Hello,
You can transform the Data to cartesian coordinates and use the hist3 function instead.
%polar(t,r,'+')
x = r.*cos(t);
y = r.*sin(t);
data = [x',y'];
hh3 = hist3(data, 'Nbins',[1 1]*25);
figure
image(flipud(hh3))
ax = gca;
xt = ax.XTick;
yt = ax.YTick;
ax.XTickLabel = xt*10;
set(ax, 'YTick',[0 yt], 'YTickLabel', [flip([0 yt])]*10)

类别

Help CenterFile Exchange 中查找有关 Contour Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by