Distinct colors for plotting two columns of a single matrix
8 次查看(过去 30 天)
显示 更早的评论
I have vector called x(500,2). I plot(x) and I get a blue line for column 1 and a green line for column 2. I would like a red line for contrast purposes for column 2.
0 个评论
采纳的回答
the cyclist
2011-2-2
One of several ways:
x = rand(4,2);
h = plot(x);
set(h(1),'Color','b');
set(h(2),'Color','r');
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Scatter Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!