由于我不太喜欢Matlab的极坐标绘图仪,我通常将它们写成笛卡尔坐标系。所以说,你是存储每一项(计数,色调,饱和度)的列向量:基于在z
hue = floor(rand(1000,1) * 361);
saturation = floor(rand(1000,1) * 100);
vals = [hue, saturation];
sorted = sortrows(vals);
[C, ia, ic] = unique(sorted, 'rows');
counts = diff(ia);
counts(end + 1) = ia(end) - length(vals) + 1;
% Not a big fan of this method so changed to find counts
% by pre-sorting and then using the index
%[C, ia , ic] = unique(vals, 'rows');
%counts = zeros(length(C), 1);
%for x = 1:length(C)
% counts(x) = numel(find(vals(:,1) == C(x,1) & vals(:,2) == C(x,2)));
%end
x = C(:,2) .* cos(pi*C(:,1)/180);
y = C(:,2) .* sin(pi * C(:,1)/180);
plot3(x, y, counts, '.')
有一种方法来改变颜色:
hue = 90;
saturation = 50;
count = 250;
x = saturation * cos(pi * hue/180);
y = saturation * cos(pi * hue/180);
plot3(x, y, count, '.')
对于一个更实际的例子价值,如果你想要,但会变得更复杂一点。您可以使用网格网格和轮廓或http://www.mathworks.com/matlabcentral/fileexchange/14677此文件将绘制它。
你试过用玫瑰吗? – Daniel
在你原来的问题中,图像没有链接,Erik以某种方式注意到隐藏的链接并修复了它。有了这些信息,我不认为'玫瑰'是正确的选择。 – Daniel
我投票重新提出这个问题,现在很清楚你想要什么。 – Daniel