Fish plots are designed to visualize tumor evolution. This visualizationwas inspired by the fishplot package for R by Christopher A. Miller, Joshua McMichael, Ha X. Dang, Christopher A. Maher, Li Ding, Timothy J. Ley, Elaine R. Mardis & Richard K. Wilson
<html> <head> <!-- Include the CanvasXpress library in your HTML file --> <link rel="stylesheet" href="https://www.canvasxpress.org/dist/canvasXpress.css" type="text/css"/> <script src="https://www.canvasxpress.org/dist/canvasXpress.min.js"></script> </head> <body> <!-- Create a canvas element for the chart with the desired dimensions --> <div> <canvas id="canvasId" width="600" height="600"></canvas> </div> <!-- Create a script to initialize the chart --> <script> // Create the data for the graph var data = { "y" : { "data" : [ [100,100], [98,44], [46,1], [1,55] ], "smps" : ["Primary","Post-AI"], "vars" : ["S1","S2","S3","S4"] } } // Create the configuration for the graph var config = { "backgroundType" : "panelSolidGradient", "colorSpectrum" : ["#ffe4c4","#ffb90f","#cd6600"], "colors" : ["#1B9E77","#D95F02","#7570B3","#E7298A"], "fishAxis" : [0,120], "fishAxisLabels" : ["Primary","Post-AI"], "fishParents" : [0,1,2,1], "fishShape" : "polygon", "fishTimepoints" : [0,120], "gradientOrientation" : "horizontal", "graphType" : "Fish", "legendKeyBackgroundBorderColor" : "rgba(255,255,255,0)", "legendKeyBackgroundColor" : "rgba(255,255,255,0)", "title" : "BRC32", "xAxis": ["S1","S2","S3","S4"] } // Event used to create graph (optional) var events = false // Call the CanvasXpress function to create the graph var cX = new CanvasXpress("canvasId", data, config, events); </script> </body> </html>
library(canvasXpress) y=read.table("https://www.canvasxpress.org/data/r/cX-fish3-dat.txt", header=TRUE, sep="\t", quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE) canvasXpress( data=y, backgroundType="panelSolidGradient", colorSpectrum=list("#ffe4c4", "#ffb90f", "#cd6600"), colors=list("#1B9E77", "#D95F02", "#7570B3", "#E7298A"), fishAxis=list(0, 120), fishAxisLabels=list("Primary", "Post-AI"), fishParents=list(0, 1, 2, 1), fishShape="polygon", fishTimepoints=list(0, 120), gradientOrientation="horizontal", graphType="Fish", legendKeyBackgroundBorderColor="rgba(255,255,255,0)", legendKeyBackgroundColor="rgba(255,255,255,0)", title="BRC32", xAxis=list("S1", "S2", "S3", "S4") )