赞
踩
参考:
http://www.che.utah.edu/department_documents/Projects_Lab/Projects_Lab_Handbook/MatlabPlots.pdf
参考文献中的效果如下,但是我对颜色大小都不是很满意
所以进行大小和颜色调整,把色彩冷下来:
代码:
clc
clear all
close all
N = 500;
x = rand(N,1);
y = rand(N,1);
red = (max(x)-x)/max(x);
green = y/max(y);
blue = 0.3*ones(N,1);
colors_redblue_spec = zeros(N,3);
for i = 1:N
colors_redblue_spec(i,:) = [red(i) green(i) blue(i)];
end
colormap(colors_redblue_spec);
h = scatter(x,y,300*rand(N,1),1:N,'filled');

Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。