%% Plot Table Data with Custom Marker Sizes and Colors
% Since R2021b
% One way to plot data from a table and customize the colors and marker sizes is to set the ColorVariable and SizeData properties. You can set these properties as name-value arguments when you call the polarscatter function, or you can set them on the Scatter object later.
% For example, create a table with three variables of random numbers, and plot the Th and R variables with filled markers. Vary the marker colors by specifying the ColorVariable name-value argument. Return the Scatter object as s, so you can set other properties later.

Th = linspace(0,2*pi,50)';
R = randi([0 10],50,1);
Colors = rand(50,1);
tbl = table(Th,R,Colors);
s = polarscatter(tbl,'Th','R','filled','ColorVariable','Colors');

%
% Change the marker sizes to 100 points by setting the SizeData property.

s.SizeData = 100;

% Copyright 2020 The MathWorks, Inc.