ScatterBubble2D Chart

A bubble plot is a scatterplot where a third dimension is added: the value of an additional numeric variable is represented through the size of the dots. You need 3 numerical variables as input: one is represented by the X axis, one by the Y axis, and one by the dot size.



Color Themes


{
   "colorBy" : "Continent",
   "graphType" : "ScatterBubble2D",
   "showTransition" : "false",
   "theme" : "CanvasXpress",
   "xAxis" : ["LifeExpectancy"],
   "yAxis" : ["GDPPerCapita"],
   "yAxisTransform" : "log2",
   "zAxis" : ["Population"]
}
library(canvasXpress)
y=read.table("https://www.canvasxpress.org/data/cX-bubble-dat.txt", header=TRUE, sep="\t", quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
z=read.table("https://www.canvasxpress.org/data/cX-bubble-var.txt", header=TRUE, sep="\t", quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
canvasXpress(
  data=y,
  varAnnot=z,
  colorBy="Continent",
  graphType="ScatterBubble2D",
  showTransition=FALSE,
  theme="CanvasXpress",
  xAxis=list("LifeExpectancy"),
  yAxis=list("GDPPerCapita"),
  yAxisTransform="log2",
  zAxis=list("Population")
)