aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/scalam/plotting/styles/marker/styles.scala
blob: 9e80d99f1371973b4da848e245724945b7951577 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package scalam.plotting.styles.marker

import scalam.plotting.DataSet
import scalam.m.ast._
import scalam.plotting.styles.Style
import scalam.plotting.styles.StyleElement

object AllMarkerStyle extends Style[Marker] {

  val markers = List(Plus, Circle, Asterisk, Point, Cross, Square, Diamond, UpTriangle, DownTriangle, RightTriangle, LeftTriangle, Pentagram, Hexagram)
  private def map(dataSets: Iterable[DataSet]): Map[DataSet, Marker] = dataSets.zipWithIndex.map{
    case (d, i) => d -> markers(i % (markers.length-1))    
  }.toMap
  
  def apply(dataSets: Seq[DataSet]) = (Seq.empty[Statement], map(dataSets))

}