# Using circles with various radii and colors in ListPlot

I have a big list that I'd want to plot using 'Listplot.' I replaced it with

list = Table[{x, -10 + Abs@(x^2)}, {x, -3, 3, 0.3}]


I wish to have a plot as the below picture

in which the symbols have been replaced by empty circles with a gradient color change. Furthermore, the radius of these circles ranges from little to huge. It is preferable to make these radii a factor of their value. In paint I could present what I mean. I searched a lot on this site but did not find what I was looking for. can anyone reach me to the goal!? Because I must use ListPlot and not Plot I generated a list at the first.

### BubbleChart

list2 = Join[list, List /@ Normalize[Abs @ list[[All, 2]], Total], 2];

bubblechart = BubbleChart[list2,
ColorFunction -> "Rainbow",
ChartStyle -> FaceForm[Opacity[.5]],
BubbleSizes -> {.01, .05}]


If desired you can post-process to replace disks with circles and points:

bubblechart /. d_Disk :> {Circle @@ d, Point @ d[[1]]}


### PointValuePlot

list3 = list -> Transpose[{#, #} &@Normalize[Abs@list[[All, 2]], Total]];

PointValuePlot[list3, {1 -> "Color", 2 -> "Size"},
ColorFunction -> "TemperatureMap", BubbleSizes -> {.01, .05}]


• It is very good but can they be empty and just the line around the circle be colored? May 3, 2022 at 10:26
• I am trying to understand what did you do!!! I get stuck to generate list2 and list3. I cannot understand their roles!!! May 3, 2022 at 10:31
• @InzoBabaria, for BubbleChart input data should be a list of triples {{x1,y1,z1}, {x2,y2,z2}...} where the third coordinate indicates the bubble size (which can also be used for controlling color when the option ColorFunction is used) So used the the normalized absolute values of the second column of your list to generate z values and append them to the x-y coordinates. For PointValueChart I used the input data in the form list of x-y coordinates -> lists of point-values with each point-value being a pair {v1, v2} and used v1 to code color and v2 to code bubble size.
– kglr
May 3, 2022 at 10:38
• Your explanations are very useful. May 3, 2022 at 11:24
• The last changes gets it improved May 4, 2022 at 10:28
list = Table[{x, -10 + Abs@(x^2)}, {x, -3, 3, 0.3}]
cols1 = ColorData["Rainbow"][1 - #] & /@ Subdivide[1, 10]
cols2 = ColorData["Rainbow"][#] & /@ Subdivide[1, 9]
cols = Join[cols1, cols2]
Length /@ {list, cols}


You can choose your own color scheme. The lists called list and cols should be the same length.

ListPlot[list
, AspectRatio -> Automatic
, Epilog -> {Transpose[{cols, Circle[#, Abs@#[[2]]/50] & /@ list}]}
]


EDIT

Or follow this variation using Thread:

ListPlot[list
, AspectRatio -> Automatic
, Epilog -> {Thread[{Hue[Abs@#[[2]]], Circle[#, Abs@#[[2]]/40]}] & /@
list}
]