A basic plotting problem in a for loop
古いコメントを表示
Hello everybody,
I have a Problem which seems to be very stupid and I apologize for my question in advance!
I have a for loop to plot all of the results of a former loop. Now I would like to change the color of the plots to grey. Basically this is not a big deal if you have x and y for example. In my case I plot data1 vs data2. Both of them have the same size. If I use a colormap or something like 'color', [1 1 1] I always get the error that the vectors must be the same size. How can I fix this?!
for d=1:numel(Filename)
figure(1);
hold on
plot(Data_1(:,d), Data_2(:,d), 'Color', [1 1 1])
axis([-25 25 -20 25])
axis equal
end
Thank you!
Cheers
Christian
3 件のコメント
Adam
2017 年 2 月 2 日
Are you sure that Data_1(:,d) and Data_2(:,d) are the same size?
Because using 'Color' like that as a name-value pair should not give you this error.
Stephen23
2017 年 2 月 2 日
@Christian: please edit your question and give us the complete error message. This means all of the red text.
Christian
2017 年 2 月 2 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Data Distribution Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!