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
<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" : [ [99,1,3,1,3,80,0.1], [30,0,0,0,0,0,0], [2,0.1,2.5,0.9,0.9,76,0.005], [60,0,0,0,0,0,0], [0,0,0,0,0.1,60,0.001], [2,0,0,0,0,0,0], [1,1,1,10,20,15,0] ], "smps" : [0,34,69,187,334,505,530], "vars" : ["C1","C2","C3","C4","C5","C6","C7"] } } // Create the configuration for the graph var config = { "backgroundType":"panelSolidGradient", "colorSpectrum":[ "#ffe4c4", "#ffb90f", "#cd6600" ], "colors":[ "#888888", "#EF0000", "#8FFF40", "#FF6000", "#50FFAF", "#FFCF00", "#0070FF" ], "fishAxis":[ "0", "34", "69", "187", "334", "505", "530", "650", "750" ], "fishParents":[ "0", "1", "1", "1", "3", "4", "0" ], "fishSeparateIndependentClones":true, "fishShape":"spline", "fishTimepoints":[ "0", "34", "69", "187", "334", "505", "530" ], "gradientOrientation":"horizontal", "graphType":"Fish", "legendKeyBackgroundBorderColor":"rgba(255,255,255,0)", "legendKeyBackgroundColor":"rgba(255,255,255,0)" } // Call the CanvasXpress function to create the graph var cX = new CanvasXpress("canvasId", data, config); </script> </body>
library(canvasXpress) y=read.table("https://www.canvasxpress.org/data/cX-fish4-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("#888888", "#EF0000", "#8FFF40", "#FF6000", "#50FFAF", "#FFCF00", "#0070FF"), fishAxis=list(0, 34, 69, 187, 334, 505, 530, 650, 750), fishParents=list(0, 1, 1, 1, 3, 4, 0), fishSeparateIndependentClones=TRUE, fishShape="spline", fishTimepoints=list(0, 34, 69, 187, 334, 505, 530), gradientOrientation="horizontal", graphType="Fish", legendKeyBackgroundBorderColor="rgba(255,255,255,0)", legendKeyBackgroundColor="rgba(255,255,255,0)" )