BubbleChart3D[{{x1,y1,z1,u1},{x2,y2,z2,u2},…}]
makes a 3D bubble chart with bubbles at positions {xi,yi,zi} with sizes ui.
BubbleChart3D[{…,wi[{xi,yi,zi,ui},…],…,wj[{xj,yj,zj,uj},…],…}]
makes a 3D bubble chart with bubble features defined by the symbolic wrappers wk.
BubbleChart3D[{data1,data2,…}]
makes a 3D bubble chart from multiple datasets datai.
BubbleChart3D
BubbleChart3D[{{x1,y1,z1,u1},{x2,y2,z2,u2},…}]
makes a 3D bubble chart with bubbles at positions {xi,yi,zi} with sizes ui.
BubbleChart3D[{…,wi[{xi,yi,zi,ui},…],…,wj[{xj,yj,zj,uj},…],…}]
makes a 3D bubble chart with bubble features defined by the symbolic wrappers wk.
BubbleChart3D[{data1,data2,…}]
makes a 3D bubble chart from multiple datasets datai.
Details and Options
- Data elements for BubbleChart3D can be given in the following forms:
-
{xi,yi,zi,ui} a pure bubble value {Quantity[xi,ux],Quantity[yi,uy],Quantity[zi,uz],Quantity[ui,uu]} a bubble value with units <|kxxi,kyyi,kzzi,kuui|> association of keys and bubble value wi[{xi,yi,zi,ui},…] a bubble with value {xi,yi,zi,ui} and wrapper wi formi->mi a bubble form with metadata mi - The values ui should be positive.
- Data not given in these forms is ignored in forming the 3D bubble chart.
- Datasets for BubbleChart3D 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 - BubbleChart3D[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,colw} plot data from columns x. y, z and w {{colx1,coly1,colz1,colw1},{colx2,coly2,colz2,colw2},…} 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 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 BubbleChart3D, Labeled and Placed allow the following positions:
-
Top,Bottom,Left,Right,Center, Front,Back positions within bubbles Above,Below, Before, After positions outside bubbles {{bx,by,bz},{lx,ly}} scaled position {lx,ly} in the label at scaled position {bx,by,bz} in the bubble - BubbleChart3D has the same options as Graphics3D with the following additions and changes: [List of all options]
-
Axes True whether to draw axes AxesEdge {{-1, -1}, {1, -1}, {-1, -1}} on which edges to put axes Boxed {Left,Bottom,Back} what faces to draw on a bounding box BoxRatios {1,1,1} bounding 3D box ratios BubbleScale "Volume" size feature 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 the arguments for ColorFunction FaceGrids Automatic grid lines to draw on the bounding box LabelingFunction Automatic how to label bubbles LegendAppearance Automatic overall appearance of legends Lighting "Neutral" simulated light sources to use PerformanceGoal $PerformanceGoal aspects of performance to try to optimize PlotInteractivity $PlotInteractivity whether to allow interactive elements PlotLabels None category labels for bubbles PlotLegends None legends for data elements and datasets PlotStyle Automatic style for bubbles PlotTheme $PlotTheme overall theme for the chart ScalingFunctions None how to scale individual coordinates TargetUnits Automatic units to display in the chart - With the setting ChartElements->g, the graphic g will be used to form pictorial bubbles consisting of stretched versions of g.
- 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},{zmin,zmax}}, the values {xi,yi,zi,ui}, 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["BubbleChart3D"].
- The arguments supplied to ColorFunction are x, y, z, and u.
- Style and other specifications from options and other constructs in BubbleChart3D 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 Automatic ratio of height to width Axes True whether to draw axes AxesEdge {{-1, -1}, {1, -1}, {-1, -1}} on which edges to put axes AxesLabel None axes labels AxesOrigin Automatic where axes should cross AxesStyle {} graphics directives to specify the style for 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 Boxed {Left,Bottom,Back} what faces to draw on a bounding box BoxRatios {1,1,1} bounding 3D box ratios BoxStyle {} style specifications for the box BubbleScale "Volume" size feature 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 ClipPlanes None clipping planes ClipPlanesStyle Automatic style specifications for clipping planes ColorFunction Automatic how to color bubbles ColorFunctionScaling True whether to normalize the arguments for ColorFunction ContentSelectable Automatic whether to allow contents to be selected ControllerLinking False when to link to external rotation controllers ControllerPath Automatic what external controllers to try to use Epilog {} 2D graphics primitives to be rendered after the main plot FaceGrids Automatic grid lines to draw on the bounding box FaceGridsStyle {} style specifications for face grids FormatType TraditionalForm default format type for text ImageMargins 0. the margins to leave around the graphic ImagePadding All what extra padding to allow for labels, etc. ImageSize Automatic absolute size at which to render the graphic LabelingFunction Automatic how to label bubbles LabelStyle {} style specifications for labels LegendAppearance Automatic overall appearance of legends Lighting "Neutral" simulated light sources to use Method Automatic details of 3D graphics methods to use PerformanceGoal $PerformanceGoal aspects of performance to try to optimize PlotInteractivity $PlotInteractivity whether to allow interactive elements PlotLabel None a label for the plot PlotLabels None category labels for bubbles PlotLegends None legends for data elements and datasets PlotRange All range of values to include PlotRangePadding Automatic how much to pad the range of values PlotRegion Automatic final display region to be filled PlotStyle Automatic style for bubbles PlotTheme $PlotTheme overall theme for the chart PreserveImageOptions Automatic whether to preserve image options when displaying new versions of the same graphic Prolog {} 2D graphics primitives to be rendered before the main plot RotationAction "Fit" how to render after interactive rotation ScalingFunctions None how to scale individual coordinates SphericalRegion Automatic whether to make the circumscribing sphere fit in the final display area TargetUnits Automatic units to display in the chart Ticks Automatic specification for ticks TicksStyle {} style specification for ticks TouchscreenAutoZoom False whether to zoom to fullscreen when activated on a touchscreen ViewAngle Automatic angle of the field of view ViewCenter Automatic point to display at the center ViewMatrix Automatic explicit transformation matrix ViewPoint {1.3,-2.4,2.} viewing position ViewProjection Automatic projection method for rendering objects distant from the viewer ViewRange All range of viewing distances to include ViewVector Automatic position and direction of a simulated camera ViewVertical {0,0,1} direction to make vertical
List of all options
Examples
open all close allBasic Examples (3)
Create a 3D bubble chart for a list of 4-tuples:
BubbleChart3D[RandomReal[1, {10, 4}]]BubbleChart3D[RandomReal[1, {5, 10, 4}]]BubbleChart3D[RandomReal[1, {5, 10, 4}], 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]}]BubbleChart3D[RandomReal[1, {10, 4}], ChartElements -> [image]]BubbleChart3D[RandomReal[1, {10, 4}], ChartElementFunction -> "MarkerBubble3D"]Scope (31)
Data and Wrappers (14)
Items in a dataset are colored the same:
BubbleChart3D[{Table[{i, i, i, 1}, {i, 3}], Table[{i, i, i + 1, 1}, {i, 3}], Table[{i, i, i + 2, 1}, {i, 3}]}]Nonreal data is taken to be missing:
data = ReplacePart[Flatten[Table[{i, 2, j, 1}, {i, 4}, {j, 4}], 1], {3 -> Missing[], 6 -> 1 + I, 15 -> foo}]BubbleChart3D[data, PlotLabels -> Range[16]]BubbleChart3D[{{Quantity[8, "Feet"], Quantity[17, "Feet"], Quantity[3, "Feet"], Quantity[10, "Feet"]}, {Quantity[15, "Feet"], Quantity[19, "Feet"], Quantity[1, "Feet"], Quantity[23, "Feet"]}, {Quantity[2, "Feet"], Quantity[20, "Feet"], Quantity[15, "Feet"], Quantity[15, "Feet"]}, {Quantity[21, "Feet"], Quantity[6, "Feet"], Quantity[3, "Feet"], Quantity[25, "Feet"]}, {Quantity[12, "Feet"], Quantity[24, "Feet"], Quantity[4, "Feet"], Quantity[3, "Feet"]}, {Quantity[1, "Feet"], Quantity[15, "Feet"], Quantity[17, "Feet"], Quantity[5, "Feet"]}}, AxesLabel -> Automatic]BubbleChart3D[{{Quantity[8, "Feet"], Quantity[17, "Feet"], Quantity[3, "Feet"], Quantity[10, "Feet"]}, {Quantity[15, "Feet"], Quantity[19, "Feet"], Quantity[1, "Feet"], Quantity[23, "Feet"]}, {Quantity[2, "Feet"], Quantity[20, "Feet"], Quantity[15, "Feet"], Quantity[15, "Feet"]}, {Quantity[21, "Feet"], Quantity[6, "Feet"], Quantity[3, "Feet"], Quantity[25, "Feet"]}, {Quantity[12, "Feet"], Quantity[24, "Feet"], Quantity[4, "Feet"], Quantity[3, "Feet"]}, {Quantity[1, "Feet"], Quantity[15, "Feet"], Quantity[17, "Feet"], Quantity[5, "Feet"]}}, AxesLabel -> Automatic, TargetUnits -> {"Meters", "Yards", "Feet", "Inches"}]The time stamps in TimeSeries, EventSeries, and TemporalData are ignored:
BubbleChart3D[TimeSeries[{{19, 14, 23, 12}, {17, 14, 23, 21}, {22, 9, 8, 14}, {16, 16, 22, 25}, {24, 24, 13, 22}, {24, 11, 2, 3}}, {"May 24, 1982"}]]The values in associations are taken as bubble values:
BubbleChart3D[<|"a" -> {2, 1, 5, 2}, "b" -> {2, 3, 1, 4}, "c" -> {7, 3, 3, 6}, "d" -> {4, 1, 3, 5}|>]BubbleChart3D[<|"a" -> {2, 1, 5, 2}, "b" -> {2, 3, 1, 4}, "c" -> {7, 3, 3, 6}, "d" -> {4, 1, 3, 5}|>, PlotLabels -> Automatic]BubbleChart3D[<|"a" -> {2, 1, 5, 2}, "b" -> {2, 3, 1, 4}, "c" -> {7, 3, 3, 6}, "d" -> {4, 1, 3, 5}|>, 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:
BubbleChart3D[<|"a" -> <|"x" -> 2, "y" -> 1, "z" -> 5, "u" -> 2|>, "b" -> <|"x" -> 2, "y" -> 3, "z" -> 1, "u" -> 4|>, "c" -> <|"x" -> 7, "y" -> 3, "z" -> 3, "u" -> 6|>, "d" -> <|"x" -> 4, "y" -> 1, "z" -> 3, "u" -> 5|>|>, 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]}, AxesLabel -> Automatic]BubbleChart3D[<|"group1" -> <|"a" -> {2, 1, 5, 2}, "b" -> {2, 3, 1, 4}, "c" -> {7, 3, 3, 6}, "d" -> {4, 1, 3, 5}|>, "group2" -> <|"a" -> {2, 3, 8, 1}, "b" -> {1, 3, 2, 6}, "c" -> {5, 3, 3, 6}, "d" -> {4, 2, 6, 6}|>|>, PlotLegends -> Automatic, PlotStyle -> {Hue[0.08, 1, 1], Hue[0.17, 0.8, 0.5], Hue[0, 1, 0.8], Hue[0.06, 1, 0.8]}]The weights in WeightedData are ignored:
BubbleChart3D[WeightedData[{{6, 17, 16, 1}, {15, 15, 16, 8}, {19, 15, 10, 5}, {13, 11, 4, 8}, {8, 20, 5, 15}, {17, 3, 7, 2}}, {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, 1, 1, 1}, {2, 1, 1, 1}, {3, 1, 1, 1}};
{e1, e2, e3} = {{1, 2, 2, 1}, {2, 2, 2, 1}, {3, 2, 2, 1}};{BubbleChart3D[{{d1, d2, d3}, {e1, Style[e2, RGBColor[0.93, 0.27, 0.27]], e3}}], BubbleChart3D[{{d1, d2, d3}, Style[{e1, e2, e3}, RGBColor[0.93, 0.27, 0.27]]}], BubbleChart3D[Style[{{d1, d2, d3}, {e1, e2, e3}}, RGBColor[0.93, 0.27, 0.27]]]}{d1, d2, d3} = {{1, 1, 1, 1}, {2, 1, 1, 1}, {3, 1, 1, 1}};
{e1, e2, e3} = {{1, 2, 2, 1}, {2, 2, 2, 1}, {3, 2, 2, 1}};{BubbleChart3D[{{d1, d2, d3}, {e1, Style[e2, RGBColor[0.93, 0.27, 0.27]], e3}}, PlotStyle -> GrayLevel[0.62]], BubbleChart3D[{{d1, d2, d3}, Style[{e1, Style[e2, RGBColor[0.93, 0.27, 0.27]], e3}, RGBColor[0.14, 0.8, 0.14]]}, PlotStyle -> GrayLevel[0.62]], BubbleChart3D[Style[{{d1, d2, d3}, Style[{e1, Style[e2, RGBColor[0.93, 0.27, 0.27]], e3}, RGBColor[0.14, 0.8, 0.14]]}, RGBColor[0.4, 0.6, 1]], PlotStyle -> GrayLevel[0.62]]}Override the default tooltips:
BubbleChart3D[{{1, 1, 1, 1}, Tooltip[{2, 2, 2, 2}, "median"], {3, 3, 3, 3}}]Use any object in the tooltip:
BubbleChart3D[Table[Tooltip[{CountryData[c, #]& /@ {"Area", "GovernmentConsumption", "GDP", "Population"}}, CountryData[c, "Flag"]], {c, CountryData["G8"]}], ImageSize -> Medium]Use PopupWindow to provide additional drilldown information:
BubbleChart3D[{{1, 1, 1, 1}, {2, 2, 2, 2}, PopupWindow[{3, 3, 3, 3}, DateListPlot[FinancialData["IBM", "Jan. 1, 2004"]]]}]Button can be used to trigger any action:
BubbleChart3D[{{1, 1, 1, 1}, {2, 2, 2, 2}, Button[{3, 3, 3, 3}, Speak[2]]}]Tabular Data (3)
cars = ResourceData["Sample Tabular Data: Car Models"]Plot horsepower against displacement and weight, with bubbles sized according to the mileage:
BubbleChart3D[cars -> {"displacement", "weight", "horsepower", "mpg"}]Pivot the data to create columns of mileage per region:
pivot = PivotToColumns[cars, "origin" -> "mpg"]Plot the data by region of origin:
BubbleChart3D[pivot -> {{"displacement", "weight", "horsepower", ExtendedKey["mpg", "europe"]}, {"displacement", "weight", "horsepower", ExtendedKey["mpg", "japan"]}, {"displacement", "weight", "horsepower", ExtendedKey["mpg", "usa"]}}, PlotLegends -> {"Europe", "Japan", "USA"}]Plot the values for all the components in TimeSeries or EventSeries:
BubbleChart3D[TimeSeries[TimeEventSeries`TimestampData[Association["UniformlySpacedQ" -> True, "Count" -> 5,
"Endpoints" -> TabularColumn[Association[
"Data" -> {2, {{NumericArray[{20563, -2147483648}, "Integer32"], {},
DataStructure["BitVec ... TabularColumn[Association["Data" -> {{3, 2, 2, 1, 1}, {}, None},
"ElementType" -> "Integer64"]], TabularColumn[Association[
"Data" -> {{1, 2, 1, 5, 3}, {}, None}, "ElementType" -> "Integer64"]]}}]]]],
Association[]]]Plot the values for a component of a TimeSeries or EventSeries:
ts = TimeSeries[TimeEventSeries`TimestampData[Association["UniformlySpacedQ" -> True, "Count" -> 10,
"Endpoints" -> TabularColumn[Association[
"Data" -> {2, {{NumericArray[{20563, -2147483648}, "Integer32"], {},
DataStructure["BitVe ... 4557913726,
54.91958809978361, 63.166118763886644, 49.626260528201, 66.72362173609423,
36.22977790380919, 45.64568338043069, 77.30906172879072}, {}, None},
"ElementType" -> "Real64"]]}}]]]], Association[]];BubbleChart3D[ts -> {"a1", "b1", "c1", "d1"}]Plot values from multiple components:
BubbleChart3D[ts -> {{"a1", "b1", "c1", "d1"}, {"a2", "b2", "c2", "d2"}}]Styling and Appearance (7)
Use an explicit list of styles for the bubbles:
BubbleChart3D[RandomReal[1, {3, 5, 4}], 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:
BubbleChart3D[RandomReal[1, {3, 5, 4}], PlotStyle -> <|"Base" -> Opacity[0.6], "Elements" -> {RGBColor[0.855879, 0.665019, 0.302953], RGBColor[0.780926, 0.753979, 0.604883], RGBColor[0.807065, 0.511589, 0.285222]}|>]Style can be used to override styles:
BubbleChart3D[{{1, 1, 1, 1}, {2, 2, 2, 2}, Style[{3, 3, 3, 3}, RGBColor[0.93, 0.27, 0.27]], {3, 4, 1, 1}}, PlotStyle -> GrayLevel[0.62]]Use any graphic for pictorial bubbles:
BubbleChart3D[{{1, 1, 1, 1}, {2, 2, 2, 2}, {3, 3, 3, 3}}, ChartElements -> Graphics3D[Cylinder[]]]Use built-in programmatically generated bubbles:
ChartElementData["BubbleChart3D"]Table[BubbleChart3D[{{1, 1, 1, 1}, {2, 2, 2, 2}, {3, 3, 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]}], {f, {"PolyhedronBubble3D", "MarkerBubble3D"}}]For detailed settings, use Palettes ▶ ChartElementSchemes:
BubbleChart3D[{{1, 1, 1, 1}, {2, 2, 2, 2}, {3, 3, 3, 3}}, ChartElementFunction -> ChartElementDataFunction["MarkerBubble3D", "Shape" -> "Cylinder", "Marker" -> "Cuboid", "MarkerColor" -> RGBColor[1, 0.75, 0]]]Use a theme in a high contrast color scheme:
BubbleChart3D[RandomReal[1, {3, 5, 4}], PlotTheme -> "Marketing"]Use a theme with simple ticks in a bold color scheme:
BubbleChart3D[RandomReal[1, {3, 5, 4}], PlotTheme -> "Web"]Labeling and Legending (7)
Use Labeled to add a label to a bubble:
BubbleChart3D[{{1, 1, 1, 1}, Labeled[{2, 2, 2, 2}, Framed["label", FrameMargins -> 1, Background -> RGBColor[1, 0.75, 0]], Left], {3, 3, 3, 3}}]Use symbolic positions for label placement:
Table[BubbleChart3D[{{1, 1, 1, 1}, Labeled[{2, 2, 2, 2}, "label", p], {3, 3, 3, 3}}, BubbleSizes -> {0.2, 0.4}, PlotLabel -> p, Ticks -> None], {p, {Bottom, Center, Top}}]Provide categorical labels for the datasets:
BubbleChart3D[{{{1, 1, 1, 1}, {2, 2, 2, 2}}, {{3, 3, 3, 3}, {4, 4, 4, 4}}}, PlotLabels -> <|"Elements" -> {"c1", "c2"}|>]Provide value labels for bubbles by using LabelingFunction:
BubbleChart3D[{{{1, 1, 1, 1}, {2, 2, 2, 2}}, {{3, 3, 3, 3}, {4, 4, 4, 4}}}, PlotRange -> All, LabelingFunction -> Above]Use Placed to control placement and formatting:
labeler[v_, {i_, j_}, {ri_, cj_}] := Placed[{v, ri[[1]], cj[[1]]}, Tooltip, Row[#, ","]&]BubbleChart3D[{{{1, 1, 1, 1}, {2, 2, 2, 2}}, {{3, 3, 3, 3}, {4, 4, 4, 4}}}, PlotLabels -> <|"Groups" -> {"r1", "r2"}, "Elements" -> {"c1", "c2", "c3"}|>, FaceGrids -> None, PlotRange -> All, LabelingFunction -> labeler]Add categorical legend entries for data groups:
BubbleChart3D[RandomReal[1, {2, 3, 4}], PlotLegends -> <|"Groups" -> {"data1", "data2"}|>, PlotStyle -> {RGBColor[0.761959, 0.470832, 0.940597], RGBColor[0.431296, 0.709773, 0.927077]}]Use Legended to add additional legend entries:
BubbleChart3D[{{{1, 1, 1, 1}, Legended[Style[{2, 2, 2, 2}, RGBColor[0.93, 0.27, 0.27]], "extra"]}, {{3, 3, 3, 3}, {4, 4, 4, 4}}}, PlotStyle -> {RGBColor[0.761959, 0.470832, 0.940597], RGBColor[0.431296, 0.709773, 0.927077]}, PlotLegends -> {"aaa", "bbb"}]Use Placed to affect the positioning of legends:
Table[BubbleChart3D[{{{1, 1, 1, 1}, {2, 2, 2, 2}}, {{3, 3, 3, 3}, {4, 4, 4, 4}}}, PlotLegends -> Placed[{"data1", "data2"}, p], PlotStyle -> {RGBColor[0.761959, 0.470832, 0.940597], RGBColor[0.431296, 0.709773, 0.927077]}], {p, {Below, Above}}]Options (87)
Axes (3)
By default, axes are drawn for BubbleChart3D:
BubbleChart3D[IconizedObject[«data»]]Use AxesFalse to turn off axes:
BubbleChart3D[IconizedObject[«data»], Axes -> False]Turn each axis on individually:
{BubbleChart3D[IconizedObject[«data»], Axes -> {True, False, False}], BubbleChart3D[IconizedObject[«data»], Axes -> {False, True, False}], BubbleChart3D[IconizedObject[«data»], Axes -> {False, False, True}]}AxesOrigin (2)
AxesStyle (4)
Change the style for the axes:
BubbleChart3D[IconizedObject[«data»], AxesStyle -> RGBColor[0.93, 0.27, 0.27]]Specify the style of each axis:
BubbleChart3D[IconizedObject[«data»], AxesStyle -> {{Thick, RGBColor[0.67, 0.54, 0.42]}, {Thick, RGBColor[0.4, 0.6, 1]}, {Thick, RGBColor[0.14, 0.8, 0.14]}}]Use different styles for the ticks and the axes:
BubbleChart3D[IconizedObject[«data»], AxesStyle -> RGBColor[0.14, 0.8, 0.14], TicksStyle -> RGBColor[0.4, 0.6, 1]]Use different styles for the labels and the axes:
BubbleChart3D[IconizedObject[«data»], AxesStyle -> RGBColor[0.14, 0.8, 0.14], LabelStyle -> RGBColor[0.4, 0.6, 1]]AxesLabel (4)
No axes labels are drawn by default:
BubbleChart3D[IconizedObject[«data»], Axes -> True]BubbleChart3D[IconizedObject[«data»], Axes -> True, AxesLabel -> "Z-axis"]BubbleChart3D[IconizedObject[«data»], Axes -> True, AxesLabel -> {"X", "Y", "Z"}]BubbleChart3D[QuantityArray[IconizedObject[«data»], "Meters"]
, Axes -> True, AxesLabel -> Automatic]BubbleScale (2)
By default, the volume of a bubble is proportional to the u value:
BubbleChart3D[RandomReal[1, {5, 3, 4}]]Compare the volume scale to the diameter scale:
data = Table[{i, i, i, i}, {i, 10}];Table[BubbleChart3D[data, BubbleScale -> scale], {scale, {"Volume", "Diameter"}}]BubbleSizes (1)
ChartElementFunction (5)
Get a list of built-in settings for ChartElementFunction:
ChartElementData["BubbleChart3D"]For detailed settings, use Palettes ▶ ChartElementSchemes:
data = {{1, 0, 1, 1}, {0, 1, 2, 2}, {2, 2, 3, 3}};Table[BubbleChart3D[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, {"Bubble3D", "MarkerBubble3D"}}]Table[BubbleChart3D[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, {"ProfileCube", "PolyhedronBubble3D"}}]Write a custom ChartElementFunction:
f[{{xmin_, xmax_}, {ymin_, ymax_}, {zmin_, zmax_}}, v_, meta_] :=
{Cuboid[{xmin, ymin, zmin}, {xmax, ymax, zmax}]}BubbleChart3D[{{1, 0, 1, 1}, {0, 1, 2, 2}, {2, 2, 3, 3}}, ChartElementFunction -> f]Use metadata passed on from the input, in this case, charting the data:
DataDrilldownBubble[box_, v_, {meta_}] :=
PopupWindow[ChartElementData["Cylinder"][box, v, {}], PieChart[meta]]DataDrilldownBubble[box_, v_, ___] :=
ChartElementData["Cube"][box, v]BubbleChart3D[{{1, 0, 1, 1} -> Range[5], {0, 1, 2, 2}, {2, 2, 3, 3} -> RandomReal[1, 10]}, ChartElementFunction -> DataDrilldownBubble]The built-in element function may have options; use Palettes ▶ ChartElementSchemes to set them:
ChartElementData["MarkerBubble3D", "Options"]Table[BubbleChart3D[{{1, 0, 1, 1}, {0, 1, 2, 2}, {2, 2, 3, 3}}, ChartElementFunction -> ChartElementDataFunction["MarkerBubble3D", "Shape" -> s[[1]], "Marker" -> s[[2]], "MarkerColor" -> RGBColor[1, 0.75, 0]]], {s, {{"Sphere", "Cylinder"}, {"Cuboid", "Sphere"}}}]ChartElements (6)
Create a pictorial chart based on any Graphics3D object:
BubbleChart3D[{{1, 2, 3, 4}, {3, 2, 1, 3}, {3, 1, 1, 2}}, ChartElements -> Graphics3D[Cone[]]]Use a different graphic for each row of data:
data = RandomReal[1, {3, 4}];{data1, data2, data3} = {data, data + 1, data + 2};BubbleChart3D[{data1, data2, data3}, ChartElements -> {[image], [image], [image]}]BubbleChart3D[{data1, data2, data3}, ChartElements -> {{[image], [image], [image]}, None}]BubbleChart3D[Table[{i, i, i, 1}, {i, 5}], ChartElements -> {[image], [image]}]Styles are inherited from styles set through PlotStyle etc.:
BubbleChart3D[RandomReal[1, {3, 5, 4}], ChartElements -> [image], PlotStyle -> {RGBColor[0.761959, 0.470832, 0.940597], RGBColor[0.9584254999999999, 0.877884, 0.5906629999999999], RGBColor[0.431296, 0.709773, 0.927077]}]Override individual styles by using Style:
BubbleChart3D[{{{1, 2, 3, 4}, Style[{3, 2, 1, 3}, RGBColor[0.93, 0.27, 0.27]], {3, 1, 1, 2}}}, BubbleSizes -> {0.2, 0.4}, ChartElements -> [image], PlotStyle -> GrayLevel[0.62]]Explicit styles set in the graphic will override other style settings:
BubbleChart3D[{{{1, 2, 3, 4}, {3, 2, 1, 3}, {3, 1, 1, 2}}}, BubbleSizes -> {0.2, 0.4}, ChartElements -> [image], PlotStyle -> GrayLevel[0.62]]ColorFunction (4)
BubbleChart3D[RandomInteger[10, {2, 10, 4}], ColorFunction -> Function[{x, y, z, r}, Lighter[RGBColor[0.14, 0.8, 0.14], x]]]Use ColorFunctionScaling->False to get unscaled height values:
BubbleChart3D[{{1, 0, 1, 1}, {0, 1, 2, 2}, {2, 2, 3, 3}}, ColorFunction -> Function[{x, y, z, r}, Switch[{x, y, z, r}, {1, 0, 1, 1}, RGBColor[1, 0.75, 0], {0, 1, 2, 2}, RGBColor[0.98, 0.56, 0.17], {2, 2, 3, 3}, RGBColor[0.93, 0.27, 0.27]]], ColorFunctionScaling -> False]ColorFunction may override styles in PlotStyle:
BubbleChart3D[{{1, 0, 1, 1}, {0, 1, 2, 2}, {2, 2, 3, 3}}, PlotStyle -> RGBColor[0.14, 0.8, 0.14], ColorFunction -> "SolarColors"]Use ColorFunction to combine different style effects:
BubbleChart3D[{{1, 0, 1, 1}, {0, 1, 2, 2}, {2, 2, 3, 3}}, PlotStyle -> <|"Elements" -> {Opacity[0.2], Specularity[1, 20], Glow[RGBColor[0.93, 0.27, 0.27]]}|>, ColorFunction -> (RGBColor[0.4, 0.6, 1]&)]ColorFunctionScaling (2)
By default, scaled height values are used:
BubbleChart3D[{{1, 1, 1, 1}, {2, 2, 2, 2}, {3, 3, 3, 3}}, ColorFunction -> Function[{x, y, z, r}, GrayLevel[r]]]Use ColorFunctionScaling->False to get unscaled height values:
BubbleChart3D[{{1, 2, 3, 4}, {3, 2, 1, 3}, {3, 1, 1, 2}}, ColorFunction -> Function[{x, y, z, r}, Switch[{x, y, z, r}, {1, 2, 3, 4}, RGBColor[1, 0.75, 0], {3, 2, 1, 3}, RGBColor[0.98, 0.56, 0.17], {3, 1, 1, 2}, RGBColor[0.93, 0.27, 0.27]]], ColorFunctionScaling -> False]ImageSize (7)
Use named sizes such as Tiny, Small, Medium and Large:
{BubbleChart3D[IconizedObject[«data»], ImageSize -> Tiny], BubbleChart3D[IconizedObject[«data»], ImageSize -> Small]}Specify the width of the plot:
{BubbleChart3D[IconizedObject[«data»], ImageSize -> 150], BubbleChart3D[IconizedObject[«data»], AspectRatio -> 1.5, ImageSize -> 150]}Specify the height of the plot:
{BubbleChart3D[IconizedObject[«data»], ImageSize -> {Automatic, 150}], BubbleChart3D[IconizedObject[«data»], AspectRatio -> 2, ImageSize -> {Automatic, 150}]}Allow the width and height to be up to a certain size:
{BubbleChart3D[IconizedObject[«data»], ImageSize -> UpTo[200]], BubbleChart3D[IconizedObject[«data»], AspectRatio -> 2, ImageSize -> UpTo[200]]}Specify the width and height for a graphic, padding with space if necessary:
BubbleChart3D[IconizedObject[«data»], ImageSize -> {200, 200}, Background -> RGBColor[0.4, 0.6, 1]]Setting AspectRatioFull will fill the available space:
BubbleChart3D[IconizedObject[«data»], AspectRatio -> Full, ImageSize -> {200, 200}, Background -> RGBColor[0.4, 0.6, 1]]Use maximum sizes for the width and height:
{BubbleChart3D[IconizedObject[«data»], ImageSize -> {UpTo[200], UpTo[150]}], BubbleChart3D[IconizedObject[«data»], AspectRatio -> 2, ImageSize -> {UpTo[200], UpTo[150]}]}Use ImageSizeFull to fill the available space in an object:
Framed[Pane[BubbleChart3D[IconizedObject[«data»], ImageSize -> Full, Background -> RGBColor[0.4, 0.6, 1]], {200, 100}]]Specify the image size as a fraction of the available space:
Framed[Pane[BubbleChart3D[IconizedObject[«data»], AspectRatio -> Full, ImageSize -> {Scaled[0.5], Scaled[0.5]}, Background -> RGBColor[0.4, 0.6, 1]], {200, 200}]]LabelingFunction (7)
Use automatic labeling by values through Tooltip and StatusArea:
BubbleChart3D[{{1, 0, 1, 1}, {0, 1, 2, 2}, {2, 2, 3, 3}}, LabelingFunction -> Automatic]BubbleChart3D[{{1, 0, 1, 1}, {0, 1, 2, 2}, {2, 2, 3, 3}}, LabelingFunction -> None]Use Placed to control label placement:
Table[BubbleChart3D[{{1, 0, 1, 1}, {0, 1, 2, 2}, {2, 2, 3, 3}}, LabelingFunction -> p, PlotLabel -> p, Ticks -> None], {p, {Bottom, Center, Top}}]Table[BubbleChart3D[{{1, 0, 1, 1}, {0, 1, 2, 2}, {2, 2, 3, 3}}, LabelingFunction -> p, PlotLabel -> p, Ticks -> None], {p, {Left, Right}}]Symbolic positions outside the bubble:
Table[BubbleChart3D[{{1, 0, 1, 1}, {0, 1, 2, 2}, {2, 2, 3, 3}}, LabelingFunction -> p, PlotLabel -> p, Ticks -> None], {p, {Below, Above}}]Table[BubbleChart3D[{{1, 0, 1, 1}, {0, 1, 2, 2}, {2, 2, 3, 3}}, PlotRange -> All, LabelingFunction -> p, PlotLabel -> p, Ticks -> None], {p, {Before, After}}]Coordinate-based placement relative to a given bubble:
Table[BubbleChart3D[{{1, 0, 1, 1}, {0, 1, 2, 2}, {2, 2, 3, 3}}, PlotRange -> All, LabelingFunction -> p, PlotLabel -> p, Ticks -> None], {p, {{0, 0, 0}, {0.5, 0.5, 0.5}, {1, 1, 1}}}]Control the formatting of labels:
BubbleChart3D[{{1, 0, 1, 1}, {0, 1, 2, 2}, {2, 2, 3, 3}}, PlotRange -> All, LabelingFunction -> (Placed[MatrixForm[#1], Tooltip]&)]Use the given chart labels as arguments to the labeling function:
bubbleLabel[v : {x_, y_, z_, w_}, level_, {r_, c_}] := Placed[Grid[{{Row[{r[[1]], c[[1]], "Fund"}, " "], SpanFromLeft}, {"Age", x}, {"Return %", y}, {"Expense %", z}, {"Market Cap", w}}, Frame -> All, Alignment -> Left], Tooltip]data = {{{1, 11, 1.5, 300}, {2, 50, 0.12, 200}, {3, 20, 1.2, 300}}, {{6, 20, 1.5, 300}, {2, 8, 1.1, 600}, {6, 16, 0.5, 500}}};BubbleChart3D[data, PlotLabels -> <|"Groups" -> {"Growth", "Value"}, "Elements" -> Placed[{"Small-Cap", "Mid-Cap", "Large-Cap"}, None]|>, LabelingFunction -> bubbleLabel]PerformanceGoal (1)
Generate a bubble chart with interactive highlighting:
data = RandomReal[1, {3, 5, 4}];BubbleChart3D[data, PerformanceGoal -> "Quality"]Emphasize performance by disabling interactive behaviors:
BubbleChart3D[data, PerformanceGoal -> "Speed"]Typically, less memory is required for non-interactive charts:
Table[ByteCount@BubbleChart3D[data, PerformanceGoal -> p], {p, {"Quality", "Speed"}}]PlotInteractivity (4)
Charts with a moderate number of bubbles automatically have tooltips and mouseover effects:
BubbleChart3D[{{1, 1, 1, 1}, {2, 2, 2, 2}, {3, 3, 3, 3}}]Turn off all the interactive elements:
BubbleChart3D[{{1, 1, 1, 1}, {2, 2, 2, 2}, {3, 3, 3, 3}}, PlotInteractivity -> False]Interactive elements provided as part of the input are disabled:
BubbleChart3D[{{1, 1, 1, 1}, {2, 2, 2, 2}, Tooltip[{3, 3, 3, 3}, "hello"]}, PlotInteractivity -> False]Allow provided interactive elements and disable automatic ones:
BubbleChart3D[{{1, 1, 1, 1}, {2, 2, 2, 2}, Tooltip[{3, 3, 3, 3}, "hello"]}, PlotInteractivity -> <|"User" -> True, "System" -> False|>]PlotLabels (8)
By default, labels are placed radially centered:
BubbleChart3D[RandomReal[1, {4, 4}], PlotLabels -> {"a", "b", "c", "d"}]By default, labels are associated with data elements or groups automatically:
{BubbleChart3D[RandomReal[1, {3, 4}], PlotLabels -> {"c1", "c2", "c3"}],
BubbleChart3D[RandomReal[1, {3, 3, 4}], PlotLabels -> {"r1", "r2", "r3"}]}Specify labels to data elements specifically:
BubbleChart3D[RandomReal[1, {2, 3, 4}], PlotLabels -> <|"Elements" -> {"c1", "c2", "c3"}|>]Label both groups and elements:
BubbleChart3D[RandomReal[1, {2, 3, 4}], PlotLabels -> <|"Groups" -> {"r1", "r2"}, "Elements" -> {"c1", "c2", "c3"}|>]Labeled wrappers in data will place additional labels:
data = {{1, 0, 1, 1}, Labeled[{0, 1, 1, 2}, "label", Below], {2, 2, 2, 3}};BubbleChart3D[data, PlotLabels -> {"a", "b", "c"}]Use Placed to affect placements:
data = {{1, 1, 0, 1}, {1, 0, 1, 2}, {0, 2, 2, 3}};BubbleChart3D[data, PlotLabels -> <|"Groups" -> Placed[{"r1", "r2"}, Center], "Elements" -> Placed[{"c1", "c2", "c3"}, Below]|>]Symbolic positions outside the bubble:
Table[BubbleChart3D[{{1, 1, 0, 1}, {1, 0, 1, 2}, {2, 2, 1, 3}}, PlotLabels -> Placed[{"a", "b", "c"}, p], PlotLabel -> p, Ticks -> None], {p, {Below, Above}}]Table[BubbleChart3D[{{1, 1, 0, 1}, {1, 0, 1, 2}, {2, 2, 1, 3}}, PlotLabels -> Placed[{"a", "b", "c"}, p], PlotLabel -> p, Ticks -> None], {p, {Before, After}}]Coordinate-based placement relative to a bubble:
Table[BubbleChart3D[{{1, 1, 0, 1}, {1, 0, 1, 2}, {2, 2, 1, 3}}, PlotLabels -> Placed[{"aa", "bb", "cc"}, p], PlotLabel -> p], {p, {{0, 0, 0}, {1 / 2, 1 / 2, 1 / 2}, {1, 1, 1}}}]Place all labels at the upper-right corner and vary the coordinates within the label:
Table[BubbleChart3D[{{1, 1, 0, 1}, {1, 0, 1, 2}, {2, 2, 1, 3}}, PlotLabels -> Placed[Framed /@ {"aa", "bb", "cc"}, {{1, 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:
BubbleChart3D[{{1, 1, 0, 1}, {1, 0, 1, 2}, {2, 2, 1, 3}}, BubbleSizes -> {0.3, 0.4}, PlotLabels -> Placed[{"aaa", "bbb", "ccc"}, Center, Rotate[#, 45Degree]&]]BubbleChart3D[{{1, 1, 0, 1}, {1, 0, 1, 2}, {2, 2, 1, 3}}, BubbleSizes -> {0.3, 0.4}, PlotLabels -> Placed[{"aaa", "bbb", "ccc"}, Center, Panel[#, FrameMargins -> 0]&]]BubbleChart3D[{{1, 1, 0, 1}, {1, 0, 1, 2}, {2, 2, 1, 3}}, PlotLabels -> Placed[{"aaa", "bbb", "ccc"}, Center, Hyperlink[#, "http://www.wolfram.com"]&]]BubbleChart3D[{{1, 1, 0, 1}, {1, 0, 1, 2}, {2, 2, 1, 3}}, PlotLabels -> Placed[{"aaa", "bbb", "ccc"}, Center, Rotate[#, Pi / 4]&]]Change the placements of both the group and element labels:
BubbleChart3D[RandomReal[1, {2, 3, 4}], PlotLabels -> <|"Groups" -> Placed[{"r1", "r2"}, Above], "Elements" -> Placed[{"c1", "c2", "c3"}, Center]|>]Place multiple labels using Placed:
BubbleChart3D[{{1, 1, 0, 1}, {1, 0, 1, 2}, {2, 2, 1, 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, 0, 3}, {0, 1, 0, 2}, {1, 2, 0, 3}}, {{5, 4, 1, 5}, {4, 5, 1, 6}, {5, 6, 1, 5}}};BubbleChart3D[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]}|>]BubbleChart3D[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:
data = {{{1, 0, 0, 3}, Legended[Style[{0, 1, 0, 2}, RGBColor[0.93, 0.27, 0.27]], "aa"], {1, 2, 0, 3}}, {{5, 4, 1, 1}, {4, 5, 1, 6}, {5, 6, 1, 5}}};BubbleChart3D[data, 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:
data = {{1, 0, 0, 3}, Legended[{0, 1, 0, 2}, "aa"], {1, 2, 0, 3}, {5, 4, 1, 5}, Legended[{4, 5, 1, 6}, "bb"], {2, 6, 1, 5}};BubbleChart3D[data, PlotStyle -> <|"Elements" -> {RGBColor[0.761959, 0.470832, 0.940597], RGBColor[0.8750956, 0.6580038, 0.746929], RGBColor[0.9440982, 0.7955892, 0.5942686], RGBColor[0.9537862, 0.937389, 0.6180996], RGBColor[0.7952328000000001, 0.8988539999999999, 0.8302508], RGBColor[0.431296, 0.709773, 0.927077]}|>]Generate a legend for data groups:
data = {{{1, 0, 0, 3}, {0, 1, 0, 2}, {1, 2, 0, 3}}, {{5, 4, 1, 5}, {4, 5, 1, 6}, {2, 6, 1, 5}}};BubbleChart3D[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, 0, 3}, {0, 1, 0, 2}, {1, 2, 0, 3}}, {{5, 4, 1, 5}, {4, 5, 1, 6}, {2, 6, 1, 5}}};BubbleChart3D[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, 0, 3}, {0, 1, 0, 2}, {1, 2, 0, 3}}, {{5, 4, 1, 5}, {4, 5, 1, 6}, {2, 6, 1, 5}}};BubbleChart3D[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" -> {Opacity[0.2], Opacity[0.9]}|>]Use Placed to control the placement of legends:
data = {{{1, 0, 0, 3}, {0, 1, 0, 2}, {1, 2, 0, 3}}, {{5, 4, 1, 5}, {4, 5, 1, 6}, {2, 6, 1, 5}}};Table[BubbleChart3D[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)
BubbleChart3D[{{1, 2, 3, 10}, {3, 2, 1, 7}, {3, 1, 1, 3}, {1, 1, 1, 1}}, 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]}]BubbleChart3D[{{1, 2, 3, 10}, {3, 2, 1, 7}, {3, 1, 1, 3}, {1, 1, 1, 1}}, PlotStyle -> Opacity[0.4]]BubbleChart3D[RandomReal[1, {3, 5, 4}], PlotStyle -> {RGBColor[0.93, 0.27, 0.27], RGBColor[0.14, 0.8, 0.14], RGBColor[0.4, 0.6, 1]}]BubbleChart3D[{{1, 2, 3, 10}, {3, 2, 1, 7}, {3, 1, 1, 3}}, PlotStyle -> <|"Elements" -> {RGBColor[0.93, 0.27, 0.27], RGBColor[0.14, 0.8, 0.14]}|>]data = {RandomReal[{1, 2}, {3, 4}], RandomReal[{2, 3}, {3, 4}]};BubbleChart3D[data, PlotStyle -> <|"Elements" -> {RGBColor[0.93, 0.27, 0.27], RGBColor[0.14, 0.8, 0.14], RGBColor[0.4, 0.6, 1]}|>]BubbleChart3D[data, PlotStyle -> <|"Groups" -> {RGBColor[0.93, 0.27, 0.27], RGBColor[0.14, 0.8, 0.14]}|>]BubbleChart3D[data, PlotStyle -> <|"Base" -> {Specularity[White, 100]}|>]Style both elements and groups of data:
BubbleChart3D[data, PlotStyle -> <|"Groups" -> {Opacity[.2], Opacity[.9]}, "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 = {RandomReal[{1, 2}, {3, 4}], RandomReal[{2, 3}, {3, 4}]};BubbleChart3D[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:
BubbleChart3D[{{1, 2, 3, 4}, Style[{3, 2, 1, 3}, Opacity[0.3]], {3, 1, 1, 2}}, 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:
BubbleChart3D[{{1, 2, 3, 4}, Style[{3, 2, 1, 3}, RGBColor[1, 0.75, 0]], {3, 1, 1, 2}, {1, 1, 1, 1}}, BubbleSizes -> {0.1, 0.5}, PlotStyle -> GrayLevel[0.62]]Styles from ColorFunction and PlotStyle may be combined:
BubbleChart3D[RandomReal[1, {3, 4}], PlotStyle -> Opacity /@ {0.1, 0.4, 0.7}, ColorFunction -> (Blend[{RGBColor[0.4, 0.6, 1], RGBColor[0.93, 0.27, 0.27]}, #]&)]ColorFunction may override settings for PlotStyle:
BubbleChart3D[RandomReal[1, {3, 4}], 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:
BubbleChart3D[{{{1, 2, 3, 4}, {3, 2, 1, 3}, {3, 1, 1, 2}}}, BubbleSizes -> {0.2, 0.4}, ChartElements -> [image], PlotStyle -> GrayLevel[0.62]]PlotTheme (2)
Ticks (6)
Ticks are placed automatically on each axis:
BubbleChart3D[IconizedObject[«data»]]Use TicksNone to not draw any tick marks:
BubbleChart3D[IconizedObject[«data»], Ticks -> None]Place tick marks at the specified positions:
BubbleChart3D[IconizedObject[«data»], Ticks -> {{.5, 1, 1.5}, {.5, 1, 1.5}, {.5, 1, 1.5}}]Draw tick marks at the specified positions with specific labels:
BubbleChart3D[IconizedObject[«data»], Ticks -> {{{.5, a}, {1, b}, {1.5, c}}, {{.5, a}, {1, b}, {1.5, c}}, {{.5, a}, {1, b}, {1.5, c}}}]Specify tick marks with scaled lengths:
BubbleChart3D[IconizedObject[«data»], Ticks -> {{{.5, a, .22}, {1, b, .11}, {1.5, c, .2}}, {{.5, a, .22}, {1, b, .13}, {1.5, c, .08}}, {{.5, a, .1}, {1, b, .1}, {1.5, c, .1}}}]Customize each tick with position, length, labeling and styling:
BubbleChart3D[IconizedObject[«data»], Ticks -> {{{.5, a, .22, Directive[RGBColor[0.4, 0.6, 1]]}, {1, b, .11, Directive[RGBColor[0.4, 0.6, 1], Thick]}, {1.5, c, .2, Directive[RGBColor[0.4, 0.6, 1], Thick, Dashed]}}, {{.5, a, .22, Directive[RGBColor[0.93, 0.27, 0.27]]}, {1, b, .13, Directive[RGBColor[0.93, 0.27, 0.27], Thick]}, {1.5, c, .08, Directive[RGBColor[0.93, 0.27, 0.27], Thick, Dashed]}}, {{.5, a, .1, Directive[RGBColor[0.14, 0.8, 0.14]]}, {1, b, .1, Directive[RGBColor[0.14, 0.8, 0.14], Thick]}, {1.5, c, .1, Directive[RGBColor[0.14, 0.8, 0.14], Thick]}}}]TicksStyle (2)
Specify an overall style for ticks, including for labels:
BubbleChart3D[IconizedObject[«data»], TicksStyle -> Directive[Bold, RGBColor[0.93, 0.27, 0.27]]]Specify tick style for each of the axes:
BubbleChart3D[IconizedObject[«data»], TicksStyle -> {Directive[RGBColor[0.14, 0.8, 0.14], Bold], Directive[Bold, RGBColor[0.93, 0.27, 0.27]], Directive[Bold, RGBColor[0.4, 0.6, 1]]}]Applications (2)
Click the bubbles to hear the name of the country, its GDP per capita, and its population:
countries = CountryData["G15"];
properties = {"GDPPerCapita", "PovertyFraction", "MilitaryExpenditureFraction", "Population"};data = Table[With[{v = cp}, Button[v[[2 ;; 5]], Speak[StringJoin[ToString /@ {v[[1]], ", GDP per capita: $", Round[v[[2]]], ", Poverty Fraction: ", v[[3]], ", Military Expenditure Fraction: ", v[[4]], ", Population: ", Round[v[[5]]]}]]]], {cp, Table[Prepend[Table[CountryData[c, p], {p, properties}], c], {c, countries}]}];BubbleChart3D[data, PlotStyle -> ColorData["Rainbow"] /@ Range[0, 1, 1 / Length[data]]]Display GDP per capita, poverty, and military expenditures for a list of countries:
countries = {"US", "France", "China", "India", "Iran", "Afghanistan", "Cameroon", "Brazil", "Russia", "Canada"};
properties = {"PovertyFraction", "GDPPerCapita", "MilitaryExpenditureFraction", "Population"};
data = Table[CountryData[c, p], {c, countries}, {p, properties}];Define a labeling function for the tooltips:
labeler[v_, {r_, c_}, {rowLabels_, colLabels_}] := Placed[Grid[Prepend[Table[{properties[[i]], v[[i]]}, {i, Length[v]}], {Style[countries[[c]], Bold, 12], }], Alignment -> Left], Tooltip]Mouse over the bubbles to view a country's data:
BubbleChart3D[data, ViewPoint -> {2.19, -1.93, 1.72}, ImageSize -> 400, PlotLegends -> countries, AxesLabel -> properties[[1 ;; 3]], LabelingFunction -> labeler, 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.12941176470588237, 0.5176470588235295, 0.6313725490196078], RGBColor[0.09019607843137255, 0.33725490196078434, 0.49411764705882355], RGBColor[0.7058823529411765, 0.49411764705882355, 0.5450980392156862], RGBColor[0.5333333333333333, 0.23529411764705882, 0.3058823529411765], RGBColor[0.8941176470588236, 0.7098039215686275, 0.7490196078431373]}]Properties & Relations (1)
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}}]}Neat Examples (1)
ColorData[12] /@ Range[10]BubbleChart3D[RandomReal[10, {75, 4}], Axes -> None, Boxed -> False, FaceGrids -> None, PerformanceGoal -> "Speed", ChartElementFunction -> "FadingCube", PlotStyle -> <|"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]}, "Base" -> EdgeForm[None]|>, BoxRatios -> {1.2, 1, 1}]See Also
Related Guides
History
Introduced in 2008 (7.0) | Updated in 2010 (8.0) ▪ 2012 (9.0) ▪ 2014 (10.0) ▪ 2025 (14.2) ▪ 2025 (14.3) ▪ 2026 (15.0)
Text
Wolfram Research (2008), BubbleChart3D, Wolfram Language function, https://reference.wolfram.com/language/ref/BubbleChart3D.html (updated 2026).
CMS
Wolfram Language. 2008. "BubbleChart3D." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2026. https://reference.wolfram.com/language/ref/BubbleChart3D.html.
APA
Wolfram Language. (2008). BubbleChart3D. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BubbleChart3D.html
BibTeX
@misc{reference.wolfram_2026_bubblechart3d, author="Wolfram Research", title="{BubbleChart3D}", year="2026", howpublished="\url{https://reference.wolfram.com/language/ref/BubbleChart3D.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_bubblechart3d, organization={Wolfram Research}, title={BubbleChart3D}, year={2026}, url={https://reference.wolfram.com/language/ref/BubbleChart3D.html}, note=[Accessed: 12-June-2026]}