I have installed Matlab R2021a, and when I run the command scatterplot
for a vector, I get a figure as below:
I mean black and yellow. However the default colors in older versions is as follows:
I mean the colors are white and blue.
My concern, I need my MATLAB shows the colors of the figure as shown in older version, I mean with white and blue colors.
The behavior indeed changed in R2021a as mentioned in the release notes:
Visual appearance updates to plots generated with
eyediagram
andscatterplot
functions.
Theeyediagram
andscatterplot
functions now provide black plot backgrounds by default.
You can change the colors as desired by you by modifying the properties of axis/figure as shown below:
%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
Without modification, we get this:
After modification, as desired, we get this: