%% Visualize Categorical Data with Bubble Cloud
% Define c as a categorical array. Use the histounts function to bin the categorical data and return the bubble sizes and the labels. Then pass the bubble sizes and labels to the bubblecloud function.

c = categorical(["Pumpkin" "Princess" "Princess" "Princess" "Spooky Monster" ...
    "Spooky Monster" "Spooky Monster" "Spooky Monster" "Spooky Monster"]);
[sz,labels] = histcounts(c);
bubblecloud(sz,labels)

% Copyright 2020 The MathWorks, Inc.