%% Extend Bubble Limits
% Create a bubble chart with a legend.

x = 1:10;
y = [4 7 10 7 3 6 5 1 9 7];
sz = [5 1 14 6 9 12 15 20 8 2];
bubblechart(x,y,sz);
bubblelegend('Size Values','Location','northeastoutside')

%
% By default, the smallest and largest bubbles map to the smallest and largest values in the sz vector, respectively. Call the bubblelim function to get the current bubble limits.

bubblelim

%
% Change the limits to [1 50]. As a result, the bubbles in the chart become smaller, and the labels in the bubble legend automatically update.

bubblelim([1 50])

% Copyright 2020 The MathWorks, Inc.