ScatterPlot

import axle.visualize._
val data = Map(
  (1, 1) -> 0,
  (2, 2) -> 0,
  (3, 3) -> 0,
  (2, 1) -> 1,
  (3, 2) -> 1,
  (0, 1) -> 2,
  (0, 2) -> 2,
  (1, 3) -> 2)
// data: scala.collection.immutable.Map[(Int, Int),Int] = Map((0,2) -> 2, (1,1) -> 0, (3,2) -> 1, (1,3) -> 2, (2,2) -> 0, (0,1) -> 2, (3,3) -> 0, (2,1) -> 1)

Define the ScatterPlot

import axle.visualize.Color._
import cats.implicits._
val plot = ScatterPlot[String, Int, Int, Map[(Int, Int), Int]](
  () => data,
  colorOf = (x: Int, y: Int) => data((x, y)) match {
    case 0 => red
    case 1 => blue
    case 2 => green
  },
  labelOf = (x: Int, y: Int) => data.get((x, y)).map(s => (s.toString, false)))
// plot: axle.visualize.ScatterPlot[String,Int,Int,Map[(Int, Int),Int]] = ScatterPlot(<function0>,600.0,600.0,50.0,<function2>,<function2>,<function2>,Courier New,12.0,false,Palatino,20.0,None,true,true,true,true,true,None,None,None,None,None,None)

Create the SVG

import axle.web._
svg(plot, "scatter.svg")