%% Shrink 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 15 3 6 15 22 6 50 16];
bubblechart(x,y,sz);
bubblelegend('Size Values','Location','northeastoutside')

%
% Get the current bubble limits.

bubblelim

%
% Change the limits to [1 15]. As a result, some of the bubbles become larger, and any bubbles that have a sz value greater than 15 are clipped to the largest bubble size. The labels in the bubble legend automatically update.

bubblelim([1 15])

% Copyright 2020 The MathWorks, Inc.