bubblecloud
Draws a packed cloud of circles whose areas are proportional to the data values.
Category: Graphics > 2-D and 3-D Plots
Syntax
bubblecloud(sz)
Draws one bubble per element of the vector sz.
bubblecloud(sz, labels)
Labels each bubble.
bubblecloud(tbl, sizevar, labelvar)
Takes sizes and labels from variables of a table.
b = bubblecloud(___)
Also returns the BubbleCloud object.
Description
A bubble cloud shows the relative weight of categories. Each category is a circle whose area follows its value, and the circles are packed together with no axes. It reads quickly but values are hard to compare precisely, so label the bubbles.
Input arguments
sz- Vector of non-negative values; a bigger value gives a bigger circle.
labels- Cell array or string array with one label per bubble.
tbl- A table, with
sizevarandlabelvarnaming its variables.
Output arguments
b- The
BubbleCloudobject.
Example
Labeled bubbles
sales = [120 80 45 200 60];
names = {'North', 'South', 'East', 'West', 'Center'};
bubblecloud(sales, names)
title('Sales by region')
In the app, the figure is drawn below the code.
Notes
The circle layout is an approximation of MATLAB's, so positions can differ.