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 的大作中提到】
: 在一幅图里面画了很多条曲线,如何自动为他们分配颜色以示区别?
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 的大作中提到】
: 在一幅图里面画了很多条曲线,如何自动为他们分配颜色以示区别?
h*q
4 楼
Great idea!
【在 s***t 的大作中提到】
: 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 的大作中提到】
: 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 的大作中提到】
: 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 的大作中提到】
: 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')
相关阅读
Visiting Scholar/Postdoctoral/Research Faculty/Graduate Stu (转载)招聘请提供一个对Image进行Cropping的MATLAB程序问个优化类的问题 (转载)Kalman filter和EM算法有什么区别?请问blas3有何不同?fortran 有计算norm的函数吗?PhD position available in San Diego State University's Aerospace Engineering板上有人去siam cse09不?dblquad到底能不能做变积分限的积分啊?a question about MPI_Barrierlinux下如何方便的粘贴Matlab的图形请教 computational chemistryhow to put a \tilde in matlab legend, thanks a lot.linux c++有搞自然语言理解的吗?请问一个fft的奇怪问题很想结识一些伯克利,caltech, or UCLA的牛人UMFPACK直接法求解器单机最多能求解多大的未知量?UCF的EECS(machine learning track)怎么样