Contour Chart

Contour plots are graphs to show a three-dimensional surface on a two-dimensional plane. It graphs the X, Y variables on the plane axis and a response variable Z as contours. The format of the data can be specified as a three column x, y, z (long and skiny) data set or as rows and columns (short and fat) specifying the z value.



Color Themes


{
   "y" : {
      "data" : [
        [0,0,10],
        [1,0,10.625],
        [2,0,12.5],
        [3,0,15.625],
        [4,0,20],
        [0,1,5.625],
        [1,1,6.25],
        [2,1,8.125],
        [3,1,11.25],
        [4,1,15.625],
        [0,2,2.5],
        [1,2,3.125],
        [2,2,5],
        [3,2,8.125],
        [4,2,12.5],
        [0,3,0.625],
        [1,3,1.25],
        [2,3,3.125],
        [3,3,6.25],
        [4,3,10.625],
        [0,4,0],
        [1,4,0.625],
        [2,4,2.5],
        [3,4,6.625],
        [4,4,10]
      ],
      "smps" : ["s1","s2","s3"],
      "vars" : ["v1","v2","v3","v4","v5","v6","v7","v8","v9","v10","v11","v12","v13","v14","v15","v16","v17","v18","v19","v20","v21","v22","v23","v24","v25"]
   }
}
{
   "graphType" : "ScatterBubble2D",
   "showContourLevel" : "true",
   "title" : "Basic Contour Plot"
}
var cX = CanvasXpress.$("canvasId");
cX.createContour();
library(canvasXpress)
y=read.table("https://www.canvasxpress.org/data/cX-contour2-dat.txt", header=TRUE, sep="\t", quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
canvasXpress(
  data=y,
  graphType="ScatterBubble2D",
  showContourLevel=TRUE,
  title="Basic Contour Plot",
  afterRender=list(list("createContour"))
)