A basic plotting problem in a for loop
Mostra commenti meno recenti
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 Commenti
Adam
il 2 Feb 2017
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
il 2 Feb 2017
@Christian: please edit your question and give us the complete error message. This means all of the red text.
Christian
il 2 Feb 2017
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Data Distribution Plots in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!