%% Specify Bubble Colors
% Define the bubble coordinates as the vectors x and y. Define sz as a vector that specifies the bubble sizes. Then create a bubble chart of x and y, and specify the color as red. By default, the bubbles are partially transparent.

x = 1:20;
y = rand(1,20);
sz = rand(1,20);
bubblechart(x,y,sz,'red');

%
% For a custom color, you can specify an RGB triplet or a hexadecimal color code. For example, the hexadecimal color code '#7031BB' specifies a shade of purple.

bubblechart(x,y,sz,'#7031BB');

%
% You can also specify a different color for each bubble. For example, specify a vector to select colors from the figure's colormap.

c = 1:20;
bubblechart(x,y,sz,c)

% Copyright 2020 The MathWorks, Inc.