Is it possible to do multiple array of data on the same scatter plot;
조회 수: 13(최근 30일)
표시 이전 댓글
I have a function like:
m=zeros(3,4)
for x=1:3
for y=1:4
m(x,y)=x*(y+1i*y);
end
scatterplot(m(x,:));
hold on;
end
Although i used "hold on" but Its generating three different plots. Can I plot all three different data in the same plot with different color?
댓글 수: 0
채택된 답변
gonzalo Mier
2019년 5월 13일
Scatterplot is a really special function that needs a special syntax to plot more that one scatterplot together.
m =zeros(3,4);
first=1;
for x=1:3
for y=1:4
m(x,y)=x*(y+1i*y);
end
if first
h = scatterplot(m(x,:),1,0,'bo');
first=0;
else
h = scatterplot(m(x,:),1,0,'bo',h);
end
hold on;
end
추가 답변(0개)
참고 항목
범주
Find more on Scatter Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!