Contours

public struct Contours : Encodable

Note

Used by Histogram2DContour<XData, YData, ZData>.contours, Contour<ZData, XData, YData>.contours, ContourCarpet<ZData, AData, BData>.contours.
  • If levels, the data is represented as a contour plot with multiple levels displayed.

    If constraint, the data is represented as constraints with the invalid region shaded as specified by the operation and value parameters.

    See more

    Declaration

    Swift

    public enum Contours.`Type` : String, Encodable
  • If levels, the data is represented as a contour plot with multiple levels displayed.

    If constraint, the data is represented as constraints with the invalid region shaded as specified by the operation and value parameters.

    Declaration

    Swift

    public var type: Type?
  • Sets the starting contour level value.

    Must be less than contours.end

    Declaration

    Swift

    public var start: Double?
  • end

    Sets the end contour level value.

    Must be more than contours.start

    Declaration

    Swift

    public var end: Double?
  • Sets the step between each contour level.

    Must be positive.

    Declaration

    Swift

    public var size: Double?
  • Determines the coloring method showing the contour values.

    If fill, coloring is done evenly between each contour level If heatmap, a heatmap gradient coloring is applied between each contour level. If lines, coloring is done on the contour lines. If none, no coloring is applied on this trace.

    See more

    Declaration

    Swift

    public enum Coloring : String, Encodable
  • Determines the coloring method showing the contour values.

    If fill, coloring is done evenly between each contour level If heatmap, a heatmap gradient coloring is applied between each contour level. If lines, coloring is done on the contour lines. If none, no coloring is applied on this trace.

    Declaration

    Swift

    public var coloring: Coloring?
  • Determines whether or not the contour lines are drawn.

    Has an effect only if contours.coloring is set to fill.

    Declaration

    Swift

    public var showLines: Bool?
  • Determines whether to label the contour lines with their values.

    Declaration

    Swift

    public var showLabels: Bool?
  • Sets the font used for labeling the contour levels.

    The default color comes from the lines, if shown. The default family and size come from layout.font.

    Declaration

    Swift

    public var labelFont: Font?
  • Sets the contour label formatting rule using d3 formatting mini-language which is very similar to Python, see: https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format

    Declaration

    Swift

    public var labelFormat: String?
  • Sets the constraint operation.

    = keeps regions equal to value < and <= keep regions less than value > and >= keep regions greater than value [], (), [), and (] keep regions inside value[0] to value[1] ], *)(, *[ keep regions outside value[0] to value[1]` Open vs. closed intervals make no difference to constraint display, but all versions are allowed for consistency with filter transforms.

    Declaration

    Swift

    public var operation: Operation?
  • Sets the value or values of the constraint boundary.

    When operation is set to one of the comparison values (=,<,>=,>,<=) value is expected to be a number. When operation is set to one of the interval values ([],(),[),(],],)(,[) value is expected to be an array of two numbers where the first is the lower bound and the second is the upper bound.

    Declaration

    Swift

    public var value: Anything?
  • Creates Contours object with specified properties.

    Declaration

    Swift

    public init(type: `Type`? = nil, start: Double? = nil, end: Double? = nil, size: Double? = nil,
            coloring: Coloring? = nil, showLines: Bool? = nil, showLabels: Bool? = nil, labelFont: Font? =
            nil, labelFormat: String? = nil, operation: Operation? = nil, value: Anything? = nil)

    Parameters

    type

    If levels, the data is represented as a contour plot with multiple levels displayed.

    start

    Sets the starting contour level value.

    end

    Sets the end contour level value.

    size

    Sets the step between each contour level.

    coloring

    Determines the coloring method showing the contour values.

    showLines

    Determines whether or not the contour lines are drawn.

    showLabels

    Determines whether to label the contour lines with their values.

    labelFont

    Sets the font used for labeling the contour levels.

    labelFormat

    Sets the contour label formatting rule using d3 formatting mini-language which is very similar to Python, see: https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format

    operation

    Sets the constraint operation.

    value

    Sets the value or values of the constraint boundary.