A basic plotting problem in a for loop
Mostrar comentarios más antiguos
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 comentarios
Adam
el 2 de Feb. de 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
el 2 de Feb. de 2017
@Christian: please edit your question and give us the complete error message. This means all of the red text.
Christian
el 2 de Feb. de 2017
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Data Distribution Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!