【发布时间】:2011-02-25 12:40:36
【问题描述】:
MatLab 中的散点图。我可以创建一个 x 和 y 数组大小相同的散点图,如下所示:
function RasterTest()
clear all % clear memory
clc; % clear command window
close all; % close any figure windows that are open
x=[1 2 3]; % x positions of the charges
y=[4 8 2]; % y positions of the charges
scatter(x,y,'filled')
axis square
end
但是,如果我希望每个 x 都有多个 y 值怎么办? IE。数组大小不同。我认为这实际上被称为光栅图,但 MatLab 似乎没有这样做的东西?
任何帮助都会很棒:)。
【问题讨论】:
-
我最终做的是使用
hold on并覆盖工作正常的图表。 pccofre 的答案似乎也是正确的。
标签: matlab