MakieDraw
Documentation for MakieDraw.
MakieDraw.CanvasSelect — TypeCanvasSelect <: AbstractCanvasSelect
CanvasSelect(figure; [layers])A menu widget for selecting active canvases.
It will deactivate all non-selected canvases, and select the active one.
Arguments
figure::Union{Figure,GridPosition}a Figure orGridPosition.
Keywords
layers: ADict{Symbol,Orbservable{Bool}}where the Symbols are the names that will appear in theMenu, and the Observables are the initial
Example
using MakieDraw, GLMakie
layers = Dict(
    :paint=>paint_canvas.active,
    :point=>point_canvas.active,
    :line=>line_canvas.active,
    :poly=>poly_canvas.active,
)
fig = Figure()
cs = CanvasSelect(fig[2, 1]; layers)MakieDraw.GeometryCanvas — TypeGeometryCanvas{T<:GeometryBasics.Geometry} <: AbstractCanvas
GeometryCanvas{T}(; kw...)A canvas for drawing GeometryBasics.jl geometries onto a Makie.jl Axis.
T must be Point, LineString or Polygon.
Mouse and Key commands
- Left click select point, or add point with property 1 if 
click_propertyis set. - Rick click select point, or add point with property 2 if 
click_propertyis set. - Middle click select point, or add point with property 3 if 
click_propertyis set. - Alt+click: delete points, dragging will click is held will continue deleting.
 - Shift+click: start new polygons and linstrings on 
PolygonandLineStringcanvas. Has no effect forPoint. - Delete: delete selected points.
 - Shift+Delete: delete selected linestring/polygon.
 
Keywords
dragging: an Observable{Bool}(false) to track mouse dragging.active: an Observable{Bool}(true) to set if the canvas is active.accuracy_scale: control how accurate selection needs to be.1.0by default.name: ASymbol: name for the canvas. Will appear in aCanvasSelect.propertynames: names for feaure properties to create.properties: an existin table of properties.click_property: which property is set with left and right click, shold be aBool.figure: a figure to plot on.axis: an axis to plot on.current_point: an observable to track the currently focused point index.scatter_kw: keywords to pass toscatter.lines_kw: keywords to pass tolines.poly_kw: keywords to pass topoly.current_point_kw: keywords for the current pointscatter.show_current_point: whether to show the current point differently to the other.text_input: wether to add text input boxes for property input.
MakieDraw.PaintCanvas — TypePaintCanvas <: AbstractCanvas
PaintCanvas(; kw...)
PaintCanvas(f, data; kw...)A canvas for painting into a Matrix Real numbers or colors.
Arguments
data: anAbstractMatrixthat will plot withMakie.image!, or your functionff: a function, likeimage!orheatmap!,that will plotf(axis, dimsions..., data)ontoaxis.
Keywords
dimension: the dimesion ticks of data.axes(data)by default.drawing: an Observable{Bool}(false) to track if drawing is occuring.drawbutton: the currently clicked mouse button while drawing, e.g. Mouse.left.active: an Observable{Bool}(true) to set if the canvas is active.name: ASymbol: name for the canvas. Will appear in aCanvasSelect.figure: a figure to plot on.axis: an axis to plot on.fill_left: Observable value for left click drawing.fill_right: Observable value for right click drawing.fill_middle: Observable value for middle click drawing.
Mouse and Key commands
- Left click/drag: draw with value of 
fill_left - Right click/drag: draw with value of 
fill_right - Middle click/drag: draw with value of 
fill_middle 
MakieDraw.arrow_key_navigation — Methodarrow_key_navigation(fig, axis)Allow moving the axis with keyboard arrow keys.