Text

org.appliedtopology.tda4j.plot.Text
object Text

The look of the text of a plot, one TextRole at a time: fig + Text(TextRole.Title, size = 18, align = Anchor.Middle). Only what is given changes, and a later Text of the same role keeps the rest of an earlier one:

Plot.diagram(d)
 .withText(TextRole.Title, size = 18, weight = Weight.Bold, align = Anchor.Middle)
 .withText(TextRole.TickLabel, size = 9, angle = 45)

Sizes are in pixels before the style's textScale, so Style.slides still scales them. A role that does not apply (align of a tick label, whose place is its tick's) refuses, naming what to use.

Attributes

Experimental
true
Source
ElementTweaks.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Text.type

Members list

Value members

Concrete methods

def apply(role: TextRole, size: Optional[Double] = ..., weight: Optional[Weight] = ..., italic: Optional[Boolean] = ..., align: Optional[Anchor] = ..., angle: Optional[Double] = ..., font: Optional[String] = ..., color: Optional[String] = ..., paint: Optional[Paint] = ..., limit: Optional[Double] = ...): Tweak

The text of role. size is in pixels, weight a Weight, italic slants it, align puts a title, subtitle, axis label or note at the Start, Middle or End of the plot area, angle slants the x axis's tick labels (degrees counterclockwise, between -90 and 90), font a CSS font-family list for this text alone, and color (a CSS color) or paint (a palette role, so that it follows the theme) its color. limit is the longest the text may be in pixels: a longer one is cut to fit and ends in …, with the whole of it as its tooltip (the width is estimated from the characters; a font is not known).

The text of role. size is in pixels, weight a Weight, italic slants it, align puts a title, subtitle, axis label or note at the Start, Middle or End of the plot area, angle slants the x axis's tick labels (degrees counterclockwise, between -90 and 90), font a CSS font-family list for this text alone, and color (a CSS color) or paint (a palette role, so that it follows the theme) its color. limit is the longest the text may be in pixels: a longer one is cut to fit and ends in …, with the whole of it as its tooltip (the width is estimated from the characters; a font is not known).

Attributes

Source
ElementTweaks.scala