In attempting to answer this question from @Cam on BubbleCharts with elliptical bubbles, I suggested using separate ChartElements which themselves could be ellipses. My idea was to define them as regular graphics objects and use them like this:

datatoplot = {{1, 2, 0.5, 0.7}, {10, 5, 10, 0.2}};
ellipse[v_] := Disk[{v[[1]], v[[2]]}, {v[[3]]/10, v[[4]]/10}];
ce = Graphics[Style[ellipse[#], Blue]] & /@ datatoplot;
Show[BubbleChart[{datatoplot[[;; , ;; 3]][[#]]},ChartElements->ce[[#]]]&/@{1,2}, PlotRange -> All]

However, while the objects I've called ce above are indeed ellipses, they get rescaled when they are used as ChartElements and their ellipsicity is undone (or at least altered).

It seems in the help section for ChartElements that the format to define the width and height is to give


but this gives an error message when I try and implement it naively (with an arbitrary scaling of {0.3,0.6}). Trying it by hand:

Show[BubbleChart[{datatoplot[[;; , ;; 3]][[#]]},ChartElements -> {ce[[#]], {0.3, 0.6}}]&/@{1,2}, PlotRange -> All]

gives me the error shown here:

error message

Does anyone know how to correctly implement the scaling for ChartElements? Is it that the elements should somehow be different from regular Graphics objects?


1 Answer 1


I'm guessing the error is because BubbleChart doesn't let you specify the width and height of chart elements because it determines them itself. You can do it with ChartElementFunction though.

data = {{1, 2, 0.5, 0.7}, {10, 5, 10, 0.2}};
cef[___] := Disk[{#1, #2}, {#3, #4}] & @@ data[[++i]]
BubbleChart[i = 0; data[[All, ;; 3]], ChartElementFunction -> cef]

bubble chart with ellipses

  • $\begingroup$ Yes, I think you are probably right on this. The whole point of the BubbleChart is that it specifies the size by the third elements in the list of data that you give it. I hadn't thought of that. I'll see if anyone else answers, but this sounds like a fair response. $\endgroup$ May 1, 2013 at 6:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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