Look

org.appliedtopology.tda4j.plot.Look
See theLook companion object
final case class Look(tweaks: Vector[Tweak] = ...)

The starting look of the plots you make: tweaks that every plot constructor (Plot.barcode, Plot.diagram, ...) applies to what it builds, before anything you add yourself, so that Plot.barcode(d) is already in your house style and a tweak added afterwards, or a palette named in the call, wins.

A Look is a Scala given, found by the constructors without an import. Put one where the plots are made, such as at the top of a file or a block:

given Look = Look.print + Text(TextRole.Title, size = 18)
Plot.barcode(d).save("barcode.svg") // in the print look

A look is made of the same tweaks as a plot (Palette, Style, Text, Lines, Numbers, ...). A tweak that a kind of plot cannot have is left out for it, so one look serves figures and 3-D scenes alike (the tick labels of a look do nothing to a scene). With no given Look the constructors use Look.none, and a plot is as it was.

The nearest given Look is used whole. To add to the look in scope, ask for it in an inner scope (a block, a method, or a file that imports a shared look): given Look = summon[Look] + Text(TextRole.Title, size = 21).

Attributes

Companion
object
Experimental
true
Source
Look.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def +(tweak: Tweak): Look

This look, then tweak.

This look, then tweak.

Attributes

Source
Look.scala
def ++(that: Look): Look

This look, then everything that one does.

This look, then everything that one does.

Attributes

Source
Look.scala
def figure(palette: Optional[Palette] = ...)(made: => Figure): Figure

What a constructor does with the figure it builds: this look, and then the palette the caller named, if any, because what is written in the call beats the look.

What a constructor does with the figure it builds: this look, and then the palette the caller named, if any, because what is written in the call beats the look.

Attributes

Source
Look.scala
def isEmpty: Boolean

Attributes

Source
Look.scala
def on(figure: Figure): Figure

figure with the tweaks of this look that apply to a figure.

figure with the tweaks of this look that apply to a figure.

Attributes

Source
Look.scala
def on(scene: Scene): Scene

scene with the tweaks of this look that apply to a 3-D scene.

scene with the tweaks of this look that apply to a 3-D scene.

Attributes

Source
Look.scala
def scene(made: => Scene): Scene

What a constructor does with the scene it builds.

What a constructor does with the scene it builds.

Attributes

Source
Look.scala
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
Source
Look.scala

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
Source
Product.scala
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
Source
Product.scala