Array
extension Array where Element == XAxis
extension Array where Element == YAxis
extension Array where Element == Ternary
extension Array where Element == Scene
extension Array where Element == Geo
extension Array where Element == Mapbox
extension Array where Element == Polar
extension Array where Element == ColorAxis
extension Array: Plotable where Element: Encodable
-
Preset default axis’ customized with the most frequently used properties.
Declaration
Parameters
titlerangeSets the range of this axis.
ticksDetermines whether ticks are drawn or not.
tickAngleSets the angle of the tick labels with respect to the horizontal.
showGridDetermines whether or not grid lines are drawn.
domainSets the domain of this axis (in plot fraction).
-
preset(visible:color: title: type: autoTypeNumbers: autoRange: rangeMode: range: fixedRange: scaleAnchor: scaleRatio: constrain: constrainToward: matches: rangeBreaks: tickMode: numTicks: tick0: dTick: tickValues: tickText: ticks: ticksOn: tickLabelMode: tickLabelPosition: mirror: tickLength: tickWidth: tickColor: showTickLabels: autoMargin: showSpikes: spikeColor: spikeThickness: spikeDash: spikeMode: spikeSnap: tickFont: tickAngle: tickPrefix: showTickPrefix: tickSuffix: showTickSuffix: showExponent: exponentFormat: minExponent: separateThousands: tickFormat: tickFormatStops: hoverFormat: showLine: lineColor: lineWidth: showGrid: gridColor: gridWidth: zeroLine: zeroLineColor: zeroLineWidth: showDividers: dividerColor: dividerWidth: anchor: side: overlaying: layer: domain: position: categoryOrder: categoryArray: uiRevision: rangeSlider: rangeSelector: calendar: ) Preset default axis’ customized with the specified properties.
Declaration
Swift
public static func preset(visible: Bool? = nil, color: Color? = nil, title: XAxis.Title? = nil, type: XAxis.`Type`? = nil, autoTypeNumbers: AutoTypeNumbers? = nil, autoRange: AutoRange? = nil, rangeMode: RangeMode? = nil, range: InfoArray? = nil, fixedRange: Bool? = nil, scaleAnchor: XAxis.ScaleAnchor? = nil, scaleRatio: Double? = nil, constrain: XAxis.Constrain? = nil, constrainToward: XAxis.ConstrainToward? = nil, matches: XAxis.Matches? = nil, rangeBreaks: [XAxis.RangeBreak]? = nil, tickMode: TickMode? = nil, numTicks: Int? = nil, tick0: Anything? = nil, dTick: Anything? = nil, tickValues: [Double]? = nil, tickText: [Double]? = nil, ticks: Ticks? = nil, ticksOn: XAxis.TicksOn? = nil, tickLabelMode: XAxis.TickLabelMode? = nil, tickLabelPosition: XAxis.TickLabelPosition? = nil, mirror: Mirror? = nil, tickLength: Double? = nil, tickWidth: Double? = nil, tickColor: Color? = nil, showTickLabels: Bool? = nil, autoMargin: Bool? = nil, showSpikes: Bool? = nil, spikeColor: Color? = nil, spikeThickness: Double? = nil, spikeDash: String? = nil, spikeMode: XAxis.SpikeMode? = nil, spikeSnap: XAxis.SpikeSnap? = nil, tickFont: Font? = nil, tickAngle: Angle? = nil, tickPrefix: String? = nil, showTickPrefix: ShowTickPrefix? = nil, tickSuffix: String? = nil, showTickSuffix: ShowTickSuffix? = nil, showExponent: ShowExponent? = nil, exponentFormat: ExponentFormat? = nil, minExponent: Double? = nil, separateThousands: Bool? = nil, tickFormat: String? = nil, tickFormatStops: [TickFormatStop]? = nil, hoverFormat: String? = nil, showLine: Bool? = nil, lineColor: Color? = nil, lineWidth: Double? = nil, showGrid: Bool? = nil, gridColor: Color? = nil, gridWidth: Double? = nil, zeroLine: Bool? = nil, zeroLineColor: Color? = nil, zeroLineWidth: Double? = nil, showDividers: Bool? = nil, dividerColor: Color? = nil, dividerWidth: Double? = nil, anchor: XAxis.Anchor? = nil, side: XAxis.Side? = nil, overlaying: XAxis.Overlaying? = nil, layer: AxisLayer? = nil, domain: InfoArray? = nil, position: Double? = nil, categoryOrder: CategoryOrder? = nil, categoryArray: [Double]? = nil, uiRevision: Anything? = nil, rangeSlider: XAxis.RangeSlider? = nil, rangeSelector: XAxis.RangeSelector? = nil, calendar: Calendar? = nil) -> [XAxis]Parameters
visibleA single toggle to hide the axis while preserving interaction like dragging.
colorSets default for all colors associated with this axis all at once: line, font, tick, and grid colors.
titletypeSets the axis type.
autoTypeNumbersUsing strict a numeric string in trace data is not converted to a number.
autoRangeDetermines whether or not the range of this axis is computed in relation to the input data.
rangeModeIf normal, the range is computed in relation to the extrema of the input data.
rangeSets the range of this axis.
fixedRangeDetermines whether or not this axis is zoom-able.
scaleAnchorIf set to another axis id (e.g.
scaleRatioIf this axis is linked to another by
scaleanchor, this determines the pixel to unit scale ratio.constrainIf this axis needs to be compressed (either due to its own
scaleanchorandscaleratioor those of the other axis), determines how that happens: by increasing the range, or by decreasing the domain.constrainTowardIf this axis needs to be compressed (either due to its own
scaleanchorandscaleratioor those of the other axis), determines which direction we push the originally specified plot area.matchesIf set to another axis id (e.g.
rangeBreakstickModeSets the tick mode for this axis.
numTicksSpecifies the maximum number of ticks for the particular axis.
tick0Sets the placement of the first tick on this axis.
dTickSets the step in-between ticks on this axis.
tickValuesSets the values at which ticks on this axis appear.
tickTextSets the text displayed at the ticks position via
tickvals.ticksDetermines whether ticks are drawn or not.
ticksOnDetermines where ticks and grid lines are drawn with respect to their corresponding tick labels.
tickLabelModeDetermines where tick labels are drawn with respect to their corresponding ticks and grid lines.
tickLabelPositionDetermines where tick labels are drawn with respect to the axis Please note that top or bottom has no effect on x axes or when
ticklabelmodeis set to period.mirrorDetermines if the axis lines or/and ticks are mirrored to the opposite side of the plotting area.
tickLengthSets the tick length (in px).
tickWidthSets the tick width (in px).
tickColorSets the tick color.
showTickLabelsDetermines whether or not the tick labels are drawn.
autoMarginDetermines whether long tick labels automatically grow the figure margins.
showSpikesDetermines whether or not spikes (aka droplines) are drawn for this axis.
spikeColorSets the spike color.
spikeThicknessSets the width (in px) of the zero line.
spikeDashSets the dash style of lines.
spikeModeDetermines the drawing mode for the spike line If toaxis, the line is drawn from the data point to the axis the series is plotted on.
spikeSnapDetermines whether spikelines are stuck to the cursor or to the closest datapoints.
tickFontSets the tick font.
tickAngleSets the angle of the tick labels with respect to the horizontal.
tickPrefixSets a tick label prefix.
showTickPrefixIf all, all tick labels are displayed with a prefix.
tickSuffixSets a tick label suffix.
showTickSuffixSame as
showtickprefixbut for tick suffixes.showExponentIf all, all exponents are shown besides their significands.
exponentFormatDetermines a formatting rule for the tick exponents.
minExponentHide SI prefix for 10^n if |n| is below this number.
separateThousandsIf “true”, even 4-digit integers are separated
tickFormatSets the tick label formatting rule using d3 formatting mini-languages which are very similar to those in Python.
tickFormatStopshoverFormatSets the hover text formatting rule using d3 formatting mini-languages which are very similar to those in Python.
showLineDetermines whether or not a line bounding this axis is drawn.
lineColorSets the axis line color.
lineWidthSets the width (in px) of the axis line.
showGridDetermines whether or not grid lines are drawn.
gridColorSets the color of the grid lines.
gridWidthSets the width (in px) of the grid lines.
zeroLineDetermines whether or not a line is drawn at along the 0 value of this axis.
zeroLineColorSets the line color of the zero line.
zeroLineWidthSets the width (in px) of the zero line.
showDividersDetermines whether or not a dividers are drawn between the category levels of this axis.
dividerColorSets the color of the dividers Only has an effect on multicategory axes.
dividerWidthSets the width (in px) of the dividers Only has an effect on multicategory axes.
anchorIf set to an opposite-letter axis id (e.g.
sideDetermines whether a x (y) axis is positioned at the bottom (left) or top (right) of the plotting area.
overlayingIf set a same-letter axis id, this axis is overlaid on top of the corresponding same-letter axis, with traces and axes visible for both axes.
layerSets the layer on which this axis is displayed.
domainSets the domain of this axis (in plot fraction).
positionSets the position of this axis in the plotting space (in normalized coordinates).
categoryOrderSpecifies the ordering logic for the case of categorical variables.
categoryArraySets the order in which categories on this axis appear.
uiRevisionControls persistence of user-driven changes in axis
range,autorange, andtitleif ineditable: trueconfiguration.rangeSliderrangeSelectorcalendarSets the calendar system to use for
rangeandtick0if this is a date axis.
-
Preset default axis’ customized with the most frequently used properties.
Declaration
Parameters
titlerangeSets the range of this axis.
ticksDetermines whether ticks are drawn or not.
tickAngleSets the angle of the tick labels with respect to the horizontal.
showGridDetermines whether or not grid lines are drawn.
domainSets the domain of this axis (in plot fraction).
-
preset(visible:color: title: type: autoTypeNumbers: autoRange: rangeMode: range: fixedRange: scaleAnchor: scaleRatio: constrain: constrainToward: matches: rangeBreaks: tickMode: numTicks: tick0: dTick: tickValues: tickText: ticks: ticksOn: tickLabelMode: tickLabelPosition: mirror: tickLength: tickWidth: tickColor: showTickLabels: autoMargin: showSpikes: spikeColor: spikeThickness: spikeDash: spikeMode: spikeSnap: tickFont: tickAngle: tickPrefix: showTickPrefix: tickSuffix: showTickSuffix: showExponent: exponentFormat: minExponent: separateThousands: tickFormat: tickFormatStops: hoverFormat: showLine: lineColor: lineWidth: showGrid: gridColor: gridWidth: zeroLine: zeroLineColor: zeroLineWidth: showDividers: dividerColor: dividerWidth: anchor: side: overlaying: layer: domain: position: categoryOrder: categoryArray: uiRevision: calendar: ) Preset default axis’ customized with the specified properties.
Declaration
Swift
public static func preset(visible: Bool? = nil, color: Color? = nil, title: YAxis.Title? = nil, type: YAxis.`Type`? = nil, autoTypeNumbers: AutoTypeNumbers? = nil, autoRange: AutoRange? = nil, rangeMode: RangeMode? = nil, range: InfoArray? = nil, fixedRange: Bool? = nil, scaleAnchor: YAxis.ScaleAnchor? = nil, scaleRatio: Double? = nil, constrain: YAxis.Constrain? = nil, constrainToward: YAxis.ConstrainToward? = nil, matches: YAxis.Matches? = nil, rangeBreaks: [YAxis.RangeBreak]? = nil, tickMode: TickMode? = nil, numTicks: Int? = nil, tick0: Anything? = nil, dTick: Anything? = nil, tickValues: [Double]? = nil, tickText: [Double]? = nil, ticks: Ticks? = nil, ticksOn: YAxis.TicksOn? = nil, tickLabelMode: YAxis.TickLabelMode? = nil, tickLabelPosition: YAxis.TickLabelPosition? = nil, mirror: Mirror? = nil, tickLength: Double? = nil, tickWidth: Double? = nil, tickColor: Color? = nil, showTickLabels: Bool? = nil, autoMargin: Bool? = nil, showSpikes: Bool? = nil, spikeColor: Color? = nil, spikeThickness: Double? = nil, spikeDash: String? = nil, spikeMode: YAxis.SpikeMode? = nil, spikeSnap: YAxis.SpikeSnap? = nil, tickFont: Font? = nil, tickAngle: Angle? = nil, tickPrefix: String? = nil, showTickPrefix: ShowTickPrefix? = nil, tickSuffix: String? = nil, showTickSuffix: ShowTickSuffix? = nil, showExponent: ShowExponent? = nil, exponentFormat: ExponentFormat? = nil, minExponent: Double? = nil, separateThousands: Bool? = nil, tickFormat: String? = nil, tickFormatStops: [TickFormatStop]? = nil, hoverFormat: String? = nil, showLine: Bool? = nil, lineColor: Color? = nil, lineWidth: Double? = nil, showGrid: Bool? = nil, gridColor: Color? = nil, gridWidth: Double? = nil, zeroLine: Bool? = nil, zeroLineColor: Color? = nil, zeroLineWidth: Double? = nil, showDividers: Bool? = nil, dividerColor: Color? = nil, dividerWidth: Double? = nil, anchor: YAxis.Anchor? = nil, side: YAxis.Side? = nil, overlaying: YAxis.Overlaying? = nil, layer: AxisLayer? = nil, domain: InfoArray? = nil, position: Double? = nil, categoryOrder: CategoryOrder? = nil, categoryArray: [Double]? = nil, uiRevision: Anything? = nil, calendar: Calendar? = nil) -> [YAxis]Parameters
visibleA single toggle to hide the axis while preserving interaction like dragging.
colorSets default for all colors associated with this axis all at once: line, font, tick, and grid colors.
titletypeSets the axis type.
autoTypeNumbersUsing strict a numeric string in trace data is not converted to a number.
autoRangeDetermines whether or not the range of this axis is computed in relation to the input data.
rangeModeIf normal, the range is computed in relation to the extrema of the input data.
rangeSets the range of this axis.
fixedRangeDetermines whether or not this axis is zoom-able.
scaleAnchorIf set to another axis id (e.g.
scaleRatioIf this axis is linked to another by
scaleanchor, this determines the pixel to unit scale ratio.constrainIf this axis needs to be compressed (either due to its own
scaleanchorandscaleratioor those of the other axis), determines how that happens: by increasing the range, or by decreasing the domain.constrainTowardIf this axis needs to be compressed (either due to its own
scaleanchorandscaleratioor those of the other axis), determines which direction we push the originally specified plot area.matchesIf set to another axis id (e.g.
rangeBreakstickModeSets the tick mode for this axis.
numTicksSpecifies the maximum number of ticks for the particular axis.
tick0Sets the placement of the first tick on this axis.
dTickSets the step in-between ticks on this axis.
tickValuesSets the values at which ticks on this axis appear.
tickTextSets the text displayed at the ticks position via
tickvals.ticksDetermines whether ticks are drawn or not.
ticksOnDetermines where ticks and grid lines are drawn with respect to their corresponding tick labels.
tickLabelModeDetermines where tick labels are drawn with respect to their corresponding ticks and grid lines.
tickLabelPositionDetermines where tick labels are drawn with respect to the axis Please note that top or bottom has no effect on x axes or when
ticklabelmodeis set to period.mirrorDetermines if the axis lines or/and ticks are mirrored to the opposite side of the plotting area.
tickLengthSets the tick length (in px).
tickWidthSets the tick width (in px).
tickColorSets the tick color.
showTickLabelsDetermines whether or not the tick labels are drawn.
autoMarginDetermines whether long tick labels automatically grow the figure margins.
showSpikesDetermines whether or not spikes (aka droplines) are drawn for this axis.
spikeColorSets the spike color.
spikeThicknessSets the width (in px) of the zero line.
spikeDashSets the dash style of lines.
spikeModeDetermines the drawing mode for the spike line If toaxis, the line is drawn from the data point to the axis the series is plotted on.
spikeSnapDetermines whether spikelines are stuck to the cursor or to the closest datapoints.
tickFontSets the tick font.
tickAngleSets the angle of the tick labels with respect to the horizontal.
tickPrefixSets a tick label prefix.
showTickPrefixIf all, all tick labels are displayed with a prefix.
tickSuffixSets a tick label suffix.
showTickSuffixSame as
showtickprefixbut for tick suffixes.showExponentIf all, all exponents are shown besides their significands.
exponentFormatDetermines a formatting rule for the tick exponents.
minExponentHide SI prefix for 10^n if |n| is below this number.
separateThousandsIf “true”, even 4-digit integers are separated
tickFormatSets the tick label formatting rule using d3 formatting mini-languages which are very similar to those in Python.
tickFormatStopshoverFormatSets the hover text formatting rule using d3 formatting mini-languages which are very similar to those in Python.
showLineDetermines whether or not a line bounding this axis is drawn.
lineColorSets the axis line color.
lineWidthSets the width (in px) of the axis line.
showGridDetermines whether or not grid lines are drawn.
gridColorSets the color of the grid lines.
gridWidthSets the width (in px) of the grid lines.
zeroLineDetermines whether or not a line is drawn at along the 0 value of this axis.
zeroLineColorSets the line color of the zero line.
zeroLineWidthSets the width (in px) of the zero line.
showDividersDetermines whether or not a dividers are drawn between the category levels of this axis.
dividerColorSets the color of the dividers Only has an effect on multicategory axes.
dividerWidthSets the width (in px) of the dividers Only has an effect on multicategory axes.
anchorIf set to an opposite-letter axis id (e.g.
sideDetermines whether a x (y) axis is positioned at the bottom (left) or top (right) of the plotting area.
overlayingIf set a same-letter axis id, this axis is overlaid on top of the corresponding same-letter axis, with traces and axes visible for both axes.
layerSets the layer on which this axis is displayed.
domainSets the domain of this axis (in plot fraction).
positionSets the position of this axis in the plotting space (in normalized coordinates).
categoryOrderSpecifies the ordering logic for the case of categorical variables.
categoryArraySets the order in which categories on this axis appear.
uiRevisionControls persistence of user-driven changes in axis
range,autorange, andtitleif ineditable: trueconfiguration.calendarSets the calendar system to use for
rangeandtick0if this is a date axis.
-
Preset default axis’ customized with the specified properties.
Declaration
Parameters
domainbackgroundColorSet the background color of the subplot
sumThe number each triplet should sum to, and the maximum range of each axis
aAxisbAxiscAxisuiRevisionControls persistence of user-driven changes in axis
minandtitle, if not overridden in the individual axes.
-
preset(backgroundColor:camera: domain: aspectMode: aspectRatio: xAxis: yAxis: zAxis: dragMode: hoverMode: uiRevision: annotations: ) Preset default axis’ customized with the specified properties.
Declaration
Swift
public static func preset(backgroundColor: Color? = nil, camera: Scene.Camera? = nil, domain: Domain? = nil, aspectMode: Scene.AspectMode? = nil, aspectRatio: Scene.AspectRatio? = nil, xAxis: Scene.XAxis? = nil, yAxis: Scene.YAxis? = nil, zAxis: Scene.ZAxis? = nil, dragMode: Scene.DragMode? = nil, hoverMode: Scene.HoverMode? = nil, uiRevision: Anything? = nil, annotations: [Scene.Annotation]? = nil) -> [Scene]Parameters
backgroundColorcameradomainaspectModeIf cube, this scene’s axes are drawn as a cube, regardless of the axes’ ranges.
aspectRatioSets this scene’s axis aspectratio.
xAxisyAxiszAxisdragModeDetermines the mode of drag interactions for this scene.
hoverModeDetermines the mode of hover interactions for this scene.
uiRevisionControls persistence of user-driven changes in camera attributes.
annotations
-
preset(domain:fitBounds: resolution: scope: projection: center: visible: showCoastLines: coastLineColor: coastLineWidth: showLand: landColor: showOcean: oceanColor: showLakes: lakeColor: showRivers: riverColor: riverWidth: showCountries: countryColor: countryWidth: showSubunits: subUnitColor: subUnitWidth: showFrame: frameColor: frameWidth: backgroundColor: longitudeAxis: latitudeAxis: uiRevision: ) Preset default axis’ customized with the specified properties.
Declaration
Swift
public static func preset(domain: Domain? = nil, fitBounds: Geo.FitBounds? = nil, resolution: Geo.Resolution? = nil, scope: Geo.Scope? = nil, projection: Geo.Projection? = nil, center: Geo.Center? = nil, visible: Bool? = nil, showCoastLines: Bool? = nil, coastLineColor: Color? = nil, coastLineWidth: Double? = nil, showLand: Bool? = nil, landColor: Color? = nil, showOcean: Bool? = nil, oceanColor: Color? = nil, showLakes: Bool? = nil, lakeColor: Color? = nil, showRivers: Bool? = nil, riverColor: Color? = nil, riverWidth: Double? = nil, showCountries: Bool? = nil, countryColor: Color? = nil, countryWidth: Double? = nil, showSubunits: Bool? = nil, subUnitColor: Color? = nil, subUnitWidth: Double? = nil, showFrame: Bool? = nil, frameColor: Color? = nil, frameWidth: Double? = nil, backgroundColor: Color? = nil, longitudeAxis: Geo.LongitudeAxis? = nil, latitudeAxis: Geo.LatitudeAxis? = nil, uiRevision: Anything? = nil) -> [Geo]Parameters
domainfitBoundsDetermines if this subplot’s view settings are auto-computed to fit trace data.
resolutionSets the resolution of the base layers.
scopeSet the scope of the map.
projectioncentervisibleSets the default visibility of the base layers.
showCoastLinesSets whether or not the coastlines are drawn.
coastLineColorSets the coastline color.
coastLineWidthSets the coastline stroke width (in px).
showLandSets whether or not land masses are filled in color.
landColorSets the land mass color.
showOceanSets whether or not oceans are filled in color.
oceanColorSets the ocean color
showLakesSets whether or not lakes are drawn.
lakeColorSets the color of the lakes.
showRiversSets whether or not rivers are drawn.
riverColorSets color of the rivers.
riverWidthSets the stroke width (in px) of the rivers.
showCountriesSets whether or not country boundaries are drawn.
countryColorSets line color of the country boundaries.
countryWidthSets line width (in px) of the country boundaries.
showSubunitsSets whether or not boundaries of subunits within countries (e.g.
subUnitColorSets the color of the subunits boundaries.
subUnitWidthSets the stroke width (in px) of the subunits boundaries.
showFrameSets whether or not a frame is drawn around the map.
frameColorSets the color the frame.
frameWidthSets the stroke width (in px) of the frame.
backgroundColorSet the background color of the map
longitudeAxislatitudeAxisuiRevisionControls persistence of user-driven changes in the view (projection and center).
-
Preset default axis’ customized with the specified properties.
Declaration
Parameters
domainaccessTokenSets the mapbox access token to be used for this mapbox map.
styleDefines the map layers that are rendered by default below the trace layers defined in
data, which are themselves by default rendered below the layers defined inlayout.mapbox.layers.centerzoomSets the zoom level of the map (mapbox.zoom).
bearingSets the bearing angle of the map in degrees counter-clockwise from North (mapbox.bearing).
pitchSets the pitch angle of the map (in degrees, where 0 means perpendicular to the surface of the map) (mapbox.pitch).
layersuiRevisionControls persistence of user-driven changes in the view:
center,zoom,bearing,pitch.
-
Preset default axis’ customized with the specified properties.
Declaration
Parameters
domainsectorSets angular span of this polar subplot with two angles (in degrees).
holeSets the fraction of the radius to cut out of the polar subplot.
backgroundColorSet the background color of the subplot
radialAxisangularAxisgridShapeDetermines if the radial axis grid lines and angular axis line are drawn as circular sectors or as linear (polygon) sectors.
uiRevisionControls persistence of user-driven changes in axis attributes, if not overridden in the individual axes.
-
Preset default axis’ customized with the specified properties.
Declaration
Swift
public static func preset(cAuto: Bool? = nil, cMin: Double? = nil, cMax: Double? = nil, cMiddle: Double? = nil, colorScale: ColorScale? = nil, autoColorScale: Bool? = nil, reverseScale: Bool? = nil, showScale: Bool? = nil, colorBar: ColorBar? = nil) -> [ColorAxis]Parameters
cAutoDetermines whether or not the color domain is computed with respect to the input data (here corresponding trace color array(s)) or the bounds set in
cminandcmaxDefaults tofalsewhencminandcmaxare set by the user.cMinSets the lower bound of the color domain.
cMaxSets the upper bound of the color domain.
cMiddleSets the mid-point of the color domain by scaling
cminand/orcmaxto be equidistant to this point.colorScaleSets the colorscale.
autoColorScaleDetermines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale.reverseScaleReverses the color mapping if true.
showScaleDetermines whether or not a colorbar is displayed for this trace.
colorBar
-
Undocumented
Declaration
Swift
public func encode(toPlotly encoder: Encoder) throws
View on GitHub
Install in Dash
Array Extension Reference