Svg

org.appliedtopology.tda4j.plot.Svg
object Svg

Renders a Figure as one element: a surface, hairline grid and axes, the marks clipped to the plot area, a legend and a color bar. Under `Theme.Auto` every themed color is a CSS variable of the (both modes declared, prefers-color-scheme choosing); under Light/Dark every color is a plain hex.

Positions go through the axes' Transforms here and nowhere else, so a figure holds data in its own units. What is at exactly 0 on a log axis sits on a -∞ line beside the lowest number, as an essential bar ends at ∞. A mark with no other place on the axes (a negative value on a log axis, NaN) is left out, and a line of small print under the plot counts what was left out. The figure's Style sets the font, the size of text and marks, the gridlines, the legend's place and the background.

Attributes

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

Members list

Value members

Concrete methods

def escape(s: String): String

XML text escaping.

XML text escaping.

Attributes

Source
Svg.scala
def niceTicks(lo: Double, hi: Double, target: Int = ...): IndexedSeq[Double]

About target ticks at round values (1, 2 or 5 times a power of ten) inside [lo, hi].

About target ticks at round values (1, 2 or 5 times a power of ten) inside [lo, hi].

Attributes

Source
Svg.scala
def number(v: Double): String

A number for a tick or a tooltip: up to four significant figures, ∞ for infinity.

A number for a tick or a tooltip: up to four significant figures, ∞ for infinity.

Attributes

Source
Svg.scala
def render(fig: Figure, theme: Theme, saved: Boolean = ...): String

fig as an ``. With saved, the figure of a file, which draws no background unless its style asks for one (see Style.transparent).

fig as an ``. With saved, the figure of a file, which draws no background unless its style asks for one (see Style.transparent).

Attributes

Source
Svg.scala