Skip to content

crossbar ​

Makie.crossbar Function
julia
crossbar(x, y, ymin, ymax; kwargs...)

Draw a crossbar. A crossbar represents a range with a (potentially notched) box. It is most commonly used as part of the boxplot.

Arguments

  • x: position of the box

  • y: position of the midline within the box

  • ymin: lower limit of the box

  • ymax: upper limit of the box

Plot type

The plot type alias for the crossbar function is CrossBar.

source

Examples ​

julia
using CairoMakie
xs = [1, 1, 2, 2, 3, 3]
ys = rand(6)
ymins = ys .- 1
ymaxs = ys .+ 1
dodge = [1, 2, 1, 2, 1, 2]

crossbar(xs, ys, ymins, ymaxs, dodge = dodge, show_notch = true)

Attributes ​

color ​

Defaults to @inherit patchcolor

No docs available.

colormap ​

Defaults to @inherit colormap

No docs available.

colorrange ​

Defaults to automatic

No docs available.

colorscale ​

Defaults to identity

No docs available.

cycle ​

Defaults to [:color => :patchcolor]

No docs available.

dodge ​

Defaults to automatic

No docs available.

dodge_gap ​

Defaults to 0.03

No docs available.

gap ​

Defaults to 0.2

Shrinking factor, width -> width * (1 - gap).

inspectable ​

Defaults to @inherit inspectable

No docs available.

midlinecolor ​

Defaults to automatic

No docs available.

midlinewidth ​

Defaults to @inherit linewidth

No docs available.

n_dodge ​

Defaults to automatic

No docs available.

notchmax ​

Defaults to automatic

Upper limit of the notch.

notchmin ​

Defaults to automatic

Lower limit of the notch.

notchwidth ​

Defaults to 0.5

Multiplier of width for narrowest width of notch.

orientation ​

Defaults to :vertical

Orientation of box (:vertical or :horizontal).

show_midline ​

Defaults to true

Show midline.

show_notch ​

Defaults to false

Whether to draw the notch.

strokecolor ​

Defaults to @inherit patchstrokecolor

No docs available.

strokewidth ​

Defaults to @inherit patchstrokewidth

No docs available.

width ​

Defaults to automatic

Width of the box before shrinking.