 
 # d3.select('.cont').append('div').text('just point')
 
-# svl.plot {
-#   selector: '.cont'
-#   size:
-#     width: 600
-#     height: 600
-#   dataSource:
-#     data: data
-#     removeNA: false
-#   plot:
-#     type: 'points'
-#     x: 'Time'
-#     y: 'ScoreA'
-#     color: 'Letter'
-# }
+svl.plot {
+  selector: '.cont'
+  size:
+    width: 600
+    height: 600
+  dataSource:
+    data: data
+    removeNA: false
+  plot:
+    type: 'facet'
+    split: 'Letter'
+    color: 'Letter'
+    x: 'Time'
+    plot:
+      type: 'facet'
+      split: 'Number'
+      plot:
+        type: 'points'
+        y: 'ScoreA'
+}
 
 # d3.select('.cont').append('div').text('just facet Number > point')
 

                .domain(myData.map(fcolor))
              scale.color.by = fcolor

            return cross_data_scales(splitData, scale)
          )



            if fcolor
              scale.color = d3.scale.category10()
                .domain(myData.map(fcolor))
              # scale.color.by = fcolor

            return cross_data_ctx(myData, scale, size)
          )

      sel.enter().append('circle')
      sel.exit().remove()
      sel
        .attr('cx', (d) -> s = d.s.x; s(s.by(d.d)) * d.e.width)
        .attr('cy', (d) -> s = d.s.y; s(s.by(d.d)) * d.e.height)
        .attr('r', 3.5)

      sel.style('fill', (d) -> s = d.s.color; if s then s(s.by(d.d)) else null)

      if plot
        throw "can not subplot"

      return

    text: (parent, dataCtx, {text}) ->

      return
  }

  doPlot = (parent, dataCtx, args) ->
    throw "type must be a string" unless typeof args.type is 'string'
    p = plots[args.type]
    throw "unknown type '#{args.type}'" unless p
    p(parent.append('g').attr('class', args.type), dataCtx, args)
    return

  doPlot(
    svg
    -> {data, scales:{}, size}
    plot
  )
  return

# ------------------------------------------
