matlab中的线样式颜色标记

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了matlab中的线样式颜色标记相关的知识,希望对你有一定的参考价值。

This script is for generating plots with many curves, where each curve has its own marker, color, and line style. Please see my blog post for more explanations and leave comments there.
  1. linestyles = cellstr(char('-',':','-.','--','-',':','-.','--','-',':','-',':',...
  2. '-.','--','-',':','-.','--','-',':','-.'));
  3.  
  4. MarkerEdgeColors=jet(n); % n is the number of different items you have
  5. Markers=['o','x','+','*','s','d','v','^','<','>','p','h','.',...
  6. '+','*','o','x','^','<','h','.','>','p','s','d','v',...
  7. 'o','x','+','*','s','d','v','^','<','>','p','h','.'];
  8.  
  9. % [...]
  10.  
  11. hold on
  12. for i=1:n
  13. plot(X(i,:), Y(i,:),[linestyles{i} Markers(i)],'Color',MarkerEdgeColors(i,:));
  14. end

以上是关于matlab中的线样式颜色标记的主要内容,如果未能解决你的问题,请参考以下文章

set()函数在绘图中的应用

绘制不同样式不同颜色的线

Matlab知识小结

Matplotlib中的颜色、线条、标记样式汇总

如何对matlab画出的曲线中的定点进行打标记(并进行标记)

如何区分 MATLAB 图上的多条重叠线?