Bubble Chart

Buble plot or circular treemap allows to visualise a hierarchic architecture. It is an equivalent of a treemap or a dendrogram, where each node of the tree is represented as a circle and its sub-nodes are represented as circles inside of it. The size of each circle can be proportional to a specific value, what gives more insight to the plot. If only one level of hierarchy is displayed (no encapsulation), it becomes equivalent to a barplot. Instead of showing the value of each individual as a bar, it uses a circle. Bubble plots are not recommended if you need to precisely compare values of group. However, it shows very well how groups are organised in subgroups. It uses the space less efficiently than a treemap, but the hierarchy gets more obvious.



Color Themes


{
   "x" : {
      "Annot1" : ["A","B","C","A","B","C","A","B","C","A","B","C","A","B","C","A"],
      "Annot2" : [5,10,15,20,25,30,35,40,40,35,30,25,20,15,10,5],
      "Level1" : ["L1.1","L1.1","L1.1","L1.1","L1.2","L1.2","L1.2","L1.2","L1.3","L1.3","L1.3","L1.3","L1.4","L1.4","L1.4","L1.4"],
      "Level2" : ["L2.1","L2.1","L2.2","L2.2","L2.1","L2.1","L2.2","L2.2","L2.1","L2.1","L2.2","L2.2","L2.1","L2.1","L2.2","L2.2"],
      "Level3" : ["L3.1","L3.2","L3.1","L3.2","L3.1","L3.2","L3.1","L3.2","L3.1","L3.2","L3.1","L3.2","L3.1","L3.2","L3.1","L3.2"]
   },
   "y" : {
      "data" : [
        [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]
      ],
      "smps" : ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P"],
      "vars" : ["Order"]
   }
}
{
   "circularType" : "bubble",
   "graphType" : "Circular",
   "theme" : "ggplot",
   "title" : "Simple Bubble Graph"
}
library(canvasXpress)
y=read.table("https://www.canvasxpress.org/data/cX-tree-dat.txt", header=TRUE, sep="\t", quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
x=read.table("https://www.canvasxpress.org/data/cX-tree-smp.txt", header=TRUE, sep="\t", quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
canvasXpress(
  data=y,
  smpAnnot=x,
  circularType="bubble",
  graphType="Circular",
  theme="ggplot",
  title="Simple Bubble Graph"
)