Bar Chart

A barplot shows the relationship between a numeric and a categoric variable. Each entity of the categoric variable is represented as a bar. The size of the bar represents its numeric value. Barplot is sometimes described as a boring way to visualize information. However it is probably the most efficient way to show this kind of data. Ordering bars and providing good annotation are often necessary.



Color Themes


{
   "y" : {
      "data" : [
        [33,44,55]
      ],
      "smps" : ["S1","S2","S3"],
      "vars" : ["V1"]
   }
}
{
   "graphOrientation":"vertical",
   "graphType":"Bar",
   "showDataValues":"true",
   "showLegend":"false",
   "smpLabelRotate":"90",
   "smpTitle":"Samples",
   "theme":"CanvasXpress",
   "title":"Bar Graph Title",
   "xAxisTitle":"Value"
}
library(canvasXpress)
y=read.table("https://www.canvasxpress.org/data/cX-basic-dat.txt", header=TRUE, sep="\t", quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
canvasXpress(
  data=y,
  graphOrientation="vertical",
  graphType="Bar",
  showDataValues=TRUE,
  showLegend=FALSE,
  smpLabelRotate=90,
  smpTitle="Samples",
  theme="CanvasXpress",
  title="Bar Graph Title",
  xAxisTitle="Value"
)