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

import scalam.DataSet
import scalam.m.ast._


trait Style {
  //command line option
  def name: StringLiteral
  //expression
  def expression: Expression
}


trait StyleScheme[+S <: Style] {  
  def apply(dataSets: Seq[DataSet]): Tuple2[Seq[Statement], DataSet => S]
}

case class Uniform[S <: Style](element: S) extends StyleScheme[S] {
  override def apply(dataSets: Seq[DataSet]) = (Seq.empty[Statement], (d: DataSet) => element)
}