s*t
3 楼
matlab by default use different colors for different lines if you
plot them in one plot function.
if you want to use your own colors, you can define a color matrix (Nx3)
in rgb colors. each time take a row from that matrix and plot using that
color by plot(x, y, 'Color', colors(ii,:)).
you can also get the default line colors used by matlab by
colors = colormap('Lines')
【在 h***q 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: 在一幅图里面画了很多条曲线,如何自动为他们分配颜色以示区别?
plot them in one plot function.
if you want to use your own colors, you can define a color matrix (Nx3)
in rgb colors. each time take a row from that matrix and plot using that
color by plot(x, y, 'Color', colors(ii,:)).
you can also get the default line colors used by matlab by
colors = colormap('Lines')
【在 h***q 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: 在一幅图里面画了很多条曲线,如何自动为他们分配颜色以示区别?
h*q
4 楼
Great idea!
【在 s***t 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: matlab by default use different colors for different lines if you
: plot them in one plot function.
: if you want to use your own colors, you can define a color matrix (Nx3)
: in rgb colors. each time take a row from that matrix and plot using that
: color by plot(x, y, 'Color', colors(ii,:)).
: you can also get the default line colors used by matlab by
: colors = colormap('Lines')
【在 s***t 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: matlab by default use different colors for different lines if you
: plot them in one plot function.
: if you want to use your own colors, you can define a color matrix (Nx3)
: in rgb colors. each time take a row from that matrix and plot using that
: color by plot(x, y, 'Color', colors(ii,:)).
: you can also get the default line colors used by matlab by
: colors = colormap('Lines')
s*o
5 楼
我试了一下,同一幅图中最多自动支持7种不同的颜色,如果超过7条曲线,就自动重复
默认的7种颜色。这是怎么回事呢?
【在 s***t 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: matlab by default use different colors for different lines if you
: plot them in one plot function.
: if you want to use your own colors, you can define a color matrix (Nx3)
: in rgb colors. each time take a row from that matrix and plot using that
: color by plot(x, y, 'Color', colors(ii,:)).
: you can also get the default line colors used by matlab by
: colors = colormap('Lines')
默认的7种颜色。这是怎么回事呢?
【在 s***t 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: matlab by default use different colors for different lines if you
: plot them in one plot function.
: if you want to use your own colors, you can define a color matrix (Nx3)
: in rgb colors. each time take a row from that matrix and plot using that
: color by plot(x, y, 'Color', colors(ii,:)).
: you can also get the default line colors used by matlab by
: colors = colormap('Lines')
相关阅读
Q: How to break a Matlab program in the middle in Linux哪位高手 熟 通过Matlab 从 MySQL获取数据图像小波包分解后如何改变分解系数再重构呢请教一个问题 如何在wgr614v4后面建立一个ftppart time job opportunity for computer science/engineering student如何实现Matlab作图中的双纵轴Quick question: BaoZis are rewared.one questions如何在双轴的Maltab图里添加曲线啊。怎么拟合这样的曲线请教matlab,将一个二维的矩阵扩展到三维的最简单的办法?怎么用matlab画出这张图trapzoid quadrature for tetrahedra?怎么设计boxcar的highpass filter?Can we get the data from a figure in the paper? 有没有现成的p-median sovlerPh.D. positions in Computer Science (with a focus on sensor and wireless networks)想买新机器,做计算用,大家推荐一个配置吧请教一个关于概率分析的二重积分问题,看看我的分析是否正确