Circular Chart

A circular barplot is a barplot, with each bar displayed along a circle instead of a line. Thus, it is advised to have a good understanding of how barplot works before making it circular. Circular bar chart is very ‘eye catching’ and allows a better use of the space than a long usual barplot.



Color Themes


{
   "connections" : [
        ["rgb(255,0,0)","s1","s15"],
      ["rgb(0,255,0)","s25","s120"],
      ["rgb(255,0,0)","s34","s2"],
      ["rgb(255,0,0)","s47","s69"],
      ["rgb(255,0,0)","s15","s74"],
      ["rgb(0,120,0)","s57","s87"],
      ["rgb(255,34,0)","s54","s118"],
      ["rgb(255,0,100)","s78","s18"],
      ["rgb(255,134,0)","s90","s48"],
      ["rgb(120,0,0)","s120","s68"],
      ["rgb(255,0,0)","s131","s92"],
      ["rgb(0,255,0)","s148","s119"],
      ["rgb(0,0,255)","s10","s14"],
      ["rgb(255,0,0)","s56","s6"],
      ["rgb(255,0,0)","s98","s90"],
      ["rgb(255,0,0)","s113","s20"]
   ],
   "graphType" : "Circular",
   "ringGraphType" : ["dot","heatmap","bar"],
   "ringGraphWeight" : ["50","25","25"],
   "segregateSamplesBy" : ["Species"],
   "segregateVariablesBy" : ["Ring"],
   "showTransition" : "false",
   "smpOverlays" : ["Species"],
   "title" : "Iris flower data set (1D Circular Plot)",
   "transitionStep" : "50",
   "transitionTime" : "1500"
}
library(canvasXpress)
y=read.table("https://www.canvasxpress.org/data/cX-circular-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-circular-smp.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-circular-var.txt", header=TRUE, sep="\t", quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
canvasXpress(
  data=y,
  smpAnnot=x,
  varAnnot=z,
  connections=list(list("rgb(255,0,0)", "s1", "s15"), list("rgb(0,255,0)", "s25", "s120"), list("rgb(255,0,0)", "s34", "s2"), list("rgb(255,0,0)", "s47", "s69"), list("rgb(255,0,0)", "s15", "s74"), list("rgb(0,120,0)", "s57", "s87"), list("rgb(255,34,0)", "s54", "s118"), list("rgb(255,0,100)", "s78", "s18"), list("rgb(255,134,0)", "s90", "s48"), list("rgb(120,0,0)", "s120", "s68"), list("rgb(255,0,0)", "s131", "s92"), list("rgb(0,255,0)", "s148", "s119"), list("rgb(0,0,255)", "s10", "s14"), list("rgb(255,0,0)", "s56", "s6"), list("rgb(255,0,0)", "s98", "s90"), list("rgb(255,0,0)", "s113", "s20")),
  graphType="Circular",
  ringGraphType=list("dot", "heatmap", "bar"),
  ringGraphWeight=list(50, 25, 25),
  segregateSamplesBy=list("Species"),
  segregateVariablesBy=list("Ring"),
  showTransition=FALSE,
  smpOverlays=list("Species"),
  title="Iris flower data set (1D Circular Plot)",
  transitionStep=50,
  transitionTime=1500
)