0
$\begingroup$

I have been interested in using bubbles as symbols for a ListPlot. I am aware of the power of Mathematica. I think that is possible. Is there anyone who has an experience with it? I mean bubbles in the below shapes (albeit in smaller size):

enter image description here

$\endgroup$
4
  • $\begingroup$ For similar queries, you can use: Names["*Bubble*"] and then explore each entry using the docs by pressing F1. $\endgroup$
    – Syed
    Commented Feb 25, 2023 at 17:05
  • $\begingroup$ Or search the documentation with bubble $\endgroup$
    – Bob Hanlon
    Commented Feb 25, 2023 at 17:07
  • $\begingroup$ I had seen documents for Bubbles. But the results as the below answer is not desired. The symbols are solid sphere not bubbles I think. I wish to have bubbles. $\endgroup$
    – monfneg
    Commented Feb 25, 2023 at 17:14
  • $\begingroup$ You can use any type of Graphics or even Graphics3D for your plot markers. Please see the examples in the documentation for PlotMarkers. $\endgroup$
    – Domen
    Commented Feb 25, 2023 at 17:41

1 Answer 1

6
$\begingroup$
$Version

(* "13.2.1 for Mac OS X x86 (64-bit) (January 27, 2023)" *)

Clear["Global`*"]

SeedRandom[1234];

data = RandomReal[1, {10, 3}];
    

With BubbleChart the bubbles are not spheres, although they can be given the appearance of spheres. Note that the Head is Graphics (i.e., 2D) so there are no spheres (3D)

Head@BubbleChart[data]

(* Graphics *)

There are several built-in choices for ChartElementFunction

ChartElementData["BubbleChart"]

(* {"Bubble", "FadingBubble", "GradientBubble", "MarkerBubble", "NoiseBubble", \
"OscillatingBubble", "PolyhedronBubble", "SphereBubble", "SquareWaveBubble", \
"TriangleWaveBubble"} *)

Comparing,

BubbleChart[data,
   ChartElementFunction -> #,
   PlotLabel -> #] & /@
 ChartElementData["BubbleChart"]

enter image description here

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.