在写论文时,曲线图有需添加Markers以使曲线更具有区分度,主要考虑到文章在打印出来时,单纯靠颜色无法区分,这就是为曲线添加Markers的意义。可是,在利用Matlab的plot等函数在为曲线添加Markers时导致Markers之间的距离过近,导致Markers太过密集,曲线图之间的Gap也显得拥挤。如下图所示:

x = linspace(0,10,25);
y = x.^2;
p = plot(x,y,'-s');

关于Matlab中画图任意调整Markers距离的问题

其实,在Matlab中plot等函数在画图时几乎可以任意指定Markers之间的距离,如下所示:

x = linspace(0,10,25);
y = x.^2;
p = plot(x,y,'-s');
p.MarkerSize = 10;
p.MarkerIndices = 1:5:length(y);

关于Matlab中画图任意调整Markers距离的问题

更具体的相关设置,请参考:Create Line Plot with Markers

 

相关文章:

  • 2021-07-15
  • 2021-10-07
  • 2022-12-23
  • 2021-10-16
  • 2021-09-03
  • 2022-01-23
  • 2022-01-12
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-11
  • 2022-12-23
  • 2021-06-15
  • 2022-12-23
  • 2021-06-08
相关资源
相似解决方案