繁体   English   中英

为什么 MATLAB R2021a 中的散点图颜色不同?

[英]Why are the scatterplot colors in MATLAB R2021a different?

我已经安装了Matlab R2021a,当我运行一个向量的scatterplot命令时,我得到如下图:

R2021a - 结果

我的意思是黑色和黄色。 但是,旧版本中的默认颜色如下:

旧版本 - 结果

我的意思是颜色是白色和蓝色。

我担心,我需要我的 MATLAB 显示旧版本中所示图形的颜色,我的意思是白色和蓝色。

发行说明中所述,R2021a 中的行为确实发生了变化:

视觉外观更新与生成的地块eyediagramscatterplot功能。
eyediagramscatterplot函数现在默认提供黑色曲线背景。

您可以通过修改轴/图形的属性来根据需要更改颜色,如下所示:

%Taking the example from the documentation
d = (0:63)';
s = qammod(d,64);
scatterplot(s);

%Modifying the colors
h=gca;                %Axis handle
h.Title.Color='k'     %Color of title
h.Children.Color='b'; %Color of points
h.YColor='k';         %Y-axis color including ylabel
h.XColor='k';         %X-axis color including xlabel
h.Color ='w';         %inside-axis color
h.Parent.Color='w'    %outside-axis color

不加修改,我们得到:

前

修改后,根据需要,我们得到:

后

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM