BubbleChart[{{x1,y1,z1},{x2,y2,z2},…}]
makes a bubble chart with bubbles at positions {xi,yi} with sizes zi.
BubbleChart[{…,wi[{xi,yi,zi},…],…,wj[{xj,yj,zj},…],…}]
makes a bubble chart with bubble features defined by the symbolic wrappers wk.
BubbleChart[{data1,data2,…}]
makes a bubble chart from multiple datasets datai.
BubbleChart
BubbleChart[{{x1,y1,z1},{x2,y2,z2},…}]
makes a bubble chart with bubbles at positions {xi,yi} with sizes zi.
BubbleChart[{…,wi[{xi,yi,zi},…],…,wj[{xj,yj,zj},…],…}]
makes a bubble chart with bubble features defined by the symbolic wrappers wk.
BubbleChart[{data1,data2,…}]
makes a bubble chart from multiple datasets datai.
Details and Options
- Data elements for BubbleChart can be given in the following forms:
-
{xi,yi,zi} a pure bubble value {Quantity[xi,ux],Quantity[yi,uy],Quantity[zi,uz]} a bubble value with units <|kxxi,kyyi,kzzi|> association of keys and bubble value wi[{xi,yi,zi},…] a bubble with value {xi,yi,zi} and wrapper wi formi->mi a bubble form with metadata mi - The values zi should be positive.
- Data not given in these forms is ignored in forming the bubble chart.
- Datasets for BubbleChart can be given in the following forms:
-
{e1,e2,…} list of elements with or without wrappers <|k1e1,k2e2,…|> association of keys and values TimeSeries[…],EventSeries[…],TemporalData[…] time series, event series, and temporal data WeightedData[…] augmented datasets w[{e1,e2,…},…] wrapper applied to a whole dataset w[{data1,data1,…},…] wrapper applied to all datasets - BubbleChart[objcspec] extracts and plots values from the Tabular, TimeSeries or EventSeries object obj using the column specification cspec.
- The following forms of column specifications cspec are allowed for plotting tabular data:
-
{colx,coly,colz} plot data from columns x. y and z {{colx1,coly1,colz1},{colx2,coly2,colz2},…} plot multiple sets of columns - The following wrappers can be used for chart elements:
-
Annotation[e,label] provide an annotation Button[e,action] define an action to execute when the element is clicked Callout[e,label] display the element with callout labeling EventHandler[e,…] define a general event handler for the element Hyperlink[e,uri] make the element act as a hyperlink Labeled[e,…] display the element with labeling Legended[e,…] include features of the element in a chart legend Mouseover[e,over] make the element show a mouseover form PopupWindow[e,cont] attach a popup window to the element StatusArea[e,label] display in the status area when the element is moused over Style[e,opts] show the element using the specified styles Tooltip[e,label] attach an arbitrary tooltip to the element - In BubbleChart, Labeled, Callout and Placed allow the following positions:
-
Top,Bottom,Left,Right,Center positions within bubbles Above,Below, Before, After positions outside bubbles {{bx,by},{lx,ly}} scaled position {lx,ly} in the label at scaled position {bx,by} in the bubble - BubbleChart has the same options as Graphics with the following additions and changes: [List of all options]
-
AspectRatio 1 overall ratio of height to width BubbleScale "Area" feature scale used for bubbles BubbleSizes Automatic size range to use for bubbles ChartElementFunction Automatic how to generate raw graphics for bubbles ChartElements Automatic graphics to use for each of the bubbles ColorFunction Automatic how to color bubbles ColorFunctionScaling True whether to normalize arguments to ColorFunction Frame True whether to draw a frame around the chart LabelingFunction Automatic how to label bubbles LabelingSize Automatic maximum size of callouts and labels LabelingTarget Automatic how to determine automatic label positions LegendAppearance Automatic overall appearance of legends PerformanceGoal $PerformanceGoal aspects of performance to try to optimize PlotFit None how to fit a curve to the bubbles PlotFitElements Automatic fitted elements to show in the bubbles PlotInteractivity $PlotInteractivity whether to allow interactive elements PlotLabels None category labels for bars PlotLegends None legends for data elements and datasets PlotStyle Automatic style for bars PlotTheme $PlotTheme overall theme for the chart ScalingFunctions None how to scale individual coordinates TargetUnits Automatic units to display in the chart - BubbleChart layers bubbles from largest to smallest for maximal visibility.
- Typical settings for PlotLegends include:
-
None no legend Automatic automatically determine legend {lbl1,lbl2,…} use lbl1, lbl2, … as legend labels Placed[lspec,…] specify placement for legend - PlotStylesty specifies the styles to use for each curve. Possible settings include:
-
{sty1,sty2,…} sequence of styles for the data <|"key"val,…|> styling elements for different levels of data - The accepted keys are:
-
"Base" overall style for all the bars "Elements" list of styles for the elements yi in each group "Groups" list of styles of each group of values datai - ColorData["DefaultChartColors"] gives the default sequence of colors used by PlotStyle.
- The arguments supplied to ChartElementFunction are the bubble region {{xmin,xmax},{ymin,ymax}}, the values {xi,yi,zi}, and the metadata {m1,m2,…} from each level in a nested list of datasets.
- A list of built-in settings for ChartElementFunction can be obtained from ChartElementData["BubbleChart"].
- The arguments supplied to ColorFunction are x, y, and z.
- Chart feature themes affect the data's graphic styling. Themes include:
-

"BoldScheme" bold elements from Chart Element Schemes 
"FadeScheme" faded elements from Chart Element Schemes - Style and other specifications from options and other constructs in BubbleChart are effectively applied in the order PlotStyle, ColorFunction, Style and other wrappers, ChartElements, and ChartElementFunction, with later specifications overriding earlier ones.
-
AlignmentPoint Center the default point in the graphic to align with AspectRatio 1 overall ratio of height to width Axes False whether to draw axes AxesLabel None axes labels AxesOrigin Automatic where axes should cross AxesStyle {} style specifications for the axes Background None background color for the plot BaselinePosition Automatic how to align with a surrounding text baseline BaseStyle {} base style specifications for the graphic BubbleScale "Area" feature scale used for bubbles BubbleSizes Automatic size range to use for bubbles ChartElementFunction Automatic how to generate raw graphics for bubbles ChartElements Automatic graphics to use for each of the bubbles ColorFunction Automatic how to color bubbles ColorFunctionScaling True whether to normalize arguments to ColorFunction ContentSelectable Automatic whether to allow contents to be selected CoordinatesToolOptions Automatic detailed behavior of the coordinates tool Epilog {} primitives rendered after the main plot FormatType TraditionalForm the default format type for text Frame True whether to draw a frame around the chart FrameLabel None frame labels FrameStyle {} style specifications for the frame FrameTicks Automatic frame ticks FrameTicksStyle {} style specifications for frame ticks GridLines None grid lines to draw GridLinesStyle {} style specifications for grid lines ImageMargins 0. the margins to leave around the graphic ImagePadding All what extra padding to allow for labels etc. ImageSize Automatic the absolute size at which to render the graphic LabelingFunction Automatic how to label bubbles LabelingSize Automatic maximum size of callouts and labels LabelingTarget Automatic how to determine automatic label positions LabelStyle {} style specifications for labels LegendAppearance Automatic overall appearance of legends Method Automatic details of graphics methods to use PerformanceGoal $PerformanceGoal aspects of performance to try to optimize PlotFit None how to fit a curve to the bubbles PlotFitElements Automatic fitted elements to show in the bubbles PlotInteractivity $PlotInteractivity whether to allow interactive elements PlotLabel None an overall label for the plot PlotLabels None category labels for bars PlotLegends None legends for data elements and datasets PlotRange All range of values to include PlotRangeClipping False whether to clip at the plot range PlotRangePadding Automatic how much to pad the range of values PlotRegion Automatic the final display region to be filled PlotStyle Automatic style for bars PlotTheme $PlotTheme overall theme for the chart PreserveImageOptions Automatic whether to preserve image options when displaying new versions of the same graphic Prolog {} primitives rendered before the main plot RotateLabel True whether to rotate y labels on the frame ScalingFunctions None how to scale individual coordinates TargetUnits Automatic units to display in the chart Ticks Automatic axes ticks TicksStyle {} style specifications for axes ticks
List of all options
Examples
open all close allBasic Examples (3)
Create a bubble chart for a list of triples:
BubbleChart[RandomReal[1, {10, 3}]]BubbleChart[RandomReal[1, {5, 7, 3}]]BubbleChart[RandomReal[1, {5, 7, 3}], PlotStyle -> {RGBColor[0.237736, 0.340215, 0.575113], RGBColor[0.277947, 0.45009699999999997, 0.32815550000000004], RGBColor[0.624866, 0.673302, 0.264296], RGBColor[0.8453409999999999, 0.6248695, 0.3151775], RGBColor[0.72987, 0.239399, 0.230961]}]BubbleChart[RandomReal[1, {10, 3}], ChartElements -> [image]]BubbleChart[RandomReal[1, {10, 3}], ChartElementFunction -> "NoiseBubble"]Scope (32)
Data and Wrappers (14)
Items in a dataset are colored the same:
BubbleChart[{Table[{i, i, 1}, {i, 3}], Table[{i, i + 1, 1}, {i, 3}], Table[{i, i + 2, 1}, {i, 3}]}]Nonreal data is taken to be missing:
data = ReplacePart[Flatten[Table[{i, j, 1}, {i, 4}, {j, 4}], 1], {2 -> Missing[], 4 -> 1 + I, 6 -> foo}]BubbleChart[data, PlotLabels -> Range[16]]BubbleChart[{{Quantity[2, "Feet"], Quantity[-4, "Feet"], Quantity[14, "Feet"]}, {Quantity[6, "Feet"], Quantity[25, "Feet"], Quantity[22, "Feet"]}, {Quantity[-3, "Feet"], Quantity[17, "Feet"], Quantity[1, "Feet"]}, {Quantity[11, "Feet"], Quantity[17, "Feet"], Quantity[7, "Feet"]}, {Quantity[25, "Feet"], Quantity[-3, "Feet"], Quantity[21, "Feet"]}}, FrameLabel -> Automatic]BubbleChart[{{Quantity[2, "Feet"], Quantity[-4, "Feet"], Quantity[14, "Feet"]}, {Quantity[6, "Feet"], Quantity[25, "Feet"], Quantity[22, "Feet"]}, {Quantity[-3, "Feet"], Quantity[17, "Feet"], Quantity[1, "Feet"]}, {Quantity[11, "Feet"], Quantity[17, "Feet"], Quantity[7, "Feet"]}, {Quantity[25, "Feet"], Quantity[-3, "Feet"], Quantity[21, "Feet"]}}, FrameLabel -> Automatic, TargetUnits -> {"Meters", "Yards", "Inches"}]The time stamps in TimeSeries, EventSeries, and TemporalData are ignored:
BubbleChart[TimeSeries[{{23, 12, 24}, {15, 3, 9}, {3, 23, 12}, {7, 11, 6}, {5, 24, 20}, {5, 17, 8}}, {"May 24, 1982"}]]The values in associations are taken as bubble values:
BubbleChart[<|"a" -> {3, 1, 5}, "b" -> {2, 2, 4}, "c" -> {1, 2, 3}, "d" -> {2, 1.5, 8}|>]BubbleChart[<|"a" -> {3, 1, 5}, "b" -> {2, 2, 4}, "c" -> {1, 2, 3}, "d" -> {2, 1.5, 8}|>, PlotLabels -> Automatic]BubbleChart[<|"a" -> {3, 1, 5}, "b" -> {2, 2, 4}, "c" -> {1, 2, 3}, "d" -> {2, 1.5, 8}|>, PlotLegends -> Automatic, PlotStyle -> {Hue[0.61, 0.7, 1], Hue[0.17, 0.4, 0.65], Hue[0.64, 0.5, 0.75], Hue[0.45, 0.4, 0.7]}]Associations can be nested down to the point level:
BubbleChart[<|"a" -> <|"x" -> 3, "y" -> 1, "z" -> 5|>, "b" -> <|"x" -> 2, "y" -> 2, "z" -> 4|>, "c" -> <|"x" -> 1, "y" -> 2, "z" -> 3|>|>, PlotLegends -> Automatic, PlotStyle -> {Hue[0.61, 0.7, 1], Hue[0.17, 0.4, 0.65], Hue[0.64, 0.5, 0.75]}, FrameLabel -> Automatic]BubbleChart[<|"group1" -> <|"a" -> {3, 1, 5}, "b" -> {2, 2, 4}, "c" -> {1, 2, 3}, "d" -> {2, 1.5, 8}|>, "group2" -> <|"a" -> {2, 5, 9}, "b" -> {6, 1, 3}, "c" -> {1, 3, 6}, "d" -> {3, 2, 6}|>|>, PlotLegends -> Automatic, PlotStyle -> {Hue[0.08, 1, 1], Hue[0.17, 0.8, 0.5]}]The weights in WeightedData are ignored:
BubbleChart[WeightedData[{{23, 12, 24}, {15, 3, 9}, {3, 23, 12}, {7, 11, 6}, {5, 24, 20}, {5, 17, 8}}, {0.4, 0.2, 0.6, 0.3, 0.4, 0.3}]]Use wrappers on individual data, datasets, or collections of datasets:
{d1, d2, d3} = {{1, 2, 1}, {2, 2, 1}, {3, 2, 1}};
{e1, e2, e3} = {{1, 1, 1}, {2, 1, 1}, {3, 1, 1}};{BubbleChart[{{d1, Style[d2, RGBColor[0.93, 0.27, 0.27]], d3}, {e1, e2, e3}}], BubbleChart[{Style[{d1, d2, d3}, RGBColor[0.93, 0.27, 0.27]], {e1, e2, e3}}], BubbleChart[Style[{{d1, d2, d3}, {e1, e2, e3}}, RGBColor[0.93, 0.27, 0.27]]]}{d1, d2, d3} = {{1, 2, 1}, {2, 2, 1}, {3, 2, 1}};
{e1, e2, e3} = {{1, 1, 1}, {2, 1, 1}, {3, 1, 1}};{BubbleChart[{{d1, Style[d2, RGBColor[0.93, 0.27, 0.27]], d3}, {e1, e2, e3}}, PlotStyle -> GrayLevel[0.62]], BubbleChart[{Style[{d1, Style[d2, RGBColor[0.93, 0.27, 0.27]], d3}, RGBColor[0.14, 0.8, 0.14]], {e1, e2, e3}}, PlotStyle -> GrayLevel[0.62]], BubbleChart[Style[{Style[{d1, Style[d2, RGBColor[0.93, 0.27, 0.27]], d3}, RGBColor[0.14, 0.8, 0.14]], {e1, e2, e3}}, RGBColor[0.4, 0.6, 1]], PlotStyle -> GrayLevel[0.62]]}Override the default tooltips:
BubbleChart[{{1, 2, 1}, Tooltip[{1, 1, 2}, "median"], {2, 3, 3}}, BubbleSizes -> {0.2, 0.7}]Use any object in the tooltip:
data = Table[Tooltip[{CountryData[c, #]& /@ {"LifeExpectancy", "GDPPerCapita", "Population"}}, CountryData[c, "Flag"]], {c, CountryData["G8"]}];BubbleChart[data]Use PopupWindow to provide additional drilldown information:
BubbleChart[{{1, 2, 2}, {1, 1, 1}, PopupWindow[{2, 3, 3}, DateListPlot[FinancialData["IBM", "Jan. 1, 2004"]]]}, BubbleSizes -> {0.2, 0.7}]Button can be used to trigger any action:
BubbleChart[{{1, 2, 2}, {1, 1, 1}, Button[{2, 3, 3}, Speak[2]]}, BubbleSizes -> {0.2, 0.7}]Tabular Data (3)
cars = ResourceData["Sample Tabular Data: Car Models"]Plot horsepower against displacement, with bubbles sized according to the mileage:
BubbleChart[cars -> {"displacement", "horsepower", "mpg"}]Pivot the data to create columns of mileage per region:
pivot = PivotToColumns[cars, "origin" -> "mpg"]Plot the data by region of origin:
BubbleChart[pivot -> {{"displacement", "horsepower", ExtendedKey["mpg", "europe"]}, {"displacement", "horsepower", ExtendedKey["mpg", "japan"]}, {"displacement", "horsepower", ExtendedKey["mpg", "usa"]}}, PlotLegends -> {"Europe", "Japan", "USA"}]BubbleChart[TimeSeries[TimeEventSeries`TimestampData[Association["UniformlySpacedQ" -> True, "Count" -> 5,
"Endpoints" -> TabularColumn[Association[
"Data" -> {2, {{NumericArray[{20563, -2147483648}, "Integer32"], {},
DataStructure["BitVec ... ularColumn[Association[
"Data" -> {{17, 5, 7, 6, 13}, {}, None}, "ElementType" -> "Integer64"]],
TabularColumn[Association["Data" -> {{3, 2, 2, 1, 1}, {}, None},
"ElementType" -> "Integer64"]]}}]]]], Association[]]]Plot the values for a component of a TimeSeries or EventSeries:
ts = TimeSeries[TimeEventSeries`TimestampData[Association["UniformlySpacedQ" -> True, "Count" -> 5,
"Endpoints" -> TabularColumn[Association[
"Data" -> {2, {{NumericArray[{20563, -2147483648}, "Integer32"], {},
DataStructure["BitVec ... e" -> "Integer64"]], TabularColumn[Association[
"Data" -> {{3.5511999004449324, 1.777675777376151, 1.3490852490420469,
3.8396388450135266, 4.100051503528421}, {}, None}, "ElementType" -> "Real64"]]}}]]]],
Association[]];BubbleChart[ts -> {"a", "b", "c"}]Plot values from multiple components:
BubbleChart[ts -> {{"a", "b", "c"}, {"d", "e", "f"}}]Styling and Appearance (6)
Use an explicit list of styles for the bubbles:
BubbleChart[RandomReal[1, {3, 5, 3}], PlotStyle -> {RGBColor[0.93, 0.27, 0.27], RGBColor[0.14, 0.8, 0.14], RGBColor[0.4, 0.6, 1]}]PlotStyle can be used to set an initial style for all chart elements:
BubbleChart[{{1, 2, 2}, {1, 1, 1}, {2, 3, 3}}, PlotStyle -> <|"Base" -> EdgeForm[Dashed], "Elements" -> {RGBColor[0.797253, 0.904982, 0.410498], RGBColor[0.934691, 0.945708, 0.75346], RGBColor[0.769879, 0.92369, 0.977371]}|>, BubbleSizes -> {0.2, 0.7}]Style can be used to override styles:
BubbleChart[{{1, 2, 2}, {1, 1, 1}, Style[{2, 3, 3}, RGBColor[0.93, 0.27, 0.27]], {3, 4, 1}}, PlotStyle -> GrayLevel[0.62], BubbleSizes -> {0.2, 0.7}]Use any graphic for pictorial bubbles:
BubbleChart[{{1, 2, 2}, {1, 1, 1}, {2, 3, 3}}, ChartElements -> Graphics3D[Cylinder[], Boxed -> False], BubbleSizes -> {0.2, 0.7}]Use built-in programmatically generated bubbles:
ChartElementData["BubbleChart"]Table[BubbleChart[{{1, 2, 2}, {1, 1, 1}, {2, 3, 3}}, ChartElementFunction -> f, PlotStyle -> {RGBColor[0.761959, 0.470832, 0.940597], RGBColor[0.9584254999999999, 0.877884, 0.5906629999999999], RGBColor[0.431296, 0.709773, 0.927077]}, BubbleSizes -> {0.2, 0.7}], {f, {"PolyhedronBubble", "MarkerBubble"}}]For detailed settings, use Palettes ▶ ChartElementSchemes:
BubbleChart[{{1, 2, 2}, {1, 1, 1}, {2, 3, 3}}, ChartElementFunction -> ChartElementDataFunction["Bubble", "Shape" -> "Hexagon"], BubbleSizes -> {0.2, 0.7}]Use a theme with simple ticks and grid lines in a bright color scheme:
BubbleChart[RandomReal[1, {3, 3, 3}], PlotTheme -> "Business"]Use a theme with a high contrast color scheme and 3D bubbles:
BubbleChart[RandomReal[1, {3, 3, 3}], PlotTheme -> "Marketing"]Labeling and Legending (9)
Use Labeled to add a label to a bubble:
BubbleChart[{{1, 2, 1}, Labeled[{1, 1, 2}, "label", Left], {2, 3, 3}}, BubbleSizes -> {0.2, 0.7}]Use symbolic positions for label placement:
Table[BubbleChart[{{1, 2, 2}, Labeled[{2, 3, 3}, "label", p], {1, 1, 1}}, BubbleSizes -> {0.2, 0.7}, PlotLabel -> p, Ticks -> None], {p, {Bottom, Center, Top}}]Use Placed to control the positioning of labels, using the same positions as for Labeled:
BubbleChart[{{{2, 1, 1}, {1, 1, 1}}, {{1, 2, 2}, {2, 3, 3}}}, PlotLabels -> <|"Elements" -> Placed[{"c1", "c2"}, Center]|>, BubbleSizes -> {0.2, 0.7}]Provide value labels for bubbles by using LabelingFunction:
labeler[v_, {i_, j_}, {ri_, cj_}] := Placed[{v, ri[[1]], cj[[1]]}, Tooltip, MatrixForm]BubbleChart[{{{2, 3, 3}, {1, 2, 2}, {1, 1, 1}}, {{1, 3, 2}, {2, 1, 1}}}, PlotLabels -> <|"Groups" -> {"r1", "r2"}, "Elements" -> {"c1", "c2", "c3"}|>, FrameTicks -> None, BubbleSizes -> {0.2, 0.7}, LabelingFunction -> labeler]Specify the maximum size of labels:
data = Table[Callout[RandomReal[1, 3], RandomWord[]], {i, 20}];BubbleChart[data, LabelingSize -> 30]BubbleChart[data, LabelingSize -> Full]For dense sets of points, some labels may be turned into tooltips by default:
data = Table[Callout[RandomReal[1, 3], RandomWord[]], {i, 100}];BubbleChart[data]Increasing the size of the plot will show more labels:
BubbleChart[data, ImageSize -> 400]Use legend entries for different datasets:
data = RandomReal[1, {7, 3}];BubbleChart[{data, data + 1}, PlotLegends -> {"data1", "data2"}, PlotStyle -> {RGBColor[0.761959, 0.470832, 0.940597], RGBColor[0.431296, 0.709773, 0.927077]}]Use Legended to add additional legend entries:
BubbleChart[{{{2, 3, 3}, Legended[Style[{1, 2, 2}, RGBColor[1, 0.75, 0]], "extra"], {1, 1, 1}}, {{1, 3, 2}, {2, 1, 1}}}, PlotLegends -> {"data1", "data2"}, PlotStyle -> {RGBColor[0.761959, 0.470832, 0.940597], RGBColor[0.431296, 0.709773, 0.927077]}]Use Placed to affect the positioning of legends:
data = RandomReal[1, {7, 3}];Table[BubbleChart[{data, data + 1}, PlotLegends -> Placed[{"data1", "data2"}, p], PlotStyle -> {RGBColor[0.761959, 0.470832, 0.940597], RGBColor[0.431296, 0.709773, 0.927077]}], {p, {Below, Above}}]Options (122)
AspectRatio (3)
By default, BubbleChart uses the same width and height:
BubbleChart[IconizedObject[«data»]]Use a numerical value to specify the height to width ratio:
BubbleChart[IconizedObject[«data»], AspectRatio -> 1 / 2]AspectRatioAutomatic determines the range from the values:
BubbleChart[IconizedObject[«data»], AspectRatio -> Automatic]Axes (3)
By default, BubbleChart uses a frame instead of axes:
BubbleChart[IconizedObject[«data»]]BubbleChart[IconizedObject[«data»], Frame -> False, Axes -> True]Turn each axis on individually:
{BubbleChart[IconizedObject[«data»], Frame -> False, Axes -> {True, False}], BubbleChart[IconizedObject[«data»], Frame -> False, Axes -> {False, True}]}AxesLabel (4)
No axes labels are drawn by default:
BubbleChart[IconizedObject[«data»], Frame -> False, Axes -> True]BubbleChart[IconizedObject[«data»], Frame -> False, Axes -> True, AxesLabel -> "Y-axis"]BubbleChart[IconizedObject[«data»], Frame -> False, Axes -> True, AxesLabel -> {"x position", "y position"}]BubbleChart[QuantityArray[IconizedObject[«data»], "Meters"], Frame -> False, Axes -> True, AxesLabel -> Automatic]AxesOrigin (2)
AxesStyle (4)
Change the style for the axes:
BubbleChart[IconizedObject[«data»], Frame -> False, Axes -> True, AxesStyle -> RGBColor[0.93, 0.27, 0.27]]Specify the style of each axis:
**BubbleChart[IconizedObject[«data»], Frame -> False, Axes -> True, AxesStyle -> {{Thick, RGBColor[0.93, 0.27, 0.27]}, {Thick, RGBColor[0.4, 0.6, 1]}}]**Use different styles for the ticks and the axes:
**BubbleChart[IconizedObject[«data»], Frame -> False, Axes -> True, AxesStyle -> RGBColor[0.14, 0.8, 0.14], TicksStyle -> GrayLevel[0.62]]**Use different styles for the labels and the axes:
**BubbleChart[IconizedObject[«data»], Frame -> False, Axes -> True, AxesStyle -> RGBColor[0.14, 0.8, 0.14], LabelStyle -> RGBColor[0.93, 0.27, 0.27]]**BubbleScale (2)
By default, the area of a bubble is proportional to the z value:
BubbleChart[RandomReal[1, {3, 3, 3}], BubbleSizes -> {0.1, 0.4}, BubbleScale -> "Diameter"]Compare area scale to diameter scale:
data = Table[{i, i, i}, {i, 10}];Table[BubbleChart[data, BubbleSizes -> {0.1, 0.4}, BubbleScale -> scale, PlotLabel -> scale], {scale, {"Area", "Diameter"}}]BubbleSizes (1)
ChartElementFunction (5)
Get a list of built-in settings for ChartElementFunction:
ChartElementData["BubbleChart"]For more settings, use Palettes ▶ ChartElementSchemes:
data = {{1, 0, 1}, {0, 1, 2}, {1, 2, 3}};Table[BubbleChart[data, ChartElementFunction -> f, PlotStyle -> {RGBColor[0.761959, 0.470832, 0.940597], RGBColor[0.9584254999999999, 0.877884, 0.5906629999999999], RGBColor[0.431296, 0.709773, 0.927077]}, PlotLabel -> f], {f, {"Bubble", "MarkerBubble"}}]Table[BubbleChart[data, ChartElementFunction -> f, PlotStyle -> {RGBColor[0.761959, 0.470832, 0.940597], RGBColor[0.9584254999999999, 0.877884, 0.5906629999999999], RGBColor[0.431296, 0.709773, 0.927077]}, PlotLabel -> f], {f, {"SphereBubble", "PolyhedronBubble"}}]Table[BubbleChart[data, ChartElementFunction -> f, PlotStyle -> {RGBColor[0.761959, 0.470832, 0.940597], RGBColor[0.9584254999999999, 0.877884, 0.5906629999999999], RGBColor[0.431296, 0.709773, 0.927077]}, PlotLabel -> f], {f, {"NoiseBubble", "OscillatingBubble"}}]Write a custom ChartElementFunction:
f[{{xmin_, xmax_}, {ymin_, ymax_}}, v_, meta_, style___] :=
{Rectangle[{xmin, ymin}, {xmax, ymax}]}BubbleChart[{{1, 0, 1}, {0, 1, 2}, {1, 2, 3}}, ChartElementFunction -> f]Use metadata passed on from the input, in this case, charting the data:
DataDrilldownBubble[{{xmin_, xmax_}, {ymin_, ymax_}}, v_, {meta_}, style___] :=
PopupWindow[Polygon[{{xmin, ymin}, {xmax, ymax}, {xmin, ymax}, {xmax, ymin}}], PieChart[meta]]DataDrilldownBubble[{{xmin_, xmax_}, {ymin_, ymax_}}, y_, ___] :=
Rectangle[{xmin, ymin}, {xmax, ymax}]BubbleChart[{{1, 0, 1} -> Range[5], {0, 1, 2}, {1, 2, 3} -> RandomReal[1, 10]}, ChartElementFunction -> DataDrilldownBubble]The built-in element function may have options; use Palettes ▶ ChartElementSchemes to set them:
ChartElementData["MarkerBubble", "Options"]Table[BubbleChart[{{1, 0, 1}, {0, 1, 2}, {1, 2, 3}}, ChartElementFunction -> ChartElementDataFunction["MarkerBubble", "Shape" -> s, "Filled" -> True]], {s, {"CircleTimes", "Diamond"}}]ChartElements (5)
Create a pictorial chart based on any Graphics object:
data = RandomReal[1, {7, 3}];BubbleChart[data, ChartElements -> Graphics[Rectangle[]]]BubbleChart[data, ChartElements -> Graphics3D[Sphere[]]]BubbleChart[data, ChartElements -> ExampleData[{"TestImage", "House"}]]Use a different graphic for each dataset:
data = {{{1, 0, 3}, {0, 1, 2}, {1, 2, 3}}, {{5, 4, 5}, {4, 5, 6}, {5, 6, 5}}};BubbleChart[data, ChartElements -> {[image], [image]}]BubbleChart[{{1, 1, 1}, {2, 2, 1}, {3, 3, 1}, {4, 4, 1}, {5, 5, 1}}, ChartElements -> {[image], [image], [image]}]Styles are inherited from styles set through PlotStyle etc.:
BubbleChart[RandomReal[1, {10, 3}], ChartElements -> [image], PlotStyle -> {RGBColor[0.761959, 0.470832, 0.940597], RGBColor[0.9584254999999999, 0.877884, 0.5906629999999999], RGBColor[0.431296, 0.709773, 0.927077]}]Explicit styles set in the graphic will override other style settings:
BubbleChart[RandomReal[1, {10, 3}], ChartElements -> [image], PlotStyle -> {RGBColor[0.761959, 0.470832, 0.940597], RGBColor[0.9584254999999999, 0.877884, 0.5906629999999999], RGBColor[0.431296, 0.709773, 0.927077]}]Create true 3D shaded bubbles:
g = Graphics3D[{Specularity[White, 30], Sphere[]}, ViewPoint -> {0, -Infinity, 0}, Boxed -> False, Lighting -> "Neutral"];BubbleChart[RandomReal[1, {10, 3}], ChartElements -> g, PlotStyle -> {RGBColor[0.782803, 0.164904, 0.400458], RGBColor[0.909499, 0.613916, 0.204196], RGBColor[0.806577, 0.385397, 0.762768], RGBColor[0.698817, 0.873304, 0.295247], RGBColor[0.378897, 0.873304, 0.787549], RGBColor[1, 0.529198, 0.324819], RGBColor[1, 0.998367, 0.434775], RGBColor[0.873304, 0.150484, 0.255131], RGBColor[0.723598, 0.791043, 0.963806], RGBColor[0.85037, 0.558389, 0]}]ColorFunction (3)
BubbleChart[RandomInteger[100, {2, 70, 3}], ColorFunction -> Function[{x, y, r}, Lighter[RGBColor[0.14, 0.8, 0.14], x]]]Use ColorFunctionScaling->False to get unscaled height values:
BubbleChart[{{0, 0, 1}, {0.1, 0.8, 2}, {1, 2, 3}}, ColorFunction -> Function[{x, y, r}, Switch[{x, y, r}, {0, 0, 1}, RGBColor[1, 0.75, 0], {0.1, 0.8, 2}, RGBColor[0.98, 0.56, 0.17], {1, 2, 3}, RGBColor[0.93, 0.27, 0.27]]], ColorFunctionScaling -> False]ColorFunction overrides styles in PlotStyle:
data = {{0, 0, 1}, {0.1, 0.8, 2}, {1, 2, 3}};BubbleChart[data, PlotStyle -> RGBColor[0.14, 0.8, 0.14], ColorFunction -> "SolarColors"]Use ColorFunction to combine different style effects:
BubbleChart[data, PlotStyle -> EdgeForm /@ {None, Dashed, Dotted}, ColorFunction -> "SolarColors"]ColorFunctionScaling (2)
By default, scaled values are used:
BubbleChart[RandomInteger[100, {2, 70, 3}], ColorFunction -> Function[{x, y, r}, Lighter[RGBColor[0.14, 0.8, 0.14], x]]]Use ColorFunctionScaling->False to get unscaled height values:
BubbleChart[{{0, 0, 1}, {0.1, 0.8, 2}, {1, 2, 3}}, ColorFunction -> Function[{x, y, r}, Switch[{x, y, r}, {0, 0, 1}, RGBColor[1, 0.75, 0], {0.1, 0.8, 2}, RGBColor[0.98, 0.56, 0.17], {1, 2, 3}, RGBColor[0.93, 0.27, 0.27]]], ColorFunctionScaling -> False]Frame (4)
BubbleChart uses a frame by default:
BubbleChart[IconizedObject[«data»]]Use FrameFalse to turn off the frame:
BubbleChart[IconizedObject[«data»], Frame -> False]Draw a frame on the left and right edges:
BubbleChart[IconizedObject[«data»], Frame -> {{True, True}, {False, False}}]Draw a frame on the left and bottom edges:
BubbleChart[IconizedObject[«data»], Frame -> {{True, False}, {True, False}}]FrameLabel (4)
Place a label along the bottom edge of a chart:
BubbleChart[IconizedObject[«data»], FrameLabel -> {"label"}]Frame labels are placed on the bottom and left frame edges by default:
BubbleChart[IconizedObject[«data»], FrameLabel -> {"Bottom", "Left"}]Place labels on each of the edges in the frame:
BubbleChart[IconizedObject[«data»], FrameLabel -> {{"left", "right"}, {"bottom", "top"}}]Use a customized style for both labels and frame tick labels:
BubbleChart[IconizedObject[«data»], FrameLabel -> {{"left", "right"}, {"bottom", "top"}}, LabelStyle -> Directive[Bold, GrayLevel[0.62]]]FrameStyle (2)
Specify the style of the frame:
BubbleChart[IconizedObject[«data»], FrameStyle -> Directive[GrayLevel[0.62], Thick]]Specify style for each frame edge:
BubbleChart[IconizedObject[«data»], FrameStyle -> {{Directive[RGBColor[0.14, 0.8, 0.14], Thick], Directive[RGBColor[0.93, 0.27, 0.27]]}, {Directive[GrayLevel[0.62], Thick], Directive[RGBColor[0.4, 0.6, 1]]}}]FrameTicks (7)
Frame ticks are placed automatically by default:
BubbleChart[IconizedObject[«data»]]By default, the top and right edges have tick marks but no tick labels:
BubbleChart[IconizedObject[«data»]]Use All to include tick labels on all edges:
BubbleChart[IconizedObject[«data»], FrameTicks -> All]Place tick marks at the specified positions:
BubbleChart[IconizedObject[«data»], FrameTicks -> {{{.1, .5, .8}, Automatic}, {Automatic, Automatic}}]Draw frame tick marks at the specified positions with specific labels:
BubbleChart[IconizedObject[«data»], FrameTicks -> {{{{.1, a}, {.5, b}, {.8, c}}, Automatic}, {{{.1, a}, {.5, b}, {.8, c}}, Automatic}}]Specify tick length as a fraction of the size of the chart:
BubbleChart[IconizedObject[«data»], FrameTicks -> {{{{.1, a, .1}, {.5, b, .1}, {.8, c, .1}}, Automatic}, {{{.1, a, .2}, {.5, b, .2}, {.8, c, .2}}, Automatic}}]Use different sizes in the positive and negative directions for tick marks:
BubbleChart[IconizedObject[«data»], FrameTicks -> {{{{.1, a, {.1, .1}}, {.5, b, {.1, .1}}, {.8, c, {.1, .1}}}, Automatic}, {{{.1, a, {.2, .05}}, {.5, b, {.2, .05}}, {.8, c, {.2, .05}}}, Automatic}}]Specify a style for the frame tick:
BubbleChart[IconizedObject[«data»], FrameTicks -> {{{{.1, a, {.1, .1}, Directive[Thick, RGBColor[0.4, 0.6, 1], Dashed]}, {.5, b, {.1, .1}, Directive[Thick, RGBColor[0.14, 0.8, 0.14]]}, {.8, c, {.1, .1}, Directive[Thick, RGBColor[0.93, 0.27, 0.27]]}}, Automatic}, {Automatic, Automatic}}]FrameTicksStyle (3)
By default, the frame ticks and frame tick labels use the same style as the frame:
BubbleChart[IconizedObject[«data»], FrameStyle -> Directive[RGBColor[0.93, 0.27, 0.27]]]Specify a style for the frame ticks:
BubbleChart[IconizedObject[«data»], FrameTicksStyle -> Directive[RGBColor[0.4, 0.6, 1], Thick], FrameStyle -> GrayLevel[0.85]]Use a different style for the ticks on each frame edge:
BubbleChart[IconizedObject[«data»], FrameTicksStyle -> {{Directive[RGBColor[0.93, 0.27, 0.27], Thick], Directive[RGBColor[0.4, 0.6, 1], Thick]}, {Directive[RGBColor[0.98, 0.56, 0.17], Thick], Directive[RGBColor[0.14, 0.8, 0.14], Thick]}}, FrameTicks -> All, FrameStyle -> GrayLevel[0.85]]ImageSize (7)
Use named sizes such as Tiny, Small, Medium and Large:
{BubbleChart[IconizedObject[«data»], ImageSize -> Tiny], BubbleChart[IconizedObject[«data»], ImageSize -> Small]}Specify the width of the plot:
{BubbleChart[IconizedObject[«data»], ImageSize -> 150], BubbleChart[IconizedObject[«data»], AspectRatio -> 1.5, ImageSize -> 150]}Specify the height of the plot:
{BubbleChart[IconizedObject[«data»], ImageSize -> {Automatic, 150}], BubbleChart[IconizedObject[«data»], AspectRatio -> 2, ImageSize -> {Automatic, 150}]}Allow the width and height to be up to a certain size:
{BubbleChart[IconizedObject[«data»], ImageSize -> UpTo[200]], BubbleChart[IconizedObject[«data»], AspectRatio -> 2, ImageSize -> UpTo[200]]}Specify the width and height for a graphic, padding with space if necessary:
BubbleChart[IconizedObject[«data»], ImageSize -> {200, 200}, Background -> GrayLevel[0.62]]Setting AspectRatioFull will fill the available space:
BubbleChart[IconizedObject[«data»], AspectRatio -> Full, ImageSize -> {200, 200}, Background -> GrayLevel[0.62]]Use maximum sizes for the width and height:
{BubbleChart[IconizedObject[«data»], ImageSize -> {UpTo[150], UpTo[100]}], BubbleChart[IconizedObject[«data»], AspectRatio -> 2, ImageSize -> {UpTo[150], UpTo[100]}]}Use ImageSizeFull to fill the available space in an object:
Framed[Pane[BubbleChart[IconizedObject[«data»], ImageSize -> Full, Background -> GrayLevel[0.62]], {200, 100}]]Specify the image size as a fraction of the available space:
Framed[Pane[BubbleChart[IconizedObject[«data»], AspectRatio -> Full, ImageSize -> {Scaled[0.5], Scaled[0.5]}, Background -> GrayLevel[0.62]], {200, 100}]]LabelingFunction (7)
Use automatic labeling by values through Tooltip and StatusArea:
BubbleChart[{{0, 0, 1}, {0.1, 0.8, 2}, {1, 2, 3}}, BubbleSizes -> {0.2, 0.7}, LabelingFunction -> Automatic]BubbleChart[{{0, 0, 1}, {0.1, 0.8, 2}, {1, 2, 3}}, BubbleSizes -> {0.2, 0.7}, LabelingFunction -> None]Use Placed to control label placement:
Table[BubbleChart[{{1, 0, 1}, {0, 1, 2}, {1, 2, 3}}, BubbleSizes -> {0.2, 0.7}, LabelingFunction -> (Placed[#, p]&), PlotLabel -> p, Ticks -> None], {p, {Bottom, Center, Top}}]Coordinate-based placement relative to a given bubble:
Table[BubbleChart[{{1, 0, 1}, {0, 1, 2}, {1, 2, 3}}, PlotRange -> All, BubbleSizes -> {0.2, 0.7}, LabelingFunction -> (Placed[#, p]&), PlotLabel -> p, Ticks -> None], {p, {{0, 0}, {1 / 2, 1 / 2}, {1, 1}}}]Use Callout to place labels automatically:
BubbleChart[{{1, 0, 1}, {0, 1, 2}, {1, 2, 3}}, PlotRange -> All, BubbleSizes -> {0.2, 0.7}, LabelingFunction -> (Callout[Row[#, ","], Automatic]&)]Use symbolic positions to place Callout labels:
Table[BubbleChart[{{1, 0, 1}, {0, 1, 2}, {1, 2, 3}}, PlotRange -> All, BubbleSizes -> {0.2, 0.7}, LabelingFunction -> (Callout[#, p]&)], {p, {Above, Below}}]Control the formatting of labels:
BubbleChart[{{1, 0, 1}, {0, 1, 2}, {1, 2, 3}}, LabelingFunction -> (Placed[#1, Tooltip, MatrixForm]&), BubbleSizes -> {0.2, 0.7}]Use the given chart labels as arguments to the labeling function:
bubbleLabel[v : {x_, y_, w_}, level_, {r_, c_}] := Placed[Grid[{{Row[{r[[1]], c[[1]], "Fund"}, " "], SpanFromLeft}, {"Age", x}, {"Return %", y}, {"Market Cap", w}}, Frame -> All, Alignment -> Left], Tooltip]data = {{{1, 11, 300}, {2, 50, 200}, {3, 20, 300}}, {{6, 20, 300}, {2, 8, 600}, {6, 16, 500}}};BubbleChart[data, PlotLabels -> <|"Groups" -> {"Growth", "Value"}, "Elements" -> Placed[{"Small-Cap", "Mid-Cap", "Large-Cap"}, None]|>, LabelingFunction -> bubbleLabel]LabelingSize (4)
Textual labels are shown at their actual sizes:
BubbleChart[{{0, 0, 1}, {0.1, 0.8, 2}, {1, 2, 3}}, PlotLabels -> Callout[{"healthfulness", "obstreperous", "spectrogram"}]]Image labels are automatically resized:
BubbleChart[{{0, 0, 1}, {0.1, 0.8, 2}, {1, 2, 3}}, PlotLabels -> Callout[{[image], [image], [image]}]]Specify a maximum size for textual labels:
BubbleChart[{{0, 0, 1}, {0.1, 0.8, 2}, {1, 2, 3}}, PlotLabels -> Callout[{"healthfulness", "obstreperous", "spectrogram"}], LabelingSize -> 30]Specify a maximum size for image labels:
BubbleChart[{{0, 0, 1}, {0.1, 0.8, 2}, {1, 2, 3}}, PlotLabels -> Callout[{[image], [image], [image]}], LabelingSize -> 20]Show image labels at their natural sizes:
BubbleChart[{{0, 0, 1}, {0.1, 0.8, 2}, {1, 2, 3}}, PlotLabels -> Callout[{[image], [image], [image]}], LabelingSize -> Full]LabelingTarget (7)
Labels are automatically placed to maximize readability:
BubbleChart[IconizedObject[«data»]]BubbleChart[IconizedObject[«data»], LabelingTarget -> All]Use a denser layout for the labels:
BubbleChart[IconizedObject[«data»], LabelingTarget -> "Dense"]Show the quarter of the labels that are easiest to read:
BubbleChart[IconizedObject[«data»], LabelingTarget -> 0.25]Only allow labels that are orthogonal to the points:
BubbleChart[IconizedObject[«data»], LabelingTarget -> <|"AllowedLabelingPositions" -> "Sides"|>]Only allow labels that are diagonal to the points:
BubbleChart[IconizedObject[«data»], LabelingTarget -> <|"AllowedLabelingPositions" -> "Corners"|>]Restrict labels to be above or to the right of the points:
BubbleChart[IconizedObject[«data»], LabelingTarget -> <|"AllowedLabelingPositions" -> {"Right", "Top"}|>]Allow labels to obscure other points:
BubbleChart[IconizedObject[«data»], LabelingTarget -> <|"AllowedOverlaps" -> {"Points"}|>]Allow labels to be clipped by the edges of the plot:
BubbleChart[IconizedObject[«data»], LabelingTarget -> <|"AllowLabelClipping" -> True|>]PerformanceGoal (1)
Generate a bubble chart with interactive highlighting:
data = RandomReal[1, {3, 6, 3}];BubbleChart[data, PerformanceGoal -> "Quality"]Emphasize performance by disabling interactive behaviors:
BubbleChart[data, PerformanceGoal -> "Speed"]Typically, less memory is required for non-interactive charts:
Table[ByteCount@BubbleChart[data, PerformanceGoal -> p], {p, {"Quality", "Speed"}}]PlotInteractivity (4)
Charts with a moderate number of bubbles automatically have tooltips and mouseover effects:
BubbleChart[{{1, 1, 1}, {2, 2, 2}, {3, 3, 3}}]Turn off all the interactive elements:
BubbleChart[{{1, 1, 1}, {2, 2, 2}, {3, 3, 3}}, PlotInteractivity -> False]Interactive elements provided as part of the input are disabled:
BubbleChart[{{1, 1, 1}, {2, 2, 2}, Tooltip[{3, 3, 3}, "hello"]}, PlotInteractivity -> False]Allow provided interactive elements and disable automatic ones:
BubbleChart[{{1, 1, 1}, {2, 2, 2}, Tooltip[{3, 3, 3}, "hello"]}, PlotInteractivity -> <|"User" -> True, "System" -> False|>]PlotLabels (9)
By default, labels are placed radially centered:
BubbleChart[RandomReal[1, {4, 3}], PlotLabels -> {"a", "b", "c", "d"}]By default, labels are associated with data elements or groups automatically:
{BubbleChart[RandomReal[1, {4, 3}], PlotLabels -> {"c1", "c2", "c3"}],
BubbleChart[RandomReal[1, {2, 4, 3}], PlotLabels -> {"r1", "r2", "r3"}]}Specify labels to data elements specifically:
BubbleChart[RandomReal[1, {4, 3, 3}], PlotLabels -> <|"Elements" -> {"c1", "c2", "c3"}|>]Label both groups and elements:
BubbleChart[RandomReal[1, {4, 3, 3}], PlotLabels -> <|"Groups" -> {"r1", "r2"}, "Elements" -> {"c1", "c2", "c3"}|>]Labeled wrappers in data will place additional labels:
data = {{1, 0, 1}, Labeled[{0, 1, 2}, "label", Below], {2, 2, 3}};BubbleChart[data, PlotLabels -> {"a", "b", "c"}]Use Placed to affect placements:
data = {{1, 0, 1}, {0, 1, 2}, {2, 2, 3}};BubbleChart[data, PlotLabels -> <|"Groups" -> Placed[{"r1", "r2"}, Center], "Elements" -> Placed[{"c1", "c2", "c3"}, Below]|>]Symbolic positions outside the bubble:
Table[BubbleChart[{{1, 0, 1}, {0, 1, 2}, {2, 2, 3}}, PlotLabels -> Placed[{"a", "b", "c"}, p], PlotLabel -> p, Ticks -> None], {p, {Below, Above}}]Table[BubbleChart[{{1, 0, 1}, {0, 1, 2}, {2, 2, 3}}, PlotLabels -> Placed[{"a", "b", "c"}, p], PlotLabel -> p, Ticks -> None], {p, {Before, After}}]Coordinate-based placement relative to a bubble:
Table[BubbleChart[{{1, 0, 1}, {0, 1, 2}, {2, 2, 3}}, PlotLabels -> Placed[{"aa", "bb", "cc"}, p], PlotLabel -> p], {p, {{0, 0}, {1 / 2, 1 / 2}, {1, 1}}}]Place all labels at the upper-right corner and vary the coordinates within the label:
Table[BubbleChart[{{1, 0, 1}, {0, 1, 2}, {2, 2, 3}}, PlotLabels -> Placed[Framed /@ {"aa", "bb", "cc"}, {{1, 1}, p}], Ticks -> None, PlotLabel -> p], {p, {{0, 0}, {1 / 2, 1 / 2}, {1, 1}}}]Use the third argument to Placed to control formatting:
BubbleChart[{{1, 0, 1}, {0, 1, 2}, {2, 2, 3}}, BubbleSizes -> {0.3, 0.4}, PlotLabels -> Placed[{"aaa", "bbb", "ccc"}, Center, Rotate[#, 45Degree]&]]BubbleChart[{{1, 0, 1}, {0, 1, 2}, {2, 2, 3}}, BubbleSizes -> {0.3, 0.4}, PlotLabels -> Placed[{"aaa", "bbb", "ccc"}, Center, Panel[#, FrameMargins -> 0]&]]BubbleChart[{{1, 0, 1}, {0, 1, 2}, {2, 2, 3}}, PlotLabels -> Placed[{"aaa", "bbb", "ccc"}, Center, Hyperlink[#, "http://www.wolfram.com"]&]]BubbleChart[{{1, 0, 1}, {0, 1, 2}, {2, 2, 3}}, PlotLabels -> Placed[{"aaa", "bbb", "ccc"}, Center, Rotate[#, Pi / 4]&]]Use Callout to connect the labels to the bubbles:
BubbleChart[{{1, 0, 1}, {0, 1, 2}, {2, 2, 3}}, PlotLabels -> Callout[{"c1", "c2", "c3"}]]Place multiple labels using Placed:
BubbleChart[{{1, 0, 1}, {0, 1, 2}, {2, 2, 3}}, BubbleSizes -> {0.4, 0.6}, PlotLabels -> Placed[{{"a", "b", "c"}, {"x", "y", "z"}}, {Top, Bottom}, Framed[#, FrameMargins -> 1, Background -> RGBColor[1, 0.75, 0]]&]]PlotLegends (7)
Add categorical legend entries for data elements:
data = {{{1, 0, 3}, {0, 1, 2}, {1, 2, 1}}, {{5, 4, 1}, {4, 5, 6}, {5, 6, 5}}};BubbleChart[data, PlotLegends -> <|"Elements" -> {"ccc1", "ccc2", "ccc3"}|>, PlotStyle -> <|"Elements" -> {RGBColor[0.761959, 0.470832, 0.940597], RGBColor[0.9584254999999999, 0.877884, 0.5906629999999999], RGBColor[0.431296, 0.709773, 0.927077]}|>]BubbleChart[data, PlotLegends -> <|"Groups" -> {"rr1", "rr2"}|>, PlotStyle -> <|"Groups" -> {RGBColor[0.761959, 0.470832, 0.940597], RGBColor[0.431296, 0.709773, 0.927077]}|>]Use Legended to add additional legend entries:
BubbleChart[{{{1, 0, 3}, Legended[Style[{0, 1, 2}, RGBColor[0.93, 0.27, 0.27]], "aa"], {1, 2, 1}}, {{5, 4, 1}, {4, 5, 6}, {5, 6, 5}}}, PlotStyle -> <|"Elements" -> {RGBColor[0.761959, 0.470832, 0.940597], RGBColor[0.9584254999999999, 0.877884, 0.5906629999999999], RGBColor[0.431296, 0.709773, 0.927077]}|>, PlotLegends -> <|"Elements" -> {"ccc1", "ccc2", "ccc3"}|>]Use Legended to specify a few legend entries:
BubbleChart[{{1, 0, 3}, Legended[{0, 1, 2}, "aa"], {1, 2, 1}, Legended[{5, 4, 1}, "bb"], {4, 5, 6}}, PlotStyle -> <|"Elements" -> {RGBColor[0.761959, 0.470832, 0.940597], RGBColor[0.898695, 0.686452, 0.6785475], RGBColor[0.9584254999999999, 0.877884, 0.5906629999999999], RGBColor[0.86116075, 0.930182, 0.758764], RGBColor[0.431296, 0.709773, 0.927077]}|>]Generate a legend for data groups:
data = {{{1, 0, 3}, {0, 1, 2}, {1, 2, 1}}, {{5, 4, 1}, {4, 5, 6}, {5, 6, 5}}};BubbleChart[data, PlotLegends -> <|"Groups" -> {"Group A", "Group B"}|>, PlotStyle -> <|"Groups" -> {RGBColor[0.761959, 0.470832, 0.940597], RGBColor[0.431296, 0.709773, 0.927077]}|>]Unused legend labels are dropped:
data = {{{1, 0, 3}, {0, 1, 2}, {1, 2, 1}}, {{5, 4, 1}, {4, 5, 6}, {5, 6, 5}}};BubbleChart[data, PlotLegends -> <|"Groups" -> {"Group A", "Group B", "Group C"}|>, PlotStyle -> <|"Groups" -> {RGBColor[0.761959, 0.470832, 0.940597], RGBColor[0.431296, 0.709773, 0.927077]}|>]Use legends for both group and element styles:
data = {{{1, 0, 3}, {0, 1, 2}, {1, 2, 1}}, {{5, 4, 1}, {4, 5, 6}, {5, 6, 5}}};BubbleChart[data, PlotLegends -> <|"Groups" -> {"Test A", "Test B"}, "Elements" -> {"John", "Mary", "Bob"}|>, PlotStyle -> <|"Elements" -> {RGBColor[0.761959, 0.470832, 0.940597], RGBColor[0.9584254999999999, 0.877884, 0.5906629999999999], RGBColor[0.431296, 0.709773, 0.927077]}, "Groups" -> {EdgeForm[{Opacity[1], RGBColor[0.93, 0.27, 0.27]}], EdgeForm[{Opacity[1], RGBColor[0.4, 0.6, 1]}]}|>]Use Placed to control the placement of legends:
data = {{{1, 0, 3}, {0, 1, 2}, {1, 2, 1}}, {{5, 4, 1}, {4, 5, 6}, {5, 6, 5}}};Table[BubbleChart[data, PlotLegends -> <|"Elements" -> Placed[{"John", "Mary", "Bob"}, pos]|>, PlotStyle -> <|"Elements" -> {RGBColor[0.761959, 0.470832, 0.940597], RGBColor[0.9584254999999999, 0.877884, 0.5906629999999999], RGBColor[0.431296, 0.709773, 0.927077]}|>], {pos, {Below, Above, Before, After}}]PlotStyle (10)
BubbleChart[RandomReal[1, {4, 3}], PlotStyle -> {RGBColor[0.93, 0.27, 0.27], RGBColor[0.14, 0.8, 0.14], RGBColor[0.4, 0.6, 1], RGBColor[1, 0.75, 0]}]BubbleChart[RandomReal[1, {4, 3}], PlotStyle -> Directive[Opacity[0.7], EdgeForm[Dashed], RGBColor[0.3655821205642109, 0.582006632236133, 0.0357851567943297]]]data = {{{1, 0, 3}, {0, 1, 2}, {1, 2, 1}}, {{5, 4, 1}, {4, 5, 6}, {5, 6, 5}}};BubbleChart[data, PlotStyle -> {RGBColor[0.93, 0.27, 0.27], RGBColor[0.4, 0.6, 1]}]BubbleChart[RandomReal[1, {5, 3}], PlotStyle -> <|"Elements" -> {RGBColor[0.93, 0.27, 0.27], RGBColor[0.14, 0.8, 0.14]}|>]BubbleChart[RandomReal[1, {4, 3}], PlotStyle -> <|"Elements" -> {RGBColor[0.93, 0.27, 0.27], RGBColor[0.14, 0.8, 0.14], RGBColor[0.4, 0.6, 1], RGBColor[1, 0.75, 0]}|>]data = {{{1, 0, 3}, {0, 1, 2}, {1, 2, 1}}, {{5, 4, 1}, {4, 5, 6}, {5, 6, 5}}};BubbleChart[data, PlotStyle -> <|"Groups" -> {RGBColor[0.93, 0.27, 0.27], RGBColor[0.14, 0.8, 0.14]}|>]BubbleChart[data, PlotStyle -> <|"Base" -> {EdgeForm[Dashed], Opacity[0.7]}|>]Style both elements and groups of data:
BubbleChart[data, PlotStyle -> <|"Groups" -> {EdgeForm[Dotted], EdgeForm[Dashed]}, "Elements" -> {RGBColor[0.93, 0.27, 0.27], RGBColor[0.14, 0.8, 0.14], RGBColor[0.4, 0.6, 1]}|>]With both element and group styles specified, the element styles may override the group styles:
data = {{{1, 0, 3}, {0, 1, 2}, {1, 2, 1}}, {{5, 4, 1}, {4, 5, 6}, {5, 6, 5}}};BubbleChart[data, PlotStyle -> <|"Elements" -> {RGBColor[0.93, 0.27, 0.27], RGBColor[0.14, 0.8, 0.14], RGBColor[0.4, 0.6, 1]}, "Groups" -> {RGBColor[1, 0.75, 0], RGBColor[0.95, 0.43, 0.96]}|>]PlotStyle combines with Style:
BubbleChart[{{1, 0, 3}, Style[{0, 1, 2}, Opacity[0.1]], {1, 2, 1}}, PlotStyle -> {RGBColor[0.93, 0.27, 0.27], RGBColor[0.14, 0.8, 0.14], RGBColor[0.4, 0.6, 1]}]BubbleChart[{{1, 0, 3}, Style[{0, 1, 2}, EdgeForm[Dashed]], {1, 2, 1}}, PlotStyle -> {RGBColor[0.93, 0.27, 0.27], RGBColor[0.14, 0.8, 0.14], RGBColor[0.4, 0.6, 1]}]Style may override settings for PlotStyle:
BubbleChart[{{1, 0, 3}, Style[{0, 1, 2}, RGBColor[1, 0.75, 0]], {1, 2, 1}}, PlotStyle -> {RGBColor[0.93, 0.27, 0.27], RGBColor[0.14, 0.8, 0.14], RGBColor[0.4, 0.6, 1]}]Styles from ColorFunction and PlotStyle may be combined:
BubbleChart[{{1, 0, 3}, {0, 1, 2}, {2, 2, 1}}, PlotStyle -> EdgeForm /@ {Dashed, Dotted, DotDashed}, ColorFunction -> (Blend[{RGBColor[0.4, 0.6, 1], RGBColor[0.93, 0.27, 0.27]}, #]&)]ColorFunction may override settings for PlotStyle:
BubbleChart[{{1, 0, 3}, {0, 1, 2}, {2, 2, 1}}, PlotStyle -> {RGBColor[0.93, 0.27, 0.27], RGBColor[0.14, 0.8, 0.14], RGBColor[0.4, 0.6, 1]}, ColorFunction -> "SolarColors"]ChartElements may override settings for PlotStyle:
BubbleChart[{{1, 0, 3}, {0, 1, 2}, {2, 2, 1}}, ChartElements -> [image], PlotStyle -> {RGBColor[0.93, 0.27, 0.27], RGBColor[0.14, 0.8, 0.14], RGBColor[0.4, 0.6, 1]}]PlotTheme (2)
Ticks (6)
Ticks are placed automatically in each chart:
BubbleChart[IconizedObject[«data»], Frame -> False, Axes -> True]Use TicksNone to draw axes without any tick marks:
BubbleChart[IconizedObject[«data»], Frame -> False, Axes -> True, Ticks -> None]Place tick marks at the specified positions:
BubbleChart[IconizedObject[«data»], Frame -> False, Axes -> True, Ticks -> {{.1, .5, .8}, {.1, .5, .8}}]Draw tick marks at the specified positions with specific labels:
BubbleChart[IconizedObject[«data»], Frame -> False, Axes -> True, Ticks -> {{{.1, a}, {.5, b}, {.8, c}}, {{.1, a}, {.5, b}, {.8, c}}}]Specify the lengths for ticks as a fraction of graphics size:
BubbleChart[IconizedObject[«data»], Frame -> False, Axes -> True, Ticks -> {{{.1, a, .1}, {.5, b, .1}, {.8, c, .1}}, {{.1, a, .2}, {.5, b, .2}, {.8, c, .2}}}]Use different sizes in the positive and negative directions for ticks:
BubbleChart[IconizedObject[«data»], Frame -> False, Axes -> True, Ticks -> {{{.1, a, {.1, .1}}, {.5, b, {.1, .15}}, {.8, c, {.1, .2}}}, Automatic}]BubbleChart[IconizedObject[«data»], Frame -> False, Axes -> True, Ticks -> {{{.04, a, .45, Directive[Thick, RGBColor[0.93, 0.27, 0.27]]}, {.64, b, .35, Directive[RGBColor[0.93, 0.27, 0.27]]}, {.72, c, .1, Directive[Thick, RGBColor[0.4, 0.6, 1]]}}, Automatic}]TicksStyle (4)
By default, the ticks and tick labels use the same styles as the axis:
BubbleChart[IconizedObject[«data»], Frame -> False, Axes -> True]Specify an overall ticks style, including the tick labels:
BubbleChart[IconizedObject[«data»], Frame -> False, Axes -> True, TicksStyle -> RGBColor[0.93, 0.27, 0.27]]Specify ticks style for each of the axes:
BubbleChart[IconizedObject[«data»], Frame -> False, Axes -> True, TicksStyle -> {Directive[RGBColor[0.93, 0.27, 0.27], Thick], Directive[RGBColor[0.4, 0.6, 1], Thick]}]Use a different style for the tick labels and tick marks:
BubbleChart[IconizedObject[«data»], Frame -> False, Axes -> True, TicksStyle -> Directive[RGBColor[0.93, 0.27, 0.27], Thick], LabelStyle -> RGBColor[0.4, 0.6, 1]]Applications (4)
Display GDP per capita, poverty fraction and population for countries in Africa:
countries = CountryData["Africa"];
properties = {"PovertyFraction", "GDPPerCapita", "Population"};
data = {#1, Log@QuantityMagnitude@#2, #3}&@@@Table[CountryData[c, p], {c, countries}, {p, properties}];Define a labeling function for more complex tooltips:
labeler[v_, {r_, c_}, ___] := Placed[Grid[{{Style[countries[[c]], Bold, 12], SpanFromLeft}, {"Poverty", Row[{Round[100v[[1]]], "%"}]}, {"GDP Per Capita", Row[{"$", Round[Exp[v[[2]]]]}]}, {"Population", Row[{NumberForm[v[[3]] 10 ^ -6, {4, 2}], " million"}]}}, Alignment -> Left], Tooltip]Mouse over the bubbles to view a country's data:
BubbleChart[data, PlotStyle -> {RGBColor[0.9215686274509803, 0.49411764705882355, 0.43137254901960786], RGBColor[1., 0.7215686274509804, 0.2196078431372549], RGBColor[0.9490196078431372, 0.8627450980392157, 0.43529411764705883], RGBColor[0.6705882352941176, 0.8784313725490196, 0.9372549019607843], RGBColor[0.3176470588235294, 0.6549019607843137, 0.7529411764705882], RGBColor[0.09019607843137255, 0.33725490196078434, 0.49411764705882355], RGBColor[0.5333333333333333, 0.23529411764705882, 0.3058823529411765], RGBColor[0.8941176470588236, 0.7098039215686275, 0.7490196078431373]}, LabelingFunction -> labeler, FrameLabel -> {"Poverty Fraction", "Log GDP Per Capita"}]Display oil data for the G15 countries using PieChart for bubbles to indicate import and export:
countries = CountryData["G15"];
properties = {"OilConsumption", "OilProduction", "OilReserves", "OilExports", "OilImports"};
data = Table[CountryData[c, p], {c, countries}, {p, properties}];BubbleChart[data[[All, 1 ;; 3]], ChartElements -> Table[PieChart[d, LabelingFunction -> None], {d, data[[All, 4 ;; 5]]}], BubbleSizes -> {0.05, 0.15}, PlotLabels -> Placed[countries, Tooltip], FrameLabel -> properties[[1 ;; 2]]]Get population, weather and coordinate data of large Japanese cities:
data = Table[Tooltip[Flatten@{Reverse@CityData[city, "Coordinates"], CityData[city, "Population"]}, Column[{CityData[city, "Name"], WeatherData[city, "Temperature"] "°C"}]], {city, CityData[{Large, "Japan"}]}];map = Graphics[{LightGray, CountryData["Japan", "Polygon"]}]Mouse over the bubbles to get city and temperature information:
Show[map, BubbleChart[data, BubbleSizes -> {0.01, 0.15}, PlotStyle -> {RGBColor[0.70135, 0.093019, 0.00140383], RGBColor[0.289647, 0.222614, 0.484169], RGBColor[0.98677, 0.98793, 0.458686], RGBColor[0.42948, 0.524086, 0.719463], RGBColor[0.30808, 0.443137, 0.124895], RGBColor[0.895125, 0.71606, 0.0964523], RGBColor[0.138415, 0.184848, 0.429862], RGBColor[0.882353, 0.0253147, 0.11165], RGBColor[0.895125, 0.870893, 0.632624]}], PlotLabel -> Style["Current Temperature of the Largest Cities in Japan", "Title", 14]]Represent clusters of elements based on three properties:
properties = {"Density", "BoilingPoint", "ThermalConductivity"};
elements = Table[ElementData[z], {z, 1, 80}];
data = Table[Table[ElementData[e, p], {p, properties}] -> e, {e, elements}];
clusters = FindClusters[QuantityMagnitude[#[[1]]] -> #[[2]]& /@ data, 10];Cluster the elements into groups based on the value of their properties:
tooltipLabel[elem_Entity] := Module[{d, bPt, tc, dat}, {d, bPt, tc} = dat = Table[ElementData[elem, p], {p, properties}];
Tooltip[dat, Grid[{{elem}, {"Density", d, "kg/SuperscriptBox[m, 3]"}, {"BoilingPoint", bPt, "°C"}, {"ThermalConductivity", tc, "W/mK"}}, Alignment -> Left]]]Mouse over the bubbles to get element information:
BubbleChart[Table[tooltipLabel /@ d, {d, clusters}], ImageSize -> 400, PlotLegends -> <|"Groups" -> Table[Row[{"Cluster ", i}], {i, Length[clusters]}]|>, PlotStyle -> {RGBColor[0.33725490196078434, 0.403921568627451, 0.6235294117647059], RGBColor[0.08627450980392157, 0.1411764705882353, 0.28627450980392155], RGBColor[0.20784313725490197, 0.23921568627450981, 0.3215686274509804], RGBColor[0.7019607843137254, 0.7450980392156863, 0.8235294117647058], RGBColor[1., 0.8784313725490196, 0.5058823529411764], RGBColor[0.4823529411764706, 0.18823529411764706, 0.03529411764705882], RGBColor[1., 0.4549019607843137, 0.2549019607843137], RGBColor[1., 0.26666666666666666, 0.], RGBColor[0.8588235294117647, 0.00784313725490196, 0.00784313725490196]}, FrameLabel -> properties[[1 ;; 2]]]Properties & Relations (2)
Use BubbleChart3D to get a 3D rendering of bubble charts:
{BubbleChart[{{3, 4, 4}, {3, 6, 3}, {4, 3, 5}}], BubbleChart3D[{{3, 4, 1, 4}, {3, 6, 1, 3}, {4, 3, 1, 5}}]}Use SectorChart3D and RectangleChart3D as alternative visualizations:
Table[f[{{3, 4, 4}, {3, 6, 3}, {4, 3, 5}}], {f, {RectangleChart3D, SectorChart3D, BubbleChart}}]Neat Examples (2)
Plot index against squares modulo 67 with growing bubble sizes:
BubbleChart[Table[{i, Mod[i ^ 2, 67], i}, {i, 300}], BubbleSizes -> {0.01, 0.05}]BubbleChart[RandomReal[1, {80, 3}], Frame -> False, PerformanceGoal -> "Speed", ChartElementFunction -> "FadingRectangle", PlotStyle -> <|"Base" -> EdgeForm[None], "Elements" -> {RGBColor[0.6235294117647059, 0.1450980392156863, 0.12549019607843137], RGBColor[0.6588235294117647, 0.3058823529411765, 0.17254901960784313], RGBColor[0.24313725490196078, 0.11764705882352941, 0.058823529411764705], RGBColor[0.9450980392156862, 0.7529411764705882, 0.6352941176470588], RGBColor[0.8392156862745098, 0.4745098039215686, 0.21176470588235294], RGBColor[0.8274509803921568, 0.7254901960784313, 0.43529411764705883], RGBColor[0.44313725490196076, 0.4980392156862745, 0.5490196078431373], RGBColor[0.24705882352941178, 0.30980392156862746, 0.37254901960784315], RGBColor[0.16862745098039217, 0.23921568627450981, 0.3803921568627451], RGBColor[0.2980392156862745, 0.17647058823529413, 0.19607843137254902]}|>]See Also
ListPlot ListPlot3D ListDensityPlot BubbleChart3D SectorChart BarChart GeoBubbleChart
Function Repository: ComplexBubblePlot
History
Introduced in 2008 (7.0) | Updated in 2010 (8.0) ▪ 2012 (9.0) ▪ 2014 (10.0) ▪ 2017 (11.1) ▪ 2018 (11.3) ▪ 2025 (14.2) ▪ 2025 (14.3) ▪ 2026 (15.0)
Text
Wolfram Research (2008), BubbleChart, Wolfram Language function, https://reference.wolfram.com/language/ref/BubbleChart.html (updated 2026).
CMS
Wolfram Language. 2008. "BubbleChart." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2026. https://reference.wolfram.com/language/ref/BubbleChart.html.
APA
Wolfram Language. (2008). BubbleChart. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BubbleChart.html
BibTeX
@misc{reference.wolfram_2026_bubblechart, author="Wolfram Research", title="{BubbleChart}", year="2026", howpublished="\url{https://reference.wolfram.com/language/ref/BubbleChart.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_bubblechart, organization={Wolfram Research}, title={BubbleChart}, year={2026}, url={https://reference.wolfram.com/language/ref/BubbleChart.html}, note=[Accessed: 13-June-2026]}