Guides

Very similar to Geometries are guides, which draw graphics supporting the actual visualization, such as axis ticks, axis labels, and color keys. The major distinction is that geometries always draw within the rectangular plot frame, while guides have some special layout considerations.

Gadfly.Guide.annotationType
Guide.annotation(ctx::Compose.Context)

Overlay a plot with an arbitrary Compose graphic. The context will inherit the plot's coordinate system, unless overridden with a custom unit box.

source
Gadfly.Guide.colorkeyType
Guide.colorkey[(; title=nothing, labels=nothing, pos=nothing)]
Guide.colorkey(title, labels, pos)

Enable control of the auto-generated colorkey. Set the colorkey title for any plot, and the item labels for plots with a discrete color scale. pos overrides Theme(key_position=) and can be in either relative (e.g. [0.7w, 0.2h] is the lower right quadrant), absolute (e.g. [0mm, 0mm]), or plot scale (e.g. [0,0]) coordinates.

source
Gadfly.Guide.shapekeyType
Guide.shapekey[(; title="Shape", labels=String[], pos=Float64[])]
Guide.shapekey(title, labels, pos)

Enable control of the auto-generated shapekey. Set the key title and the item labels. pos overrides Theme(key_position=) and can be in either relative (e.g. [0.7w, 0.2h] is the lower right quadrant), absolute (e.g. [0mm, 0mm]), or plot scale (e.g. [0,0]) coordinates. Guide.shapekey(nothing) will hide the key.

source
Gadfly.Guide.sizekeyType
Guide.sizekey[(; title="size", labels=String[], pos=[])]
Guide.sizekey(title, labels, pos)

Enable control of the sizekey. Set the key title and the item labels. pos overrides Theme(key_position=) and can be in either relative (e.g. [0.7w, 0.2h] is the lower right quadrant), absolute (e.g. [0mm, 0mm]), or plot scale (e.g. [0,0]) coordinates. Currently Guide.sizekey will only work by adding Scale.size_discrete2 to the plot. Guide.sizekey(nothing) will hide the key.

source
Gadfly.Guide.xlabelType
Guide.xlabel(label, orientation=:auto)

Sets the x-axis label for the plot. label is either a String or nothing. orientation can also be :horizontal or :vertical.

source
Gadfly.Guide.xrugType
Guide.xrug

Draw a short vertical lines along the x-axis of a plot at the positions in the x aesthetic.

source
Gadfly.Guide.xticksType
Guide.xticks[(; label=true, ticks=:auto, orientation=:auto)]
Guide.xticks(label, ticks, orientation)

Formats the tick marks and labels for the x-axis. label toggles the label visibility. ticks can also be an array of locations, or nothing. orientation can also be :horizontal or :vertical.

source
Gadfly.Guide.ylabelType
Guide.ylabel(label, orientation=:auto)

Sets the y-axis label for the plot. label is either a String or nothing. orientation can also be :horizontal or :vertical.

source
Gadfly.Guide.yrugType
Guide.yrug

Draw short horizontal lines along the y-axis of a plot at the positions in the 'y' aesthetic.

source
Gadfly.Guide.yticksType
Guide.yticks[(; label=true, ticks=:auto, orientation=:horizontal)]
Guide.yticks(ticks, label, orientation)

Formats the tick marks and labels for the y-axis. label toggles the label visibility. ticks can also be an array of locations, or nothing. orientation can also be :auto or :vertical.

source
Gadfly.Guide.manual_discrete_keyMethod
Guide.manual_discrete_key(title::String, labels::Vector{String};
    pos=[], color=Colorant[], shape=Function[], size=Measure[])

Manually define a discrete key with the legend title and labels, and swatch color, shape and size. The swatch aesthetics can be Vectors of specific types (as above), or integer ranges. Integer ranges refer to the order of items in the discrete Theme palettes Discrete Scales. Set the key position inside using pos (see Guide.sizekey, Guide.shapekey).

source