Quartz.Length (Quartz v0.8.1)

View Source

Units of measurement for lengths.

Summary

Functions

A value that represents a fraction of the length of an axis (margins included).

Length in mm (1in = 2.54cm).

The factor that converts inches to SVG pixels (4/3 ≅ 1.333).

Length in inches.

The factor that converts inches to SVG pixels (96).

Length in mm (1 in = 254 pt).

The factor that converts millimiters to SVG pixels (3.7795).

Length in points (1 in = 96 pt).

The factor that converts points to SVG pixels (1.3333333333333333).

Functions

axis_fraction(value, opts \\ [])

A value that represents a fraction of the length of an axis (margins included).

The value can be any real number, even though real numbers not between 0 an 1 won't be very useful in practice.

Takes the optional keyword argument :axis, which must be an axis from a plot (not only an axis name). If the axis is not given, some functinos that accept axis fractions can infer it from the context.

cm(value \\ 1.0)

Length in mm (1in = 2.54cm).

cm_to_px_conversion_factor()

@spec cm_to_px_conversion_factor() :: number()

The factor that converts inches to SVG pixels (4/3 ≅ 1.333).

As a user, you probably won't have to use these conversion functions, but they can be useful as reference.

Note

Note: SVG pixels (px) are not real pixels on the screen. The definition of an SVG pixel is much more complicated.

data(value, opts \\ [])

Data units.

inch(value \\ 1.0)

@spec inch(number()) :: Dantzig.Polynomial.t()

Length in inches.

inch_to_px_conversion_factor()

@spec inch_to_px_conversion_factor() :: number()

The factor that converts inches to SVG pixels (96).

As a user, you probably won't have to use these conversion functions, but they can be useful as reference.

Note

Note: SVG pixels (px) are not real pixels on the screen. The definition of an SVG pixel is much more complicated.

mm(value \\ 1.0)

@spec mm(number()) :: Dantzig.Polynomial.t()

Length in mm (1 in = 254 pt).

mm_to_px_conversion_factor()

@spec mm_to_px_conversion_factor() :: number()

The factor that converts millimiters to SVG pixels (3.7795).

As a user, you probably won't have to use these conversion functions, but they can be useful as reference.

Note

Note: SVG pixels (px) are not real pixels on the screen. The definition of an SVG pixel is much more complicated.

pt(value \\ 1.0)

@spec pt(number()) :: Dantzig.Polynomial.t()

Length in points (1 in = 96 pt).

pt_to_px_conversion_factor()

@spec pt_to_px_conversion_factor() :: number()

The factor that converts points to SVG pixels (1.3333333333333333).

As a user, you probably won't have to use these conversion functions, but they can be useful as reference.

Note

Note: SVG pixels (px) are not real pixels on the screen. The definition of an SVG pixel is much more complicated.