object Scale
- Source
- scale.scala
- Alphabetic
- By Inheritance
- Scale
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- case class Discrete[A](step: A)(implicit d: Discretable[A]) extends Scale[A, A] with Product with Serializable
Discrete scale offers a simple way to map [A] to a discrete set of [A's] separated by a step size //TODO deprecate?? this has been used more with Bound.take or Bound.step??
Discrete scale offers a simple way to map [A] to a discrete set of [A's] separated by a step size //TODO deprecate?? this has been used more with Bound.take or Bound.step??
- step
the step size of the discretization
- class Ordinal[A, B] extends Scale[A, B]
An Ordinal scale
- class OrdinalBoundedDomain[A, B] extends Scale[A, B]
- class OrdinalBoundedRange[A, B] extends Scale[A, B]
An Ordinal scale based on an outoutBound
- class Quantitative[A, B] extends ScaleOneWay[A, B]
The most common 1d Scale with a continuous domain and range
- class QuantitativeBound[A, B] extends QuantitativeInv[A, B] with Scale[A, B]
- class QuantitativeInv[A, B] extends Quantitative[A, B] with Scale[A, B]
- class QuantitativeRegions[A, B] extends ScaleOneWay[A, B]
A Scale with multiple scales regions (a poly scale)
- type ScaleBounds[A, B] = QuantitativeRegions[A, B]
- class ScaleGrid[Ad, Bd, R] extends ScaleOneWay[(Ad, Bd), R]
scale x,y domains to to m-n matrix values
- type ScaleIndexed[A, B] = Ordinal[A, B]
- class ScaleTuple2[Ad, Ar, Bd, Br] extends Scale[(Ad, Bd), (Ar, Br)]
- class ScaleVec[Ad, Bd] extends Scale[(Ad, Bd), Vec]
- class SingularException extends scala.Exception
An simple class to throw a more specific error for Bounds that can not be inverted
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply[A](step: A)(implicit d: Discretable[A]): Discrete[A]
- def apply[A, B](domain: Bound[A], range: IndexedSeq[B]): OrdinalBoundedDomain[A, B]
indexed map ex: Scale(0 to 10, Color.viridis) and Scale(1 to 10, Vector(1,2,3))
- def apply[A, B](initDomain: Iterable[A], range: Bound[B]): OrdinalBoundedRange[A, B]
Construct an ordinal scale from a domain where range bands are automatically created from the size of the domain
- def apply[A, B](initDomain: Iterable[A], range: Iterable[B]): Ordinal[A, B]
Construct an ordinal scales with predefined domain (better for deterministic results and thread safety)
- def apply[A, B](range: Iterable[B]): Ordinal[A, B]
Construct an ordinal scales
Construct an ordinal scales
- range
the modulus output values Example:
val truth = Scale[Int,String](Seq["Black","White"]) truth(0) //"Black" truth(1) //"White" truth(2) //"Black" truth(10)//"White" truth(1) //"White" truth.domain //IndexedSeq(0,1,2,10)
- def apply[Ad, Bd, R](xDomain: Bound[Ad], yDomain: Bound[Bd], grid: Grid[R]): ScaleGrid[Ad, Bd, R]
- def apply[Ad, Bd](aDomain: Bound[Ad], bDomain: Bound[Bd], range: Rect): ScaleVec[Ad, Bd]
- def apply[Ad, Bd](aScale: Scale[Ad, Double], bScale: Scale[Bd, Double]): ScaleVec[Ad, Bd]
- def apply[Ad, Ar, Bd, Br](aScale: Scale[Ad, Ar], bScale: Scale[Bd, Br]): ScaleTuple2[Ad, Ar, Bd, Br]
- def apply[A, B](boundaries: (A, B)*)(implicit bDomain: Boundable[A], bRange: Boundable[B]): QuantitativeRegions[A, B]
Construct scales with multiple regions
Construct scales with multiple regions
- boundaries
boundary point mappings of Boundable types Example:
val ageColor = Scale(0 -> Red, 2 -> Orange, 10 -> Green) ageColor(1) //Redish-orange)
- def apply[A, B](domain: LerpInv[A], range: Lerp[B]): Quantitative[A, B]
- def apply[A, B](domain: LerpInv[A], range: LerpInv[B]): QuantitativeInv[A, B]
- def apply[A, B](domain: Bound[A], range: Bound[B]): QuantitativeBound[A, B]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def cat10[A](domain: Iterable[A] = Seq[A]()): Ordinal[A, Color]
Convenience function for d3.scale.category10 ordinal scale
- def cat20[A](domain: Iterable[A] = Seq[A]()): Ordinal[A, Color]
Convenience function for d3.scale.category20 ordinal scale
- def cat20b[A](domain: Iterable[A] = Seq[A]()): Ordinal[A, Color]
Convenience function for d3.scale.category20b ordinal scale
- def cat20c[A](domain: Iterable[A] = Seq[A]()): Ordinal[A, Color]
Convenience function for d3.scale.category20c ordinal scale
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- object Discrete extends Serializable
Deprecated Value Members
- def apply(): Quantitative[Double, Double]
Convenience constructor to the most common Scale type of 0~1 to 0~1
Convenience constructor to the most common Scale type of 0~1 to 0~1
- Annotations
- @deprecated
- Deprecated
(Since version v0.2.15) too much default and why this default useful