Skip to content

RasmusFonseca/D3Matrix

Repository files navigation

D3Matrix

D3Matrix is a very small javascript library for taking a tab/comma/space separated file (.tsv/.csv/.txt) and illustrating using colors to indicate value (blue is negative, red is positive) and circle-sizes to indicate absolute value (values of 0 become points; non-zero values have larger radius).

A minimal working example could look like this:

<html>
  <head>
    <script src="d3.js"></script>
    <script src="d3matrix.js"></script>
  </head>
  <body>
    <div id="canvasDiv"></div>
    <script language="javascript">
      var d3m = initD3Matrix("canvasDiv", 800 );
      d3m.update("1,2,3\n-3,0,3");
    </script>
  </body>
</html>

A larger practical example can be found in this repos github page: https://rasmusfonseca.github.io/D3Matrix/

About

Display matrices with D3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published