API
Makie.ABLines Type
ABLines
is the plot type associated with plotting function ablines
. Check the docstring for ablines
for further information.
Makie.Absolute Type
Absolute
Force transformation to be absolute, not relative to the current state. This is the default setting.
Makie.AmbientLight Type
AmbientLight(color) <: AbstractLight
A simple ambient light that uniformly lights every object based on its light color.
Availability:
- All backends with
shading = FastShading
orMultiLightShading
Makie.Annotations Type
Annotations
is the plot type associated with plotting function annotations
. Check the docstring for annotations
for further information.
Makie.Arc Type
Arc
is the plot type associated with plotting function arc
. Check the docstring for arc
for further information.
Makie.Axis Type
Makie.Axis <: Block
A 2D axis which can be plotted into.
Constructors
Axis(fig_or_scene; palette = nothing, kwargs...)
Attributes
(type ?Makie.Axis.x
in the REPL for more information about attribute x
)
alignmode
, aspect
, autolimitaspect
, backgroundcolor
, bottomspinecolor
, bottomspinevisible
, dim1_conversion
, dim2_conversion
, flip_ylabel
, halign
, height
, leftspinecolor
, leftspinevisible
, limits
, panbutton
, rightspinecolor
, rightspinevisible
, spinewidth
, subtitle
, subtitlecolor
, subtitlefont
, subtitlegap
, subtitlelineheight
, subtitlesize
, subtitlevisible
, tellheight
, tellwidth
, title
, titlealign
, titlecolor
, titlefont
, titlegap
, titlelineheight
, titlesize
, titlevisible
, topspinecolor
, topspinevisible
, valign
, width
, xautolimitmargin
, xaxisposition
, xgridcolor
, xgridstyle
, xgridvisible
, xgridwidth
, xlabel
, xlabelcolor
, xlabelfont
, xlabelpadding
, xlabelrotation
, xlabelsize
, xlabelvisible
, xminorgridcolor
, xminorgridstyle
, xminorgridvisible
, xminorgridwidth
, xminortickalign
, xminortickcolor
, xminorticks
, xminorticksize
, xminorticksvisible
, xminortickwidth
, xpankey
, xpanlock
, xrectzoom
, xreversed
, xscale
, xtickalign
, xtickcolor
, xtickformat
, xticklabelalign
, xticklabelcolor
, xticklabelfont
, xticklabelpad
, xticklabelrotation
, xticklabelsize
, xticklabelspace
, xticklabelsvisible
, xticks
, xticksize
, xticksmirrored
, xticksvisible
, xtickwidth
, xtrimspine
, xzoomkey
, xzoomlock
, yautolimitmargin
, yaxisposition
, ygridcolor
, ygridstyle
, ygridvisible
, ygridwidth
, ylabel
, ylabelcolor
, ylabelfont
, ylabelpadding
, ylabelrotation
, ylabelsize
, ylabelvisible
, yminorgridcolor
, yminorgridstyle
, yminorgridvisible
, yminorgridwidth
, yminortickalign
, yminortickcolor
, yminorticks
, yminorticksize
, yminorticksvisible
, yminortickwidth
, ypankey
, ypanlock
, yrectzoom
, yreversed
, yscale
, ytickalign
, ytickcolor
, ytickformat
, yticklabelalign
, yticklabelcolor
, yticklabelfont
, yticklabelpad
, yticklabelrotation
, yticklabelsize
, yticklabelspace
, yticklabelsvisible
, yticks
, yticksize
, yticksmirrored
, yticksvisible
, ytickwidth
, ytrimspine
, yzoomkey
, yzoomlock
, zoombutton
Makie.Axis3 Type
Makie.Axis3 <: Block
No docstring defined.
Attributes
(type ?Makie.Axis3.x
in the REPL for more information about attribute x
)
alignmode
, aspect
, azimuth
, backgroundcolor
, dim1_conversion
, dim2_conversion
, dim3_conversion
, elevation
, halign
, height
, limits
, perspectiveness
, protrusions
, targetlimits
, tellheight
, tellwidth
, title
, titlealign
, titlecolor
, titlefont
, titlegap
, titlesize
, titlevisible
, valign
, viewmode
, width
, xautolimitmargin
, xgridcolor
, xgridvisible
, xgridwidth
, xlabel
, xlabelalign
, xlabelcolor
, xlabelfont
, xlabeloffset
, xlabelrotation
, xlabelsize
, xlabelvisible
, xreversed
, xspinecolor_1
, xspinecolor_2
, xspinecolor_3
, xspinesvisible
, xspinewidth
, xtickcolor
, xtickformat
, xticklabelcolor
, xticklabelfont
, xticklabelpad
, xticklabelsize
, xticklabelsvisible
, xticks
, xticksize
, xticksvisible
, xtickwidth
, xypanelcolor
, xypanelvisible
, xzpanelcolor
, xzpanelvisible
, yautolimitmargin
, ygridcolor
, ygridvisible
, ygridwidth
, ylabel
, ylabelalign
, ylabelcolor
, ylabelfont
, ylabeloffset
, ylabelrotation
, ylabelsize
, ylabelvisible
, yreversed
, yspinecolor_1
, yspinecolor_2
, yspinecolor_3
, yspinesvisible
, yspinewidth
, ytickcolor
, ytickformat
, yticklabelcolor
, yticklabelfont
, yticklabelpad
, yticklabelsize
, yticklabelsvisible
, yticks
, yticksize
, yticksvisible
, ytickwidth
, yzpanelcolor
, yzpanelvisible
, zautolimitmargin
, zgridcolor
, zgridvisible
, zgridwidth
, zlabel
, zlabelalign
, zlabelcolor
, zlabelfont
, zlabeloffset
, zlabelrotation
, zlabelsize
, zlabelvisible
, zreversed
, zspinecolor_1
, zspinecolor_2
, zspinecolor_3
, zspinesvisible
, zspinewidth
, ztickcolor
, ztickformat
, zticklabelcolor
, zticklabelfont
, zticklabelpad
, zticklabelsize
, zticklabelsvisible
, zticks
, zticksize
, zticksvisible
, ztickwidth
Makie.Band Type
Band
is the plot type associated with plotting function band
. Check the docstring for band
for further information.
Makie.BarPlot Type
BarPlot
is the plot type associated with plotting function barplot
. Check the docstring for barplot
for further information.
Makie.BezierPath Type
BezierPath(commands::Vector)
Construct a BezierPath
with a vector of path commands. The available path commands are
MoveTo
LineTo
CurveTo
EllipticalArc
ClosePath
A BezierPath
can be used in certain places in Makie as an alternative to a polygon or a collection of lines, for example as an input to poly
or lines
, or as a marker
for scatter
.
The benefit of using a BezierPath
is that curves do not need to be converted into a vector of vertices by the user. CairoMakie can use the path commands directly when it writes vector graphics which is more efficient and uses less space than approximating them visually using line segments.
Makie.BezierPath Method
BezierPath(svg::AbstractString; fit = false, bbox = nothing, flipy = false, flipx = false, keep_aspect = true)
Construct a BezierPath
using a string of SVG path commands. The commands will be parsed first into MoveTo
, LineTo
, CurveTo
, EllipticalArc
and ClosePath
objects which are then passed to the BezierPath
constructor.
If fit === true
, the path will be scaled to fit into a square of width 1 centered on the origin. If, additionally, bbox
is set to some Rect
, the path will be fit into this rectangle instead. If you want to use a path as a scatter marker, it is usually good to fit it so that it's centered and of a comparable size relative to other scatter markers.
If flipy === true
or flipx === true
, the respective dimensions of the path will be flipped. Makie uses a coordinate system where y=0 is at the bottom and y increases upwards while in SVG, y=0 is at the top and y increases downwards, so for most SVG paths flipy = true
will be needed.
If keep_aspect === true
, the path will be fit into the bounding box such that its longer dimension fits and the other one is scaled to retain the original aspect ratio. If you set keep_aspect = false
, the new boundingbox of the path will be the one it is fit to, but note that this can result in a squished appearance.
Example
Construct a triangular BezierPath
out of a path command string and use it as a scatter marker:
str = "M 0,0 L 10,0 L 5,10 z"
bp = BezierPath(str, fit = true)
scatter(1:10, marker = bp, markersize = 20)
Makie.Box Type
Makie.Box <: Block
No docstring defined.
Attributes
(type ?Makie.Box.x
in the REPL for more information about attribute x
)
alignmode
, color
, cornerradius
, halign
, height
, linestyle
, strokecolor
, strokevisible
, strokewidth
, tellheight
, tellwidth
, valign
, visible
, width
Makie.BoxPlot Type
BoxPlot
is the plot type associated with plotting function boxplot
. Check the docstring for boxplot
for further information.
Makie.Bracket Type
Bracket
is the plot type associated with plotting function bracket
. Check the docstring for bracket
for further information.
Makie.Button Type
Makie.Button <: Block
No docstring defined.
Attributes
(type ?Makie.Button.x
in the REPL for more information about attribute x
)
alignmode
, buttoncolor
, buttoncolor_active
, buttoncolor_hover
, clicks
, cornerradius
, cornersegments
, font
, fontsize
, halign
, height
, label
, labelcolor
, labelcolor_active
, labelcolor_hover
, padding
, strokecolor
, strokewidth
, tellheight
, tellwidth
, valign
, width
Makie.Camera Type
Camera(pixel_area)
Struct to hold all relevant matrices and additional parameters, to let backends apply camera based transformations.
Fields
pixel_space::Observable{StaticArraysCore.SMatrix{4, 4, Float64, 16}}
: projection used to convert pixel to device unitsview::Observable{StaticArraysCore.SMatrix{4, 4, Float64, 16}}
: View matrix is usually used to rotate, scale and translate the sceneprojection::Observable{StaticArraysCore.SMatrix{4, 4, Float64, 16}}
: Projection matrix is used for any perspective transformationprojectionview::Observable{StaticArraysCore.SMatrix{4, 4, Float64, 16}}
: just projection * viewresolution::Observable{Vec{2, Float32}}
: resolution of the canvas this camera draws toview_direction::Observable{Vec{3, Float32}}
: Direction in which the camera looks.eyeposition::Observable{Vec{3, Float32}}
: Eye position of the camera, used for e.g. ray tracing.upvector::Observable{Vec{3, Float32}}
: Up direction of the current camera (e.g. Vec3f(0, 1, 0) for 2d)steering_nodes::Vector{Observables.ObserverFunction}
: To make camera interactive, steering observables are connected to the different matrices. We need to keep track of them, so, that we can connect and disconnect them.calculated_values::Dict{Symbol, Observable}
Makie.Camera3D Method
Camera3D(scene[; kwargs...])
Sets up a 3D camera with mouse and keyboard controls.
The behavior of the camera can be adjusted via keyword arguments or the fields settings
and controls
.
Settings
Settings include anything that isn't a mouse or keyboard button.
projectiontype = Perspective
sets the type of the projection. Can beOrthographic
orPerspective
.rotation_center = :lookat
sets the default center for camera rotations. Currently allows:lookat
or:eyeposition
.fixed_axis = true
: If true panning uses the (world/plot) z-axis instead of the camera up direction.zoom_shift_lookat = true
: If true keeps the data under the cursor when zooming.cad = false
: If true rotates the view aroundlookat
when zooming off-center.clipping_mode = :adaptive
: Controls hownear
andfar
get processed. Options::static
passesnear
andfar
as is:adaptive
scalesnear
bynorm(eyeposition - lookat)
and passesfar
as is:view_relative
scalesnear
andfar
bynorm(eyeposition - lookat)
:bbox_relative
scalesnear
andfar
to the scene bounding box as passed to the camera withupdate_cam!(..., bbox)
. (More specificallyfar = 1
is scaled to the furthest point of a bounding sphere andnear
is generally overwritten to be the closest point.)
center = true
: Controls whether the camera placement gets reset when callingcenter!(scene)
, which is called when a new plot is added.keyboard_rotationspeed = 1.0
sets the speed of keyboard based rotations.keyboard_translationspeed = 0.5
sets the speed of keyboard based translations.keyboard_zoomspeed = 1.0
sets the speed of keyboard based zooms.mouse_rotationspeed = 1.0
sets the speed of mouse rotations.mouse_translationspeed = 0.5
sets the speed of mouse translations.mouse_zoomspeed = 1.0
sets the speed of mouse zooming (mousewheel).circular_rotation = (false, false, false)
enables circular rotations for (fixed x, fixed y, fixed z) rotation axis. (This means drawing a circle with your mouse around the center of the scene will result in a continuous rotation.)
Controls
Controls include any kind of hotkey setting.
up_key = Keyboard.r
sets the key for translations towards the top of the screen.down_key = Keyboard.f
sets the key for translations towards the bottom of the screen.left_key = Keyboard.a
sets the key for translations towards the left of the screen.right_key = Keyboard.d
sets the key for translations towards the right of the screen.forward_key = Keyboard.w
sets the key for translations into the screen.backward_key = Keyboard.s
sets the key for translations out of the screen.zoom_in_key = Keyboard.u
sets the key for zooming into the scene (translate eyeposition towards lookat).zoom_out_key = Keyboard.o
sets the key for zooming out of the scene (translate eyeposition away from lookat).increase_fov_key = Keyboard.b
sets the key for increasing the fov.decrease_fov_key = Keyboard.n
sets the key for decreasing the fov.pan_left_key = Keyboard.j
sets the key for rotations around the screens vertical axis.pan_right_key = Keyboard.l
sets the key for rotations around the screens vertical axis.tilt_up_key = Keyboard.i
sets the key for rotations around the screens horizontal axis.tilt_down_key = Keyboard.k
sets the key for rotations around the screens horizontal axis.roll_clockwise_key = Keyboard.e
sets the key for rotations of the screen.roll_counterclockwise_key = Keyboard.q
sets the key for rotations of the screen.fix_x_key = Keyboard.x
sets the key for fixing translations and rotations to the (world/plot) x-axis.fix_y_key = Keyboard.y
sets the key for fixing translations and rotations to the (world/plot) y-axis.fix_z_key = Keyboard.z
sets the key for fixing translations and rotations to the (world/plot) z-axis.reset = Keyboard.left_control & Mouse.left
sets the key for resetting the camera. This equivalent to callingcenter!(scene)
.reposition_button = Keyboard.left_alt & Mouse.left
sets the key for focusing the camera on a plot object.translation_button = Mouse.right
sets the mouse button for drag-translations. (up/down/left/right)scroll_mod = true
sets an additional modifier button for scroll-based zoom. (true being neutral)rotation_button = Mouse.left
sets the mouse button for drag-rotations. (pan, tilt)
Other kwargs
Some keyword arguments are used to initialize fields. These include
eyeposition = Vec3d(3)
: The position of the camera.lookat = Vec3d(0)
: The point the camera is focused on.upvector = Vec3d(0, 0, 1)
: The world direction corresponding to the up direction of the screen.fov = 45.0
is the field of view. This is irrelevant if the camera uses an orthographic projection.near = automatic
sets the position of the near clip plane. Anything between the camera and the near clip plane is hidden. Must be greater 0. Usage depends onclipping_mode
.far = automatic
sets the position of the far clip plane. Anything further away than the far clip plane is hidden. Usage depends onclipping_mode
. Defaults to1
forclipping_mode = :bbox_relative
,2
for:view_relative
or a value derived from limits for:static
.
Note that updating these observables in an active camera requires a call to update_cam(scene)
for them to be applied. For updating eyeposition
, lookat
and/or upvector update_cam!(scene, eyeposition, lookat, upvector = Vec3d(0,0,1))
is preferred.
The camera position and orientation can also be adjusted via the functions
translate_cam!(scene, v)
will translate the camera by the given world/plot space vectorv
.rotate_cam!(scene, angles)
will rotate the camera around its axes with the corresponding angles. The first angle will rotate around the cameras "right" that is the screens horizontal axis, the second around the up vector/vertical axis orVec3d(0, 0, +-1)
iffixed_axis = true
, and the third will rotate around the view direction i.e. the axis out of the screen. The rotation respects the currentrotation_center
of the camera.zoom!(scene, zoom_step)
will change the zoom level of the scene without translating or rotating the scene.zoom_step
applies multiplicatively tocam.zoom_mult
which is used as a multiplier to the fov (perspective projection) or width and height (orthographic projection).
Makie.Categorical Type
Categorical(colormaplike)
Accepts all colormap values that the colormap
attribute of a plot accepts. Will make sure to map one value to one color and create the correct Colorbar for the plot.
Example:
fig, ax, pl = barplot(1:3; color=1:3, colormap=Makie.Categorical(:viridis))
Warning
This feature might change outside breaking releases, since the API is not yet finalized
Makie.Checkbox Type
Makie.Checkbox <: Block
No docstring defined.
Attributes
(type ?Makie.Checkbox.x
in the REPL for more information about attribute x
)
alignmode
, checkboxcolor_checked
, checkboxcolor_unchecked
, checkboxstrokecolor_checked
, checkboxstrokecolor_unchecked
, checkboxstrokewidth
, checked
, checkmark
, checkmarkcolor_checked
, checkmarkcolor_unchecked
, checkmarksize
, halign
, height
, onchange
, roundness
, size
, tellheight
, tellwidth
, valign
, width
Makie.ClosePath Type
ClosePath()
A path command for use within a BezierPath
which closes the current subpath. The resulting path will have an implicit line segment between the last point and the first point if they do not match.
Makie.Colorbar Type
Makie.Colorbar <: Block
Create a colorbar that shows a continuous or categorical colormap with ticks chosen according to the colorrange.
You can set colorrange and colormap manually, or pass a plot object as the second argument to copy its respective attributes.
Constructors
Colorbar(fig_or_scene; kwargs...)
Colorbar(fig_or_scene, plot::AbstractPlot; kwargs...)
Colorbar(fig_or_scene, heatmap::Union{Heatmap, Image}; kwargs...)
Colorbar(fig_or_scene, contourf::Makie.Contourf; kwargs...)
Attributes
(type ?Makie.Colorbar.x
in the REPL for more information about attribute x
)
alignmode
, bottomspinecolor
, bottomspinevisible
, colormap
, colorrange
, flip_vertical_label
, flipaxis
, halign
, height
, highclip
, label
, labelcolor
, labelfont
, labelpadding
, labelrotation
, labelsize
, labelvisible
, leftspinecolor
, leftspinevisible
, limits
, lowclip
, minortickalign
, minortickcolor
, minorticks
, minorticksize
, minorticksvisible
, minortickwidth
, nsteps
, rightspinecolor
, rightspinevisible
, scale
, size
, spinewidth
, tellheight
, tellwidth
, tickalign
, tickcolor
, tickformat
, ticklabelalign
, ticklabelcolor
, ticklabelfont
, ticklabelpad
, ticklabelrotation
, ticklabelsize
, ticklabelspace
, ticklabelsvisible
, ticks
, ticksize
, ticksvisible
, tickwidth
, topspinecolor
, topspinevisible
, valign
, vertical
, width
Makie.Contour Type
Contour
is the plot type associated with plotting function contour
. Check the docstring for contour
for further information.
Makie.Contour3d Type
Contour3d
is the plot type associated with plotting function contour3d
. Check the docstring for contour3d
for further information.
Makie.Contourf Type
Contourf
is the plot type associated with plotting function contourf
. Check the docstring for contourf
for further information.
Makie.CrossBar Type
CrossBar
is the plot type associated with plotting function crossbar
. Check the docstring for crossbar
for further information.
Makie.CurveTo Type
CurveTo(c1::VecTypes, c2::VecTypes, p::VecTypes)
CurveTo(cx1::Real, cy1::Real, cx2::Real, cy2::Real, px::Real, py::Real)
A path command for use within a BezierPath
which continues the current subpath with a cubic bezier curve to point p
, with the first control point c1
and the second control point c2
.
Makie.Cycled Type
Cycled(i::Int)
If a Cycled
value is passed as an attribute to a plotting function, it is replaced with the value from the cycler for this attribute (as long as there is one defined) at the index i
.
Makie.DataInspector Method
DataInspector(figure_axis_or_scene = current_figure(); kwargs...)
Creates a data inspector which will show relevant information in a tooltip when you hover over a plot.
This functionality can be disabled on a per-plot basis by setting plot.inspectable[] = false
. The displayed text can be adjusted by setting plot.inspector_label
to a function (plot, index, position) -> "my_label"
returning a label. See Makie documentation for more detail.
Keyword Arguments:
range = 10
: Controls the snapping range for selecting an element of a plot.priority = 100
: The priority of creating a tooltip on a mouse movement or scrolling event.enabled = true
: Disables inspection of plots when set to false. Can also be adjusted withenable!(inspector)
anddisable!(inspector)
.indicator_color = :red
: Color of the selection indicator.indicator_linewidth = 2
: Linewidth of the selection indicator.indicator_linestyle = nothing
: Linestyle of the selection indicatorenable_indicators = true)
: Enables or disables indicatorsdepth = 9e3
: Depth value of the tooltip. This should be high so that the tooltip is always in front.apply_tooltip_offset = true
: Enables or disables offsetting tooltips based on, for example, markersize.and all attributes from
Tooltip
Makie.DataShader Type
DataShader
is the plot type associated with plotting function datashader
. Check the docstring for datashader
for further information.
Makie.Density Type
Density
is the plot type associated with plotting function density
. Check the docstring for density
for further information.
Makie.DirectionalLight Type
DirectionalLight(color, direction[, camera_relative = false])
A light type which simulates a distant light source with parallel light rays going in the given direction
.
Availability:
- All backends with
shading = FastShading
orMultiLightShading
Makie.ECDFPlot Type
ECDFPlot
is the plot type associated with plotting function ecdfplot
. Check the docstring for ecdfplot
for further information.
Makie.EllipticalArc Type
EllipticalArc(c::VecTypes, r1::Real, r2::Real, angle::Real, a1::Real, a2::Real)
EllipticalArc(cx::Real, cy::Real, r1::Real, r2::Real, angle::Real, a1::Real, a2::Real)
A path command for use within a BezierPath
which continues the current subpath with an elliptical arc. The ellipse is centered at c
and has two radii, r1
and r2
, the orientation of which depends on angle
.
If angle == 0
, r1
goes in x direction and r2
in y direction. A positive angle
in radians rotates the ellipse counterclockwise, and a negative angle
clockwise.
The angles a1
and a2
are the start and stop positions of the arc on the ellipse. A value of 0
is where the radius r1
points to, pi/2
is where the radius r2
points to, and so on. If a2 > a1
, the arc turns counterclockwise. If a1 > a2
, it turns clockwise.
If the last position of the subpath does not equal the start of the arc, the resulting path will have an implicit line segment between the two.
Makie.EllipticalArc Method
EllipticalArc(x1::Real, y1::Real, x2::Real, y2::Real, rx::Real, ry::Real, ϕ::Real, largearc::Bool, sweepflag::Bool)
Construct an EllipticalArc
using the endpoint parameterization.
x1, y1
is the starting point and x2, y2
the end point, rx
and ry
are the two ellipse radii. ϕ
is the angle of rx
vs the x axis.
Usually, four arcs can be constructed between two points given these ellipse parameters. One of them is chosen using two boolean flags:
If largearc === true
, the arc will be longer than 180 degrees. If sweepflag === true
, the arc will sweep through increasing angles.
Makie.EnvironmentLight Type
EnvironmentLight(intensity, image)
An environment light that uses a spherical environment map to provide lighting. See: https://en.wikipedia.org/wiki/Reflection_mapping
Availability:
- RPRMakie
Makie.Errorbars Type
Errorbars
is the plot type associated with plotting function errorbars
. Check the docstring for errorbars
for further information.
Makie.Events Type
This struct provides accessible Observable
s to monitor the events associated with a Scene.
Functions that act on an Observable
must return Consume()
if the function consumes an event. When an event is consumed it does not trigger other observer functions. The order in which functions are executed can be controlled via the priority
keyword (default 0) in on
.
Example:
on(events(scene).mousebutton, priority = 20) do event
if is_correct_event(event)
do_something()
return Consume()
end
return
end
Fields
window_area::Observable{GeometryBasics.HyperRectangle{2, Int64}}
: The area of the window in pixels, as aRect2
.window_dpi::Observable{Float64}
: The DPI resolution of the window, as aFloat64
.window_open::Observable{Bool}
: The state of the window (open => true, closed => false).mousebutton::Observable{Makie.MouseButtonEvent}
: Most recently triggeredMouseButtonEvent
. Contains the relevantevent.button
andevent.action
(press/release) See alsoispressed
.mousebuttonstate::Set{Makie.Mouse.Button}
: A Set of all currently pressed mousebuttons.mouseposition::Observable{Tuple{Float64, Float64}}
: The position of the mouse as aNTuple{2, Float64}
. Updates once per event poll/frame.scroll::Observable{Tuple{Float64, Float64}}
: The direction of scrollkeyboardbutton::Observable{Makie.KeyEvent}
: Most recently triggeredKeyEvent
. Contains the relevantevent.key
andevent.action
(press/repeat/release) See alsoispressed
.keyboardstate::Set{Makie.Keyboard.Button}
: Contains all currently pressed keys.unicode_input::Observable{Char}
: Contains the last typed character.dropped_files::Observable{Vector{String}}
: Contains a list of filepaths to files dragged into the scene.hasfocus::Observable{Bool}
: Whether the Scene window is in focus or not.entered_window::Observable{Bool}
: Whether the mouse is inside the window or not.tick::Observable{Makie.Tick}
: Atick
is triggered whenever a new frame is requested, i.e. during normal rendering (even if the renderloop is paused) or when an image is produced forsave
orrecord
. A Tick contains:state
which identifies what caused the tick (see Makie.TickState)count
which increments with every ticktime
which is the total time since the screen has been createddelta_time
which is the time since the last frame
Makie.Exclusively Type
Exclusively(x)
Marks a button, button collection or logical expression of buttons as the exclusive subset of buttons that must be pressed for ispressed
to return true.
For example Exclusively((Keyboard.left_control, Keyboard.c))
would require left control and c to be pressed without any other buttons.
Boolean expressions are lowered to multiple Exclusive
sets in an Or
. It is worth noting that Not
branches are ignored here, i.e. it assumed that every button under a Not
must not be pressed and that this follows automatically from the subset of buttons that must be pressed.
Makie.FastPixel Type
FastPixel()
Use
scatter(..., marker=FastPixel())
For significantly faster plotting times for large amount of points. Note, that this will draw markers always as 1 pixel.
Makie.Figure Method
Figure(; [figure_padding,] kwargs...)
Construct a Figure
which allows to place Block
s like Axis
, Colorbar
and Legend
inside. The outer padding of the figure (the distance of the content to the edges) can be set by passing either one number or a tuple of four numbers for left, right, bottom and top paddings via the figure_padding
keyword.
All other keyword arguments such as size
and backgroundcolor
are forwarded to the Scene
owned by the figure which acts as the container for all other visual objects.
Makie.HLines Type
HLines
is the plot type associated with plotting function hlines
. Check the docstring for hlines
for further information.
Makie.HSpan Type
HSpan
is the plot type associated with plotting function hspan
. Check the docstring for hspan
for further information.
Makie.Hexbin Type
Hexbin
is the plot type associated with plotting function hexbin
. Check the docstring for hexbin
for further information.
Makie.Hist Type
Hist
is the plot type associated with plotting function hist
. Check the docstring for hist
for further information.
Makie.IntervalSlider Type
Makie.IntervalSlider <: Block
No docstring defined.
Attributes
(type ?Makie.IntervalSlider.x
in the REPL for more information about attribute x
)
alignmode
, color_active
, color_active_dimmed
, color_inactive
, halign
, height
, horizontal
, interval
, linewidth
, range
, snap
, startvalues
, tellheight
, tellwidth
, valign
, width
Makie.IntervalsBetween Type
IntervalsBetween(n::Int, mirror::Bool = true)
Indicates to create n-1 minor ticks between every pair of adjacent major ticks.
Makie.LScene Type
Makie.LScene <: Block
No docstring defined.
Attributes
(type ?Makie.LScene.x
in the REPL for more information about attribute x
)
alignmode
, dim1_conversion
, dim2_conversion
, dim3_conversion
, halign
, height
, show_axis
, tellheight
, tellwidth
, valign
, width
Makie.Label Type
Makie.Label <: Block
No docstring defined.
Attributes
(type ?Makie.Label.x
in the REPL for more information about attribute x
)
alignmode
, color
, font
, fontsize
, halign
, height
, justification
, lineheight
, padding
, rotation
, tellheight
, tellwidth
, text
, valign
, visible
, width
, word_wrap
Makie.Legend Type
Legend(fig_or_scene, axis::Union{Axis, Scene, LScene}, title = nothing; merge = false, unique = false, kwargs...)
Create a single-group legend with all plots from axis
that have the attribute label
set.
If merge
is true
, all plot objects with the same label will be layered on top of each other into one legend entry. If unique
is true
, all plot objects with the same plot type and label will be reduced to one occurrence.
Makie.Legend Type
Legend(
fig_or_scene,
contents::AbstractArray,
labels::AbstractArray,
title = nothing;
kwargs...)
Create a legend from contents
and labels
where each label is associated to one content element. A content element can be an AbstractPlot
, an array of AbstractPlots
, a LegendElement
, or any other object for which the legendelements
method is defined.
Makie.Legend Type
Makie.Legend <: Block
No docstring defined.
Attributes
(type ?Makie.Legend.x
in the REPL for more information about attribute x
)
alignmode
, backgroundcolor
, bgcolor
, colgap
, framecolor
, framevisible
, framewidth
, gridshalign
, gridsvalign
, groupgap
, halign
, height
, label
, labelcolor
, labelfont
, labelhalign
, labeljustification
, labelsize
, labelvalign
, linecolor
, linecolormap
, linecolorrange
, linepoints
, linestyle
, linewidth
, margin
, marker
, markercolor
, markercolormap
, markercolorrange
, markerpoints
, markersize
, markerstrokecolor
, markerstrokewidth
, nbanks
, orientation
, padding
, patchcolor
, patchlabelgap
, patchsize
, patchstrokecolor
, patchstrokewidth
, polycolor
, polycolormap
, polycolorrange
, polypoints
, polystrokecolor
, polystrokewidth
, rowgap
, tellheight
, tellwidth
, titlecolor
, titlefont
, titlegap
, titlehalign
, titleposition
, titlesize
, titlevalign
, titlevisible
, valign
, width
Makie.Legend Method
Legend(
fig_or_scene,
contentgroups::AbstractVector{<:AbstractVector},
labelgroups::AbstractVector{<:AbstractVector},
titles::AbstractVector;
kwargs...)
Create a multi-group legend from contentgroups
, labelgroups
and titles
. Each group from contentgroups
and labelgroups
is associated with one title from titles
(a title can be nothing
to hide it).
Within each group, each content element is associated with one label. A content element can be an AbstractPlot
, an array of AbstractPlots
, a LegendElement
, or any other object for which the legendelements
method is defined.
Makie.LineTo Type
LineTo(p::VecTypes)
LineTo(x::Real, y::Real)
A path command for use within a BezierPath
which continues the current subpath with a line to the given point.
Makie.Linestyle Type
Linestyle(value::Vector{<:Real})
A type that can be used as value for the linestyle
keyword argument of plotting functions to arbitrarily customize the linestyle.
The value
is a vector specifying the boundaries of the dashes in the line. Values 1 and 2 demarcate the first dash, values 2 and 3 the first gap, and so on. This means that usually, a pattern should have an odd number of values so that there's always a gap after a dash.
Here's an example in ASCII code. If we specify [0, 3, 6, 11, 16]
then we get the following pattern:
# 0 3 6 11 16 3 6 11
# --- ----- --- -----
Makie.LogTicks Type
LogTicks{T}(linear_ticks::T)
Wraps any other tick object. Used to apply a linear tick searching algorithm on a log-transformed interval.
Makie.Menu Type
Makie.Menu <: Block
A drop-down menu with multiple selectable options. You can pass options with the keyword argument options
.
Options are given as an iterable of elements. For each element, the option label in the menu is determined with optionlabel(element)
and the option value with optionvalue(element)
. These functions can be overloaded for custom types. The default is that tuples of two elements are expected to be label and value, where string(label)
is used as the label, while for all other objects, label = string(object)
and value = object.
When an item is selected in the menu, the menu's selection
attribute is set to optionvalue(selected_element)
. When nothing is selected, that value is nothing
.
You can set the initial selection by passing one of the labels with the default
keyword.
Constructors
Menu(fig_or_scene; default = nothing, kwargs...)
Examples
Menu with string entries, second preselected:
menu1 = Menu(fig[1, 1], options = ["first", "second", "third"], default = "second")
Menu with two-element entries, label and function:
funcs = [sin, cos, tan]
labels = ["Sine", "Cosine", "Tangens"]
menu2 = Menu(fig[1, 1], options = zip(labels, funcs))
Executing a function when a selection is made:
on(menu2.selection) do selected_function
# do something with the selected function
end
Attributes
(type ?Makie.Menu.x
in the REPL for more information about attribute x
)
alignmode
, cell_color_active
, cell_color_hover
, cell_color_inactive_even
, cell_color_inactive_odd
, direction
, dropdown_arrow_color
, dropdown_arrow_size
, fontsize
, halign
, height
, i_selected
, is_open
, options
, prompt
, scroll_speed
, selection
, selection_cell_color_inactive
, tellheight
, tellwidth
, textcolor
, textpadding
, valign
, width
Makie.MouseEvent Type
MouseEvent
Describes a mouse state change. Fields:
type
: MouseEventTypet
: Time of the eventdata
: Mouse position in data coordinatespx
: Mouse position in px relative to scene originprev_t
: Time of previous eventprev_data
: Previous mouse position in data coordinatesprev_px
: Previous mouse position in data coordinates
Makie.MoveTo Type
MoveTo(p::VecTypes)
MoveTo(x::Real, y::Real)
A path command for use within a BezierPath
which starts a new subpath at the given point.
Makie.MultiplesTicks Type
Like LinearTicks but for multiples of multiple
. Example where approximately 5 numbers should be found that are multiples of pi, printed like "1π", "2π", etc.:
MultiplesTicks(5, pi, "π")
If strip_zero == true
, then the resulting labels will be checked and any label that is a multiple of 0 will be set to "0".
Makie.Pie Type
Pie
is the plot type associated with plotting function pie
. Check the docstring for pie
for further information.
Makie.PlotSpec Type
PlotSpec(plottype, args...; kwargs...)
Object encoding positional arguments (args
), a NamedTuple
of attributes (kwargs
) as well as plot type P
of a basic plot.
Makie.PointLight Type
PointLight(color, position[, attenuation = Vec2f(0)])
PointLight(color, position, range::Real)
A point-like light source placed at the given position
with the given light color
.
Optionally an attenuation parameter can be used to reduce the brightness of the light source with distance. The reduction is given by 1 / (1 + attenuation[1] * distance + attenuation[2] * distance^2)
. Alternatively you can pass a light range
to generate matching default attenuation parameters. Note that you may need to set the light intensity, i.e. the light color to values greater than 1 to get satisfying results.
Availability:
GLMakie with
shading = MultiLightShading
RPRMakie
Makie.PolarAxis Type
Makie.PolarAxis <: Block
No docstring defined.
Attributes
(type ?Makie.PolarAxis.x
in the REPL for more information about attribute x
)
alignmode
, axis_rotation_button
, backgroundcolor
, clip
, clip_r
, clipcolor
, dim1_conversion
, dim2_conversion
, direction
, fixrmin
, gridz
, halign
, height
, normalize_theta_ticks
, r_translation_button
, radius_at_origin
, rautolimitmargin
, reset_axis_orientation
, reset_button
, rgridcolor
, rgridstyle
, rgridvisible
, rgridwidth
, rlimits
, rminorgridcolor
, rminorgridstyle
, rminorgridvisible
, rminorgridwidth
, rminorticks
, rtickangle
, rtickformat
, rticklabelcolor
, rticklabelfont
, rticklabelpad
, rticklabelrotation
, rticklabelsize
, rticklabelstrokecolor
, rticklabelstrokewidth
, rticklabelsvisible
, rticks
, rzoomkey
, rzoomlock
, sample_density
, spinecolor
, spinestyle
, spinevisible
, spinewidth
, tellheight
, tellwidth
, theta_0
, theta_as_x
, theta_translation_button
, thetaautolimitmargin
, thetagridcolor
, thetagridstyle
, thetagridvisible
, thetagridwidth
, thetalimits
, thetaminorgridcolor
, thetaminorgridstyle
, thetaminorgridvisible
, thetaminorgridwidth
, thetaminorticks
, thetatickformat
, thetaticklabelcolor
, thetaticklabelfont
, thetaticklabelpad
, thetaticklabelsize
, thetaticklabelstrokecolor
, thetaticklabelstrokewidth
, thetaticklabelsvisible
, thetaticks
, thetazoomkey
, thetazoomlock
, title
, titlealign
, titlecolor
, titlefont
, titlegap
, titlesize
, titlevisible
, valign
, width
, zoomspeed
Makie.QQNorm Type
QQNorm
is the plot type associated with plotting function qqnorm
. Check the docstring for qqnorm
for further information.
Makie.QQPlot Type
QQPlot
is the plot type associated with plotting function qqplot
. Check the docstring for qqplot
for further information.
Makie.RainClouds Type
RainClouds
is the plot type associated with plotting function rainclouds
. Check the docstring for rainclouds
for further information.
Makie.Rangebars Type
Rangebars
is the plot type associated with plotting function rangebars
. Check the docstring for rangebars
for further information.
Makie.RectLight Type
RectLight(color, r::Rect2[, direction = -normal])
RectLight(color, center::Point3f, b1::Vec3f, b2::Vec3f[, direction = -normal])
Creates a RectLight with a given color. The first constructor derives the light from a Rect2
extending in x and y directions. The second specifies the center
of the rect (or more accurately parallelogram) with b1
and b2
specifying the width and height vectors (including scale).
Note that RectLight implements translate!
, rotate!
and scale!
to simplify adjusting the light.
Availability:
- GLMakie with
Shading = MultiLightShading
Makie.Resampler Type
Resampler(matrix; resolution=automatic, method=Interpolations.Linear(), update_while_button_pressed=false)
Creates a resampling type which can be used with heatmap
, to display large images/heatmaps. Passed can be any array that supports array(linrange, linrange)
, as the interpolation interface from Interpolations.jl. If the array doesn't support this, it will be converted to an interpolation object via: Interpolations.interpolate(data, Interpolations.BSpline(method))
.
resolution
can be set toautomatic
to use the full resolution of the screen, or a tuple of the desired resolution.method
is the interpolation method used, defaulting toInterpolations.Linear()
.update_while_button_pressed
will update the heatmap while a mouse button is pressed, useful for zooming/panning. Set it to false for e.g. WGLMakie to avoid updating while dragging.
Makie.ReversibleScale Type
ReversibleScale
Custom scale struct, taking a forward and inverse arbitrary scale function.
Fields
forward::Function
: forward transformation (e.g.log10
)inverse::Function
: inverse transformation (e.g.exp10
forlog10
such that inverse ∘ forward ≡ identity)limits::Tuple{Float32, Float32}
: default limits (optional)interval::IntervalSets.AbstractInterval
: valid limits interval (optional)name::Symbol
Makie.ScatterLines Type
ScatterLines
is the plot type associated with plotting function scatterlines
. Check the docstring for scatterlines
for further information.
Makie.Scene Type
Scene TODO document this
Constructors
Fields
parent
: The parent of the Scene; if it is a top-level Scene,parent == nothing
.events
:Events
associated with the Scene.viewport
: The current pixel area of the Scene.clear
: Whether the scene should be cleared.camera
: TheCamera
associated with the Scene.camera_controls
: The controls for the camera of the Scene.transformation
: TheTransformation
of the Scene.float32convert
: A transformation rescaling data to a Float32-save range.plots
: The plots contained in the Scene.theme
children
: Children of the Scene inherit its transformation.current_screens
: The Screens which the Scene is displayed to.backgroundcolor
visible
ssao
lights
deregister_callbacks
cycler
conversions
isclosed
Makie.SceneSpace Type
Unit space of the scene it's displayed on. Also referred to as data units
Makie.Series Type
Series
is the plot type associated with plotting function series
. Check the docstring for series
for further information.
Makie.Slider Type
Makie.Slider <: Block
No docstring defined.
Attributes
(type ?Makie.Slider.x
in the REPL for more information about attribute x
)
alignmode
, color_active
, color_active_dimmed
, color_inactive
, halign
, height
, horizontal
, linewidth
, range
, snap
, startvalue
, tellheight
, tellwidth
, valign
, value
, width
Makie.SliderGrid Type
Makie.SliderGrid <: Block
A grid of one or more horizontal Slider
s, where each slider has a name label on the left and a value label on the right.
Each NamedTuple
you pass specifies one Slider
. You always have to pass range
and label
, and optionally a format
for the value label. Beyond that, you can set any keyword that Slider
takes, such as startvalue
.
The format
keyword can be a String
with Format.jl style, such as "{:.2f}Hz", or a function.
Constructors
SliderGrid(fig_or_scene, nts::NamedTuple...; kwargs...)
Examples
sg = SliderGrid(fig[1, 1],
(label = "Amplitude", range = 0:0.1:10, startvalue = 5),
(label = "Frequency", range = 0:0.5:50, format = "{:.1f}Hz", startvalue = 10),
(label = "Phase", range = 0:0.01:2pi,
format = x -> string(round(x/pi, digits = 2), "π"))
)
Working with slider values:
on(sg.sliders[1].value) do val
# do something with `val`
end
Attributes
(type ?Makie.SliderGrid.x
in the REPL for more information about attribute x
)
alignmode
, halign
, height
, tellheight
, tellwidth
, valign
, value_column_width
, width
Makie.SpotLight Type
SpotLight(color, position, direction, angles)
Creates a spot light which illuminates objects in a light cone starting at position
pointing in direction
. The opening angle is defined by an inner and outer angle given in angles
, between which the light intensity drops off.
Availability:
GLMakie with
shading = MultiLightShading
RPRMakie
Makie.Spy Type
Spy
is the plot type associated with plotting function spy
. Check the docstring for spy
for further information.
Makie.Stairs Type
Stairs
is the plot type associated with plotting function stairs
. Check the docstring for stairs
for further information.
Makie.Stem Type
Stem
is the plot type associated with plotting function stem
. Check the docstring for stem
for further information.
Makie.StepHist Type
StepHist
is the plot type associated with plotting function stephist
. Check the docstring for stephist
for further information.
Makie.StreamPlot Type
StreamPlot
is the plot type associated with plotting function streamplot
. Check the docstring for streamplot
for further information.
Makie.Textbox Type
Makie.Textbox <: Block
No docstring defined.
Attributes
(type ?Makie.Textbox.x
in the REPL for more information about attribute x
)
alignmode
, bordercolor
, bordercolor_focused
, bordercolor_focused_invalid
, bordercolor_hover
, borderwidth
, boxcolor
, boxcolor_focused
, boxcolor_focused_invalid
, boxcolor_hover
, cornerradius
, cornersegments
, cursorcolor
, defocus_on_submit
, displayed_string
, focused
, font
, fontsize
, halign
, height
, placeholder
, reset_on_defocus
, restriction
, stored_string
, tellheight
, tellwidth
, textcolor
, textcolor_placeholder
, textpadding
, validator
, valign
, width
Makie.TimeSeries Type
TimeSeries
is the plot type associated with plotting function timeseries
. Check the docstring for timeseries
for further information.
Makie.Toggle Type
Makie.Toggle <: Block
A switch with two states.
Constructors
Toggle(fig_or_scene; kwargs...)
Examples
t_horizontal = Toggle(fig[1, 1])
t_vertical = Toggle(fig[2, 1], orientation = :vertical)
t_diagonal = Toggle(fig[3, 1], orientation = pi/4)
on(t_vertical.active) do switch_is_on
switch_is_on ? println("good morning!") : println("good night")
end
Attributes
(type ?Makie.Toggle.x
in the REPL for more information about attribute x
)
active
, alignmode
, buttoncolor
, cornersegments
, framecolor_active
, framecolor_inactive
, halign
, height
, length
, markersize
, orientation
, rimfraction
, tellheight
, tellwidth
, toggleduration
, valign
, width
Makie.Tooltip Type
Tooltip
is the plot type associated with plotting function tooltip
. Check the docstring for tooltip
for further information.
Makie.Transformation Type
Holds the transformations for Scenes.
Fields
parent::Base.RefValue{Transformation}
translation::Observable{Vec{3, Float64}}
scale::Observable{Vec{3, Float64}}
rotation::Observable{Quaternionf}
origin::Observable{Vec{3, Float64}}
model::Observable{StaticArraysCore.SMatrix{4, 4, Float64, 16}}
parent_model::Observable{StaticArraysCore.SMatrix{4, 4, Float64, 16}}
transform_func::Observable{Any}
Makie.Tricontourf Type
Tricontourf
is the plot type associated with plotting function tricontourf
. Check the docstring for tricontourf
for further information.
Makie.Triplot Type
Triplot
is the plot type associated with plotting function triplot
. Check the docstring for triplot
for further information.
Makie.VLines Type
VLines
is the plot type associated with plotting function vlines
. Check the docstring for vlines
for further information.
Makie.VSpan Type
VSpan
is the plot type associated with plotting function vspan
. Check the docstring for vspan
for further information.
Makie.VideoStream Method
VideoStream(fig::FigureLike;
format="mp4", framerate=24, compression=nothing, profile=nothing, pixel_format=nothing, loop=nothing,
loglevel="quiet", visible=false, connect=false, filter_ticks=true, backend=current_backend(),
screen_config...)
Returns a VideoStream
which can pipe new frames into the ffmpeg process with few allocations via recordframe!(stream)
. When done, use save(path, stream)
to write the video out to a file.
Arguments
Video options
format = "mkv"
: The format of the video. If a path is present, will be inferred from the file extension. Can be one of the following:"mkv"
(open standard, the default)"mp4"
(good for Web, most supported format)"webm"
(smallest file size)"gif"
(largest file size for the same quality)
mp4
andmk4
are marginally bigger thanwebm
.gif
s can be significantly (as much as 6x) larger with worse quality (due to the limited color palette) and only should be used as a last resort, for playing in a context where videos aren't supported.framerate = 24
: The target framerate.compression = 20
: Controls the video compression viaffmpeg
's-crf
option, with smaller numbers giving higher quality and larger file sizes (lower compression), and higher numbers giving lower quality and smaller file sizes (higher compression). The minimum value is0
(lossless encoding).- For
mp4
,51
is the maximum. Note thatcompression = 0
only works withmp4
if
profile = "high444"
.For
webm
,63
is the maximum.compression
has no effect onmkv
andgif
outputs.
- For
profile = "high422"
: A ffmpeg compatible profile. Currently only applies tomp4
. If
you have issues playing a video, try profile = "high"
or profile = "main"
.
pixel_format = "yuv420p"
: A ffmpeg compatible pixel format (-pix_fmt
). Currently only
applies to mp4
. Defaults to yuv444p
for profile = "high444"
.
loop = 0
: Number of times the video is repeated, for agif
orhtml
output. Defaults to0
, which
means infinite looping. A value of -1
turns off looping, and a value of n > 0
means n
repetitions (i.e. the video is played n+1
times) when supported by backend.
!!! warning
`profile` and `pixel_format` are only used when `format` is `"mp4"`; a warning will be issued if `format`
is not `"mp4"` and those two arguments are not `nothing`. Similarly, `compression` is only
valid when `format` is `"mp4"` or `"webm"`.
Backend options
backend=current_backend()
: backend used to record framesvisible=false
: make window visible or notconnect=false
: connect window events or notscreen_config...
: See?Backend.Screen
orBase.doc(Backend.Screen)
for applicable options that can be passed and forwarded to the backend.
Other
filter_ticks
: When true, tick events other thantick.state = Makie.OneTimeRenderTick
are removed untilsave()
is called or the VideoStream object gets deleted.
Makie.Violin Type
Violin
is the plot type associated with plotting function violin
. Check the docstring for violin
for further information.
Makie.VolumeSlices Type
VolumeSlices
is the plot type associated with plotting function volumeslices
. Check the docstring for volumeslices
for further information.
Makie.Voronoiplot Type
Voronoiplot
is the plot type associated with plotting function voronoiplot
. Check the docstring for voronoiplot
for further information.
Makie.Waterfall Type
Waterfall
is the plot type associated with plotting function waterfall
. Check the docstring for waterfall
for further information.
Makie.WilkinsonTicks Method
WilkinsonTicks(
k_ideal::Int;
k_min = 2, k_max = 10,
Q = [(1.0, 1.0), (5.0, 0.9), (2.0, 0.7), (2.5, 0.5), (3.0, 0.2)],
granularity_weight = 1/4,
simplicity_weight = 1/6,
coverage_weight = 1/3,
niceness_weight = 1/4
)
WilkinsonTicks
is a thin wrapper over PlotUtils.optimize_ticks
, the docstring of which is reproduced below:
optimize_ticks(xmin, xmax; extend_ticks::Bool = false, Q = [(1.0,1.0), (5.0, 0.9), (2.0, 0.7), (2.5, 0.5), (3.0, 0.2)], k_min = 2, k_max = 10, k_ideal = 5, granularity_weight = 1/4, simplicity_weight = 1/6, coverage_weight = 1/3, niceness_weight = 1/4, strict_span = true, span_buffer = nothing)
Find some reasonable values for tick marks.
This is basically Wilkinson's ad-hoc scoring method that tries to balance tight fit around the data, optimal number of ticks, and simple numbers.
Arguments:
xmax
: The maximum value occurring in the data.xmin
: The minimum value occurring in the data.extend_ticks
: Determines whether to extend tick computation. Defaults to false.strict_span
: True if no ticks should be outside [x_min, x_max]. Defaults to true.Q
: A distribution of nice numbers from which labellings are sampled. Stored in the form (number, score).k_min
: The minimum number of ticks.k_max
: The maximum number of ticks.k_ideal
: The ideal number of ticks.granularity_weight
: Encourages returning roughly the number of labels requested.simplicity_weight
: Encourages nicer labeling sequences by preferring step sizes that appear earlier in Q. Also rewards labelings that include 0 as a way to ground the sequence.coverage_weight
: Encourages labelings that do not extend far beyond the range of the data, penalizing unnecessary whitespace.niceness_weight
: Encourages labellings to produce nice ranges.
Returns:
(ticklocations::Vector{Float64}, x_min, x_max)
Mathematical details
Wilkinson’s optimization function is defined as the sum of three components. If the user requests m labels and a possible labeling has k labels, then the components are simplicity
, coverage
and granularity
.
These components are defined as follows:
$
\begin{aligned} &\text{simplicity} = 1 - \frac{i}{|Q|} + \frac{v}{|Q|}
&\text{coverage} = \frac{x_{max} - x_{min}}{\mathrm{label}{max} - \mathrm{label}{min}}
&\text{granularity}= 1 - \frac{\left|k - m\right|}{m} \end{aligned} $
and the variables here are:
q
: element ofQ
.i
: index ofq
∈Q
.v
: 1 if label range includes 0, 0 otherwise.
FileIO.save Method
FileIO.save(filename, scene; size = size(scene), pt_per_unit = 0.75, px_per_unit = 1.0)
Save a Scene
with the specified filename and format.
Supported Formats
GLMakie
:.png
CairoMakie
:.svg
,.pdf
and.png
WGLMakie
:.png
Supported Keyword Arguments
All Backends
size
:(width::Int, height::Int)
of the scene in dimensionless units.update
: Whether the figure should be updated before saving. This resets the limits of all Axes in the figure. Defaults totrue
.backend
: Specify theMakie
backend that should be used for saving. Defaults to the current backend.px_per_unit
: The size of one scene unit inpx
when exporting to a bitmap format. This provides a mechanism to export the same scene with higher or lower resolution.Further keywords will be forwarded to the screen.
CairoMakie
pt_per_unit
: The size of one scene unit inpt
when exporting to a vector format.
FileIO.save Method
save(path::String, io::VideoStream)
Flushes the video stream and saves it to path
. Ideally, path
's file extension is the same as the format that the VideoStream
was created with (e.g., if created with format "mp4" then path
's file extension must be ".mp4"). Otherwise, the video will get converted to the target format. If using record
then this is handled for you, as the VideoStream
's format is deduced from the file extension of the path passed to record
.
Makie.Pattern Method
Pattern(image)
Pattern(mask[; color1, color2])
Creates an ImagePattern
from an image
(a matrix of colors) or a mask
(a matrix of real numbers). The pattern can be passed as a color
to a plot to texture it. If a mask
is passed, one can specify to colors between which colors are interpolated.
Makie.Pattern Method
Pattern(style::String = "/"; kwargs...)
Pattern(style::Char = '/'; kwargs...)
Creates a line pattern based on the given argument. Available patterns are '/'
, '\'
, '-'
, '|'
, 'x'
, and '+'
. All keyword arguments correspond to the keyword arguments for LinePattern
.
Makie.Record Method
Record(func, figlike, [iter]; kw_args...)
Check Makie.record
for documentation.
Makie.ablines Function
ablines(intercepts, slopes; attrs...)
Creates a line defined by f(x) = slope * x + intercept
crossing a whole Scene
with 2D projection at its current limits. You can pass one or multiple intercepts or slopes.
Plot type
The plot type alias for the ablines
function is ABLines
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= @inherit linecolor
— The color of the line.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
cycle
= [:color]
— Sets which attributes to cycle when creating multiple plots.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
fxaa
= false
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
linecap
= @inherit linecap
— Sets the type of linecap used, i.e. :butt (flat with no extrusion), :square (flat with 1 linewidth extrusion) or :round.
linestyle
= nothing
— Sets the dash pattern of the line. Options are :solid
(equivalent to nothing
), :dot
, :dash
, :dashdot
and :dashdotdot
. These can also be given in a tuple with a gap style modifier, either :normal
, :dense
or :loose
. For example, (:dot, :loose)
or (:dashdot, :dense)
.
For custom patterns have a look at Makie.Linestyle
.
linewidth
= @inherit linewidth
— Sets the width of the line in pixel units
lowclip
= automatic
— The color for any value below the colorrange.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
Makie.ablines! Function
ablines!
is the mutating variant of plotting function ablines
. Check the docstring for ablines
for further information.
Makie.activate_interaction! Method
activate_interaction!(parent, name::Symbol)
Activate the interaction named name
registered in parent
.
Makie.addmouseevents! Method
addmouseevents!(scene, elements...)
Returns a MouseEventHandle
with an observable inside which is triggered by all mouse interactions with the scene
and optionally restricted to all given plot objects in elements
.
To react to mouse events, use the onmouse... handlers.
Example:
mouseevents = addmouseevents!(scene, scatterplot)
onmouseleftclick(mouseevents) do event
# do something with the mouseevent
end
Makie.annotations Function
annotations(strings::Vector{String}, positions::Vector{Point})
Plots an array of texts at each position in positions
.
Plot type
The plot type alias for the annotations
function is Annotations
.
Attributes
align
= (:left, :bottom)
— Sets the alignment of the string w.r.t. position
. Uses :left, :center, :right, :top, :bottom, :baseline
or fractions.
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= @inherit textcolor
— Sets the color of the text. One can set one color per glyph by passing a Vector{<:Colorant}
, or one colorant for the whole text. If color is a vector of numbers, the colormap args are used to map the numbers to colors.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
font
= @inherit font
— Sets the font. Can be a Symbol
which will be looked up in the fonts
dictionary or a String
specifying the (partial) name of a font or the file path of a font file
fonts
= @inherit fonts
— Used as a dictionary to look up fonts specified by Symbol
, for example :regular
, :bold
or :italic
.
fontsize
= @inherit fontsize
— The fontsize in units depending on markerspace
.
fxaa
= false
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
glowcolor
= (:black, 0.0)
— Sets the color of the glow effect around the text.
glowwidth
= 0.0
— Sets the size of a glow effect around the text.
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
justification
= automatic
— Sets the alignment of text w.r.t its bounding box. Can be :left, :center, :right
or a fraction. Will default to the horizontal alignment in align
.
lineheight
= 1.0
— The lineheight multiplier.
lowclip
= automatic
— The color for any value below the colorrange.
markerspace
= :pixel
— Sets the space in which fontsize
acts. See Makie.spaces()
for possible inputs.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
offset
= (0.0, 0.0)
— The offset of the text from the given position in markerspace
units.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
position
= (0.0, 0.0)
— Deprecated: Specifies the position of the text. Use the positional argument to text
instead.
rotation
= 0.0
— Rotates text around the given position
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
strokecolor
= (:black, 0.0)
— Sets the color of the outline around a marker.
strokewidth
= 0
— Sets the width of the outline around a marker.
text
= ""
— Specifies one piece of text or a vector of texts to show, where the number has to match the number of positions given. Makie supports String
which is used for all normal text and LaTeXString
which layouts mathematical expressions using MathTeXEngine.jl
.
transform_marker
= false
— Controls whether the model matrix (without translation) applies to the glyph itself, rather than just the positions. (If this is true, scale!
and rotate!
will affect the text glyphs.)
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
word_wrap_width
= -1
— Specifies a linewidth limit for text. If a word overflows this limit, a newline is inserted before it. Negative numbers disable word wrapping.
Makie.annotations! Function
annotations!
is the mutating variant of plotting function annotations
. Check the docstring for annotations
for further information.
Makie.arc Function
arc(origin, radius, start_angle, stop_angle; kwargs...)
This function plots a circular arc, centered at origin
with radius radius
, from start_angle
to stop_angle
. origin
must be a coordinate in 2 dimensions (i.e., a Point2
); the rest of the arguments must be <: Number
.
Examples:
arc(Point2f(0), 1, 0.0, π)
arc(Point2f(1, 2), 0.3, π, -π)
Plot type
The plot type alias for the arc
function is Arc
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= @inherit linecolor
— The color of the line.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
cycle
= [:color]
— Sets which attributes to cycle when creating multiple plots.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
fxaa
= false
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
joinstyle
= @inherit joinstyle
— Controls the rendering at corners. Options are :miter
for sharp corners, :bevel
for "cut off" corners, and :round
for rounded corners. If the corner angle is below miter_limit
, :miter
is equivalent to :bevel
to avoid long spikes.
linecap
= @inherit linecap
— Sets the type of line cap used. Options are :butt
(flat without extrusion), :square
(flat with half a linewidth extrusion) or :round
.
linestyle
= nothing
— Sets the dash pattern of the line. Options are :solid
(equivalent to nothing
), :dot
, :dash
, :dashdot
and :dashdotdot
. These can also be given in a tuple with a gap style modifier, either :normal
, :dense
or :loose
. For example, (:dot, :loose)
or (:dashdot, :dense)
.
For custom patterns have a look at Makie.Linestyle
.
linewidth
= @inherit linewidth
— Sets the width of the line in screen units
lowclip
= automatic
— The color for any value below the colorrange.
miter_limit
= @inherit miter_limit
— Sets the minimum inner join angle below which miter joins truncate. See also Makie.miter_distance_to_angle
.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
resolution
= 361
— The number of line points approximating the arc.
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
Makie.arc! Function
arc!
is the mutating variant of plotting function arc
. Check the docstring for arc
for further information.
Makie.autolimits! Function
autolimits!(ax::PolarAxis[, unlock_zoom = true])
Calling this tells the PolarAxis to derive limits freely from the plotted data, which allows rmin > 0 and thetalimits spanning less than a full circle. If unlock_zoom = true
this also unlocks zooming in r and theta direction and allows for translations in r direction.
Makie.autolimits! Method
autolimits!()
autolimits!(la::Axis)
Reset manually specified limits of la
to an automatically determined rectangle, that depends on the data limits of all plot objects in the axis, as well as the autolimit margins for x and y axis. The argument la
defaults to current_axis()
.
Makie.available_marker_symbols Method
available_marker_symbols()
Displays all available marker symbols.
Makie.available_plotting_methods Method
available_plotting_methods()
Returns an array of all available plotting functions.
Makie.axis3d Method
axis3d(args; kw...)
Plots a 3-dimensional OldAxis.
Attributes
OldAxis attributes and their defaults for Plot{Makie.axis3d}
are:
showaxis: (true, true, true)
visible: true
ticks:
rotation: (-0.7071067811865475 + -0.0im + -0.0jm - 0.7071067811865476km, -4.371139e-8 + 0.0im + 0.0jm + 1.0km, -3.090861907263062e-8 + 3.090861907263061e-8im + 0.7071067811865475jm + 0.7071067811865476km)
font: (:regular, :regular, :regular)
ranges_labels: (MakieCore.Automatic(), MakieCore.Automatic())
formatter: plain
textcolor: (RGBA{Float32}(0.5f0,0.5f0,0.5f0,0.6f0), RGBA{Float32}(0.5f0,0.5f0,0.5f0,0.6f0), RGBA{Float32}(0.5f0,0.5f0,0.5f0,0.6f0))
fontsize: (5, 5, 5)
align: ((:left, :center), (:right, :center), (:right, :center))
gap: 3
fonts:
bold: TeX Gyre Heros Makie Bold
italic: TeX Gyre Heros Makie Italic
bold_italic: TeX Gyre Heros Makie Bold Italic
regular: TeX Gyre Heros Makie
names:
axisnames: ("x", "y", "z")
rotation: (-0.7071067811865475 + -0.0im + -0.0jm - 0.7071067811865476km, -4.371139e-8 + 0.0im + 0.0jm + 1.0km, -3.090861907263062e-8 + 3.090861907263061e-8im + 0.7071067811865475jm + 0.7071067811865476km)
font: (:regular, :regular, :regular)
textcolor: (:black, :black, :black)
fontsize: (6.0, 6.0, 6.0)
align: ((:left, :center), (:right, :center), (:right, :center))
gap: 3
scale: Float32[1.0, 1.0, 1.0]
clip_planes: Plane3f[]
showgrid: (true, true, true)
padding: 0.1
frame:
axiscolor: (:black, :black, :black)
axislinewidth: (1.5, 1.5, 1.5)
linewidth: (1, 1, 1)
linecolor: (RGBA{Float32}(0.5f0,0.5f0,0.5f0,0.4f0), RGBA{Float32}(0.5f0,0.5f0,0.5f0,0.4f0), RGBA{Float32}(0.5f0,0.5f0,0.5f0,0.4f0))
inspectable: false
showticks: (true, true, true)
Makie.axislegend Method
axislegend(ax, args...; position = :rt, kwargs...)
axislegend(ax, args...; position = (1, 1), kwargs...)
axislegend(ax = current_axis(); kwargs...)
axislegend(title::AbstractString; kwargs...)
axislegend(ax, title::AbstractString; kwargs...)
Create a legend that sits inside an Axis's plot area.
The position can be a Symbol where the first letter controls the horizontal alignment and can be l, r or c, and the second letter controls the vertical alignment and can be t, b or c. Or it can be a tuple where the first element is set as the Legend's halign and the second element as its valign.
With the keywords merge and unique you can control how plot objects with the same labels are treated. If merge is true, all plot objects with the same label will be layered on top of each other into one legend entry. If unique is true, all plot objects with the same plot type and label will be reduced to one occurrence.
Makie.band Function
band(x, ylower, yupper; kwargs...)
band(lower, upper; kwargs...)
band(x, lowerupper; kwargs...)
Plots a band from ylower
to yupper
along x
. The form band(lower, upper)
plots a ruled surface between the points in lower
and upper
. Both bounds can be passed together as lowerupper
, a vector of intervals.
Plot type
The plot type alias for the band
function is Band
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
backlight
= 0.0
— Sets a weight for secondary light calculation with inverted normals.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= @inherit patchcolor
— Sets the color of the mesh. Can be a Vector{<:Colorant}
for per vertex colors or a single Colorant
. A Matrix{<:Colorant}
can be used to color the mesh with a texture, which requires the mesh to contain texture coordinates.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
cycle
= [:color => :patchcolor]
— No docs available.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
diffuse
= 1.0
— Sets how strongly the red, green and blue channel react to diffuse (scattered) light.
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
interpolate
= true
— sets whether colors should be interpolated
lowclip
= automatic
— The color for any value below the colorrange.
matcap
= nothing
— No docs available.
material
= nothing
— RPRMakie only attribute to set complex RadeonProRender materials. Warning, how to set an RPR material may change and other backends will ignore this attribute
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
shading
= NoShading
— Sets the lighting algorithm used. Options are NoShading
(no lighting), FastShading
(AmbientLight + PointLight) or MultiLightShading
(Multiple lights, GLMakie only). Note that this does not affect RPRMakie.
shininess
= 32.0
— Sets how sharp the reflection is.
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
specular
= 0.2
— Sets how strongly the object reflects light in the red, green and blue channels.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
uv_transform
= automatic
— Sets a transform for uv coordinates, which controls how a texture is mapped to a mesh. The attribute can be I
, scale::VecTypes{2}
, (translation::VecTypes{2}, scale::VecTypes{2})
, any of :rotr90, :rotl90, :rot180, :swap_xy/:transpose, :flip_x, :flip_y, :flip_xy, or most generally a Makie.Mat{2, 3, Float32}
or Makie.Mat3f
as returned by Makie.uv_transform()
. They can also be changed by passing a tuple (op3, op2, op1)
.
visible
= true
— Controls whether the plot will be rendered or not.
Makie.band! Function
band!
is the mutating variant of plotting function band
. Check the docstring for band
for further information.
Makie.barplot Function
barplot(positions, heights; kwargs...)
Plots a barplot.
Plot type
The plot type alias for the barplot
function is BarPlot
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
bar_labels
= nothing
— Labels added at the end of each bar.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= @inherit patchcolor
— No docs available.
color_over_background
= automatic
— No docs available.
color_over_bar
= automatic
— No docs available.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
cycle
= [:color => :patchcolor]
— No docs available.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
direction
= :y
— Controls the direction of the bars, can be :y
(vertical) or :x
(horizontal).
dodge
= automatic
— No docs available.
dodge_gap
= 0.03
— No docs available.
fillto
= automatic
— Controls the baseline of the bars. This is zero in the default automatic
case unless the barplot is in a log-scaled Axis
. With a log scale, the automatic default is half the minimum value because zero is an invalid value for a log scale.
flip_labels_at
= Inf
— No docs available.
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
gap
= 0.2
— The final width of the bars is calculated as w * (1 - gap)
where w
is the width of each bar as determined with the width
attribute.
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
label_align
= automatic
— No docs available.
label_color
= @inherit textcolor
— No docs available.
label_font
= @inherit font
— The font of the bar labels.
label_formatter
= bar_label_formatter
— No docs available.
label_offset
= 5
— The distance of the labels from the bar ends in screen units. Does not apply when label_position = :center
.
label_position
= :end
— The position of each bar's label relative to the bar. Possible values are :end
or :center
.
label_rotation
= 0π
— No docs available.
label_size
= @inherit fontsize
— The font size of the bar labels.
lowclip
= automatic
— The color for any value below the colorrange.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
n_dodge
= automatic
— No docs available.
nan_color
= :transparent
— The color for NaN values.
offset
= 0.0
— No docs available.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
stack
= automatic
— No docs available.
strokecolor
= @inherit patchstrokecolor
— No docs available.
strokewidth
= @inherit patchstrokewidth
— No docs available.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
width
= automatic
— The gapless width of the bars. If automatic
, the width w
is calculated as minimum(diff(sort(unique(positions)))
. The actual width of the bars is calculated as w * (1 - gap)
.
Makie.barplot! Function
barplot!
is the mutating variant of plotting function barplot
. Check the docstring for barplot
for further information.
Makie.boundingbox Function
boundingbox(plot::AbstractPlot)
Returns the world space bounding box of a plot. This include plot.transformation
, i.e. the transform_func
and the model
matrix.
See also: data_limits
Makie.boundingbox Function
boundingbox(scenelike[, exclude = plot -> false])
Returns the combined world space bounding box of all plots collected under scenelike
. This include plot.transformation
, i.e. the transform_func
and the model
matrix. Plots with exclude(plot) == true
are excluded.
See also: data_limits
Makie.boxplot Function
boxplot(x, y; kwargs...)
Draw a Tukey style boxplot. The boxplot has 3 components:
a
crossbar
spanning the interquartile (IQR) range with a midline marking the medianan
errorbar
whose whiskers spanrange * iqr
points marking outliers, that is, data outside the whiskers
Arguments
x
: positions of the categoriesy
: variables within the boxes
Plot type
The plot type alias for the boxplot
function is BoxPlot
.
Attributes
color
= @inherit patchcolor
— No docs available.
colormap
= @inherit colormap
— No docs available.
colorrange
= automatic
— No docs available.
colorscale
= identity
— No docs available.
cycle
= [:color => :patchcolor]
— No docs available.
dodge
= automatic
— Vector of Integer
(length of data) of grouping variable to create multiple side-by-side boxes at the same x
position.
dodge_gap
= 0.03
— Spacing between dodged boxes.
gap
= 0.2
— Shrinking factor, width -> width * (1 - gap)
.
inspectable
= @inherit inspectable
— No docs available.
marker
= @inherit marker
— No docs available.
markersize
= @inherit markersize
— No docs available.
mediancolor
= @inherit linecolor
— No docs available.
medianlinewidth
= @inherit linewidth
— No docs available.
n_dodge
= automatic
— No docs available.
notchwidth
= 0.5
— Multiplier of width
for narrowest width of notch.
orientation
= :vertical
— Orientation of box (:vertical
or :horizontal
).
outliercolor
= automatic
— No docs available.
outlierstrokecolor
= @inherit markerstrokecolor
— No docs available.
outlierstrokewidth
= @inherit markerstrokewidth
— No docs available.
range
= 1.5
— Multiple of IQR controlling whisker length.
show_median
= true
— Show median as midline.
show_notch
= false
— Draw the notch.
show_outliers
= true
— Show outliers as points.
strokecolor
= @inherit patchstrokecolor
— No docs available.
strokewidth
= @inherit patchstrokewidth
— No docs available.
weights
= automatic
— Vector of statistical weights (length of data). By default, each observation has weight 1
.
whiskercolor
= @inherit linecolor
— No docs available.
whiskerlinewidth
= @inherit linewidth
— No docs available.
whiskerwidth
= 0.0
— Multiplier of width
for width of T's on whiskers, or :match
to match width
.
width
= automatic
— Width of the box before shrinking.
Makie.boxplot! Function
boxplot!
is the mutating variant of plotting function boxplot
. Check the docstring for boxplot
for further information.
Makie.bracket Function
bracket(x1, y1, x2, y2; kwargs...)
bracket(x1s, y1s, x2s, y2s; kwargs...)
bracket(point1, point2; kwargs...)
bracket(vec_of_point_tuples; kwargs...)
Draws a bracket between each pair of points (x1, y1) and (x2, y2) with a text label at the midpoint.
By default each label is rotated parallel to the line between the bracket points.
Plot type
The plot type alias for the bracket
function is Bracket
.
Attributes
align
= (:center, :center)
— No docs available.
color
= @inherit linecolor
— No docs available.
font
= @inherit font
— No docs available.
fontsize
= @inherit fontsize
— No docs available.
joinstyle
= @inherit joinstyle
— No docs available.
justification
= automatic
— No docs available.
linecap
= @inherit linecap
— No docs available.
linestyle
= :solid
— No docs available.
linewidth
= @inherit linewidth
— No docs available.
miter_limit
= @inherit miter_limit
— No docs available.
offset
= 0
— The offset of the bracket perpendicular to the line from start to end point in screen units. The direction depends on the orientation
attribute.
orientation
= :up
— Which way the bracket extends relative to the line from start to end point. Can be :up
or :down
.
rotation
= automatic
— No docs available.
style
= :curly
— No docs available.
text
= ""
— No docs available.
textcolor
= @inherit textcolor
— No docs available.
textoffset
= automatic
— No docs available.
width
= 15
— The width of the bracket (perpendicularly away from the line from start to end point) in screen units.
Makie.bracket! Function
bracket!
is the mutating variant of plotting function bracket
. Check the docstring for bracket
for further information.
Makie.broadcast_foreach Method
broadcast_foreach(f, args...)
Like broadcast but for foreach. Doesn't care about shape and treats Tuples && StaticVectors as scalars. This method is meant for broadcasting across attributes that can either have scalar or vector / array form. An example would be a collection of scatter markers that have different sizes but a single color. The length of an attribute is determined with attr_broadcast_length
and elements are accessed with attr_broadcast_getindex
.
Makie.cam2d! Method
cam2d!(scene::SceneLike, kwargs...)
Creates a 2D camera for the given scene
. The camera implements zooming by scrolling and translation using mouse drag. It also implements rectangle selections.
Keyword Arguments
zoomspeed = 0.1
sets the zoom speed.zoombutton = true
sets a button (combination) which needs to be pressed to enable zooming. By default no button needs to be pressed.panbutton = Mouse.right
sets the button used to translate the camera. This must include a mouse button.selectionbutton = (Keyboard.space, Mouse.left)
sets the button used for rectangle selection. This must include a mouse button.
Makie.cam3d! Method
cam3d!(scene[; kwargs...])
Creates a Camera3D
with zoom_shift_lookat = true
and fixed_axis = true
. For more information, see Camera3D
Makie.cam3d_cad! Method
cam3d_cad!(scene[; kwargs...])
Creates a Camera3D
with cad = true
, zoom_shift_lookat = false
and fixed_axis = false
. For more information, see Camera3D
Makie.cam_relative! Method
cam_relative!(scene)
Creates a camera for the given scene
which maps the scene area to a 0..1 by 0..1 range. This camera does not feature controls.
Makie.campixel! Method
campixel!(scene; nearclip=-1000.0, farclip=1000.0)
Creates a pixel camera for the given scene
. This means that the positional data of a plot will be interpreted in pixel units. This camera does not feature controls.
Makie.categorical_colors Method
categorical_colors(colormaplike, categories::Integer)
Creates categorical colors and tries to match categories
. Will error if color scheme doesn't contain enough categories. Will drop the n last colors, if request less colors than contained in scheme.
Makie.colorbuffer Function
colorbuffer(scene, format::ImageStorageFormat = JuliaNative; update=true, backend=current_backend(), screen_config...)
Returns the content of the given scene or screen rasterised to a Matrix of Colors. The return type is backend-dependent, but will be some form of RGB or RGBA.
backend::Module
: A module which is a Makie backend. For example,backend = GLMakie
,backend = CairoMakie
, etc.format = JuliaNative
: Returns a buffer in the format of standard julia images (dims permuted and one reversed)format = GLNative
: Returns a more efficient format buffer for GLMakie which can be directly used in FFMPEG without conversionscreen_config
: Backend dependent, look up via?Backend.Screen
/Base.doc(Backend.Screen)
update=true
: resets/updates limits. Set to false, if you want to preserver camera movements.
Makie.colorbuffer Method
colorbuffer(ax::Axis; include_decorations=true, colorbuffer_kws...)
Gets the colorbuffer of the Axis
in JuliaNative
image format. If include_decorations=false
, only the inside of the axis is fetched.
Makie.contour Function
contour(x, y, z)
contour(z::Matrix)
Creates a contour plot of the plane spanning x::Vector
, y::Vector
, z::Matrix
. If only z::Matrix
is supplied, the indices of the elements in z
will be used as the x
and y
locations when plotting the contour.
Plot type
The plot type alias for the contour
function is Contour
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= nothing
— The color of the contour lines. If nothing
, the color is determined by the numerical values of the contour levels in combination with colormap
and colorrange
.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
enable_depth
= true
— No docs available.
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
joinstyle
= @inherit joinstyle
— No docs available.
labelcolor
= nothing
— Color of the contour labels, if nothing
it matches color
by default.
labelfont
= @inherit font
— The font of the contour labels.
labelformatter
= contour_label_formatter
— Formats the numeric values of the contour levels to strings.
labels
= false
— If true
, adds text labels to the contour lines.
labelsize
= 10
— Font size of the contour labels
levels
= 5
— Controls the number and location of the contour lines. Can be either
an
Int
that produces n equally wide levels or bandsan
AbstractVector{<:Real}
that lists n consecutive edges from low to high, which result in n-1 levels or bands
linecap
= @inherit linecap
— No docs available.
linestyle
= nothing
— No docs available.
linewidth
= 1.0
— No docs available.
lowclip
= automatic
— The color for any value below the colorrange.
miter_limit
= @inherit miter_limit
— No docs available.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
Makie.contour! Function
contour!
is the mutating variant of plotting function contour
. Check the docstring for contour
for further information.
Makie.contour3d Function
contour3d(x, y, z)
Creates a 3D contour plot of the plane spanning x::Vector, y::Vector, z::Matrix, with z-elevation for each level.
Plot type
The plot type alias for the contour3d
function is Contour3d
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= nothing
— The color of the contour lines. If nothing
, the color is determined by the numerical values of the contour levels in combination with colormap
and colorrange
.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
enable_depth
= true
— No docs available.
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
joinstyle
= @inherit joinstyle
— No docs available.
labelcolor
= nothing
— Color of the contour labels, if nothing
it matches color
by default.
labelfont
= @inherit font
— The font of the contour labels.
labelformatter
= contour_label_formatter
— Formats the numeric values of the contour levels to strings.
labels
= false
— If true
, adds text labels to the contour lines.
labelsize
= 10
— Font size of the contour labels
levels
= 5
— Controls the number and location of the contour lines. Can be either
an
Int
that produces n equally wide levels or bandsan
AbstractVector{<:Real}
that lists n consecutive edges from low to high, which result in n-1 levels or bands
linecap
= @inherit linecap
— No docs available.
linestyle
= nothing
— No docs available.
linewidth
= 1.0
— No docs available.
lowclip
= automatic
— The color for any value below the colorrange.
miter_limit
= @inherit miter_limit
— No docs available.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
Makie.contour3d! Function
contour3d!
is the mutating variant of plotting function contour3d
. Check the docstring for contour3d
for further information.
Makie.contourf Function
contourf(xs, ys, zs; kwargs...)
Plots a filled contour of the height information in zs
at horizontal grid positions xs
and vertical grid positions ys
.
Plot type
The plot type alias for the contourf
function is Contourf
.
Attributes
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
colormap
= @inherit colormap
— No docs available.
colorscale
= identity
— No docs available.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
extendhigh
= nothing
— In :normal
mode, if you want to show a band from the high edge to Inf
, set extendhigh
to :auto
to give the extension the same color as the last level, or specify a color directly (default nothing
means no extended band).
extendlow
= nothing
— In :normal
mode, if you want to show a band from -Inf
to the low edge, set extendlow
to :auto
to give the extension the same color as the first level, or specify a color directly (default nothing
means no extended band).
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
levels
= 10
— Can be either
an
Int
that produces n equally wide levels or bandsan
AbstractVector{<:Real}
that lists n consecutive edges from low to high, which result in n-1 levels or bands
If levels
is an Int
, the contourf plot will be rectangular as all zs
values will be covered edge to edge. This is why Axis
defaults to tight limits for such contourf plots. If you specify levels
as an AbstractVector{<:Real}
, however, note that the axis limits include the default margins because the contourf plot can have an irregular shape. You can use tightlimits!(ax)
to tighten the limits similar to the Int
behavior.
mode
= :normal
— Determines how the levels
attribute is interpreted, either :normal
or :relative
. In :normal
mode, the levels correspond directly to the z values. In :relative
mode, you specify edges by the fraction between minimum and maximum value of zs
. This can be used for example to draw bands for the upper 90% while excluding the lower 10% with levels = 0.1:0.1:1.0, mode = :relative
.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— No docs available.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
Makie.contourf! Function
contourf!
is the mutating variant of plotting function contourf
. Check the docstring for contourf
for further information.
Makie.crossbar Function
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 boxy
: position of the midline within the boxymin
: lower limit of the boxymax
: upper limit of the box
Plot type
The plot type alias for the crossbar
function is CrossBar
.
Attributes
color
= @inherit patchcolor
— No docs available.
colormap
= @inherit colormap
— No docs available.
colorrange
= automatic
— No docs available.
colorscale
= identity
— No docs available.
cycle
= [:color => :patchcolor]
— No docs available.
dodge
= automatic
— No docs available.
dodge_gap
= 0.03
— No docs available.
gap
= 0.2
— Shrinking factor, width -> width * (1 - gap)
.
inspectable
= @inherit inspectable
— No docs available.
midlinecolor
= automatic
— No docs available.
midlinewidth
= @inherit linewidth
— No docs available.
n_dodge
= automatic
— No docs available.
notchmax
= automatic
— Upper limit of the notch.
notchmin
= automatic
— Lower limit of the notch.
notchwidth
= 0.5
— Multiplier of width
for narrowest width of notch.
orientation
= :vertical
— Orientation of box (:vertical
or :horizontal
).
show_midline
= true
— Show midline.
show_notch
= false
— Whether to draw the notch.
strokecolor
= @inherit patchstrokecolor
— No docs available.
strokewidth
= @inherit patchstrokewidth
— No docs available.
width
= automatic
— Width of the box before shrinking.
Makie.crossbar! Function
crossbar!
is the mutating variant of plotting function crossbar
. Check the docstring for crossbar
for further information.
Makie.current_axis! Method
current_axis!(ax)
Set an axis ax
, which must be part of a figure, as the figure's current active axis.
Makie.current_axis! Method
current_axis!(fig::Figure, ax)
Set ax
as the current active axis in fig
.
Makie.current_axis Method
current_axis()
Returns the current active axis (or the last axis created). Returns nothing
if there is no current active axis.
Makie.current_figure Method
current_figure()
Returns the current active figure (or the last figure created). Returns nothing
if there is no current active figure.
Makie.data_limits Function
data_limits(scenelike[, exclude = plot -> false])
Returns the combined data limits of all plots collected under scenelike
for which exclude(plot) == false
. This is solely based on the positional data of a plot and thus does not include any transformations.
See also: boundingbox
Makie.data_limits Method
data_limits(plot::AbstractPlot)
Returns the bounding box of a plot based on just its position data.
See also: boundingbox
Makie.datashader Function
datashader(points::AbstractVector{<: Point})
Warning
This feature might change outside breaking releases, since the API is not yet finalized. Please be wary of bugs in the implementation and open issues if you encounter odd behaviour.
Points can be any array type supporting iteration & getindex, including memory mapped arrays. If you have separate arrays for x and y coordinates and want to avoid conversion and copy, consider using:
using Makie.StructArrays
points = StructArray{Point2f}((x, y))
datashader(points)
Do pay attention though, that if x and y don't have a fast iteration/getindex implemented, this might be slower than just copying the data into a new array.
For best performance, use method=Makie.AggThreads()
and make sure to start julia with julia -tauto
or have the environment variable JULIA_NUM_THREADS
set to the number of cores you have.
Plot type
The plot type alias for the datashader
function is DataShader
.
Attributes
agg
= AggCount{Float32}()
— Can be AggCount()
, AggAny()
or AggMean()
. Be sure, to use the correct element type e.g. AggCount{Float32}()
, which needs to accommodate the output of local_operation
. User-extensible by overloading:
struct MyAgg{T} <: Makie.AggOp end
MyAgg() = MyAgg{Float64}()
Makie.Aggregation.null(::MyAgg{T}) where {T} = zero(T)
Makie.Aggregation.embed(::MyAgg{T}, x) where {T} = convert(T, x)
Makie.Aggregation.merge(::MyAgg{T}, x::T, y::T) where {T} = x + y
Makie.Aggregation.value(::MyAgg{T}, x::T) where {T} = x
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
async
= true
— Will calculate get_aggregation
in a task, and skip any zoom/pan updates while busy. Great for interaction, but must be disabled for saving to e.g. png or when inlining in Documenter.
binsize
= 1
— Factor defining how many bins one wants per screen pixel. Set to n > 1 if you want a coarser image.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
interpolate
= false
— If the resulting image should be displayed interpolated. Note that interpolation can make NaN-adjacent bins also NaN in some backends, for example due to interpolation schemes used in GPU hardware. This can make it look like there are more NaN bins than there actually are.
local_operation
= identity
— Function which gets called on each element after the aggregation (map!(x-> local_operation(x), final_aggregation_result)
).
lowclip
= automatic
— The color for any value below the colorrange.
method
= AggThreads()
— Can be AggThreads()
or AggSerial()
for threaded vs. serial aggregation.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
operation
= automatic
— Defaults to Makie.equalize_histogram
function which gets called on the whole get_aggregation array before display (operation(final_aggregation_result)
).
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
point_transform
= identity
— Function which gets applied to every point before aggregating it.
show_timings
= false
— Set to true
to show how long it takes to aggregate each frame.
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
Makie.datashader! Function
datashader!
is the mutating variant of plotting function datashader
. Check the docstring for datashader
for further information.
Makie.deactivate_interaction! Method
deactivate_interaction!(parent, name::Symbol)
Deactivate the interaction named name
registered in parent
. It can be reactivated with activate_interaction!
.
Makie.density Function
density(values)
Plot a kernel density estimate of values
.
Plot type
The plot type alias for the density
function is Density
.
Attributes
bandwidth
= automatic
— Kernel density bandwidth, determined automatically if automatic
.
boundary
= automatic
— Boundary of the density estimation, determined automatically if automatic
.
color
= @inherit patchcolor
— Usually set to a single color, but can also be set to :x
or :y
to color with a gradient. If you use :y
when direction = :x
(or vice versa), note that only 2-element colormaps can work correctly.
colormap
= @inherit colormap
— No docs available.
colorrange
= Makie.automatic
— No docs available.
colorscale
= identity
— No docs available.
cycle
= [:color => :patchcolor]
— No docs available.
direction
= :x
— The dimension along which the values
are distributed. Can be :x
or :y
.
inspectable
= @inherit inspectable
— No docs available.
linestyle
= nothing
— No docs available.
npoints
= 200
— The resolution of the estimated curve along the dimension set in direction
.
offset
= 0.0
— Shift the density baseline, for layering multiple densities on top of each other.
strokearound
= false
— No docs available.
strokecolor
= @inherit patchstrokecolor
— No docs available.
strokewidth
= @inherit patchstrokewidth
— No docs available.
weights
= automatic
— Assign a vector of statistical weights to values
.
Makie.density! Function
density!
is the mutating variant of plotting function density
. Check the docstring for density
for further information.
Makie.deregister_interaction! Method
deregister_interaction!(parent, name::Symbol)
Deregister the interaction named name
registered in parent
.
Makie.ecdfplot Function
ecdfplot(values; npoints=10_000[, weights])
Plot the empirical cumulative distribution function (ECDF) of values
.
npoints
controls the resolution of the plot. If weights
for the values are provided, a weighted ECDF is plotted.
Plot type
The plot type alias for the ecdfplot
function is ECDFPlot
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= @inherit linecolor
— The color of the line.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
cycle
= [:color]
— Sets which attributes to cycle when creating multiple plots.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
fxaa
= false
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
joinstyle
= @inherit joinstyle
— Controls the rendering at corners. Options are :miter
for sharp corners, :bevel
for "cut off" corners, and :round
for rounded corners. If the corner angle is below miter_limit
, :miter
is equivalent to :bevel
to avoid long spikes.
linecap
= @inherit linecap
— Sets the type of line cap used. Options are :butt
(flat without extrusion), :square
(flat with half a linewidth extrusion) or :round
.
linestyle
= nothing
— Sets the dash pattern of the line. Options are :solid
(equivalent to nothing
), :dot
, :dash
, :dashdot
and :dashdotdot
. These can also be given in a tuple with a gap style modifier, either :normal
, :dense
or :loose
. For example, (:dot, :loose)
or (:dashdot, :dense)
.
For custom patterns have a look at Makie.Linestyle
.
linewidth
= @inherit linewidth
— Sets the width of the line in screen units
lowclip
= automatic
— The color for any value below the colorrange.
miter_limit
= @inherit miter_limit
— Sets the minimum inner join angle below which miter joins truncate. See also Makie.miter_distance_to_angle
.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
step
= :pre
— The step
parameter can take the following values:
:pre
: horizontal part of step extends to the left of each value inxs
.:post
: horizontal part of step extends to the right of each value inxs
.:center
: horizontal part of step extends halfway between the two adjacent values ofxs
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
Makie.ecdfplot! Function
ecdfplot!
is the mutating variant of plotting function ecdfplot
. Check the docstring for ecdfplot
for further information.
Makie.errorbars Function
errorbars(x, y, error_both; kwargs...)
errorbars(x, y, error_low, error_high; kwargs...)
errorbars(x, y, error_low_high; kwargs...)
errorbars(xy, error_both; kwargs...)
errorbars(xy, error_low, error_high; kwargs...)
errorbars(xy, error_low_high; kwargs...)
errorbars(xy_error_both; kwargs...)
errorbars(xy_error_low_high; kwargs...)
Plots errorbars at xy positions, extending by errors in the given direction
.
If you want to plot intervals from low to high values instead of relative errors, use rangebars
.
Plot type
The plot type alias for the errorbars
function is Errorbars
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= @inherit linecolor
— The color of the lines. Can be an array to color each bar separately.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
cycle
= [:color]
— No docs available.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
direction
= :y
— The direction in which the bars are drawn. Can be :x
or :y
.
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
linecap
= @inherit linecap
— No docs available.
linewidth
= @inherit linewidth
— The thickness of the lines in screen units.
lowclip
= automatic
— The color for any value below the colorrange.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
whiskerwidth
= 0
— The width of the whiskers or line caps in screen units.
Makie.errorbars! Function
errorbars!
is the mutating variant of plotting function errorbars
. Check the docstring for errorbars
for further information.
Makie.fill_between! Method
fill_between!(scenelike, x, y1, y2; where = nothing, kw_args...)
fill the section between 2 lines with the condition where
Makie.help Method
help(func[; extended = false])
Welcome to the main help function of Makie.jl
/ Makie.jl
.
For help on a specific function's arguments, type help_arguments(function_name)
.
For help on a specific function's attributes, type help_attributes(plot_Type)
.
Use the optional extended = true
keyword argument to see more details.
Makie.help_arguments Method
help_arguments([io], func)
Returns a list of signatures for function func
.
Makie.help_attributes Method
help_attributes([io], Union{PlotType, PlotFunction}; extended = false)
Returns a list of attributes for the plot type Typ
. The attributes returned extend those attributes found in the default_theme
.
Use the optional keyword argument extended
(default = false
) to show in addition the default values of each attribute. usage:
>help_attributes(scatter)
alpha
color
colormap
colorrange
distancefield
glowcolor
glowwidth
linewidth
marker
marker_offset
markersize
overdraw
rotations
strokecolor
strokewidth
transform_marker
transparency
uv_offset_width
visible
Makie.hexbin Function
hexbin(xs, ys; kwargs...)
Plots a heatmap with hexagonal bins for the observations xs
and ys
.
Plot type
The plot type alias for the hexbin
function is Hexbin
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
bins
= 20
— If an Int
, sets the number of bins in x and y direction. If a Tuple{Int, Int}
, sets the number of bins for x and y separately.
cellsize
= nothing
— If a Real
, makes equally-sided hexagons with width cellsize
. If a Tuple{Real, Real}
specifies hexagon width and height separately.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
highclip
= automatic
— The color for any value above the colorrange.
lowclip
= automatic
— The color for any value below the colorrange.
nan_color
= :transparent
— The color for NaN values.
strokecolor
= :black
— No docs available.
strokewidth
= 0
— No docs available.
threshold
= 1
— The minimal number of observations in the bin to be shown. If 0, all zero-count hexagons fitting into the data limits will be shown.
weights
= nothing
— Weights for each observation. Can be nothing
(each observation carries weight 1) or any AbstractVector{<: Real}
or StatsBase.AbstractWeights
.
Makie.hexbin! Function
hexbin!
is the mutating variant of plotting function hexbin
. Check the docstring for hexbin
for further information.
Makie.hidedecorations! Method
hidedecorations!(la::Axis; label = true, ticklabels = true, ticks = true,
grid = true, minorgrid = true, minorticks = true)
Hide decorations of both x and y-axis: label, ticklabels, ticks and grid. Keyword arguments can be used to disable hiding of certain types of decorations.
See also [hidexdecorations!
], [hideydecorations!
], [hidezdecorations!
]
Makie.hidedecorations! Method
hidedecorations!(ax::PolarAxis; ticklabels = true, grid = true, minorgrid = true)
Hide decorations of both r and theta-axis: label, ticklabels, ticks and grid. Keyword arguments can be used to disable hiding of certain types of decorations.
See also [hiderdecorations!
], [hidethetadecorations!
], [hidezdecorations!
]
Makie.hiderdecorations! Method
hiderdecorations!(ax::PolarAxis; ticklabels = true, grid = true, minorgrid = true)
Hide decorations of the r-axis: label, ticklabels, ticks and grid. Keyword arguments can be used to disable hiding of certain types of decorations.
Makie.hidespines! Method
hidespines!(la::Axis, spines::Symbol... = (:l, :r, :b, :t)...)
Hide all specified axis spines. Hides all spines by default, otherwise choose which sides to hide with the symbols :l (left), :r (right), :b (bottom) and :t (top).
Makie.hidethetadecorations! Method
hidethetadecorations!(ax::PolarAxis; ticklabels = true, grid = true, minorgrid = true)
Hide decorations of the theta-axis: label, ticklabels, ticks and grid. Keyword arguments can be used to disable hiding of certain types of decorations.
Makie.hidexdecorations! Method
hidexdecorations!(la::Axis; label = true, ticklabels = true, ticks = true, grid = true,
minorgrid = true, minorticks = true)
Hide decorations of the x-axis: label, ticklabels, ticks and grid. Keyword arguments can be used to disable hiding of certain types of decorations.
Makie.hideydecorations! Method
hideydecorations!(la::Axis; label = true, ticklabels = true, ticks = true, grid = true,
minorgrid = true, minorticks = true)
Hide decorations of the y-axis: label, ticklabels, ticks and grid. Keyword arguments can be used to disable hiding of certain types of decorations.
Makie.hidezdecorations! Method
hidezdecorations!(ax::Axis3; label = true, ticklabels = true, ticks = true, grid = true)
Hide decorations of the z-axis: label, ticklabels, ticks and grid. Keyword arguments can be used to disable hiding of certain types of decorations.
Makie.hist Function
hist(values)
Plot a histogram of values
.
Plot type
The plot type alias for the hist
function is Hist
.
Attributes
bar_labels
= nothing
— No docs available.
bins
= 15
— Can be an Int
to create that number of equal-width bins over the range of values
. Alternatively, it can be a sorted iterable of bin edges.
color
= @inherit patchcolor
— Color can either be:
a vector of
bins
colorsa single color
:values
, to color the bars with the values from the histogram
cycle
= [:color => :patchcolor]
— No docs available.
direction
= :y
— Set the direction of the bars.
fillto
= automatic
— Defines where the bars start.
flip_labels_at
= Inf
— No docs available.
gap
= 0
— Gap between the bars (see barplot).
label_color
= @inherit textcolor
— No docs available.
label_font
= @inherit font
— No docs available.
label_formatter
= bar_label_formatter
— No docs available.
label_offset
= 5
— No docs available.
label_size
= 20
— No docs available.
normalization
= :none
— Allows to normalize the histogram. Possible values are:
:pdf
: Normalize by sum of weights and bin sizes. Resulting histogram has norm 1 and represents a PDF.:density
: Normalize by bin sizes only. Resulting histogram represents count density of input and does not have norm 1. Will not modify the histogram if it already represents a density (h.isdensity == 1
).:probability
: Normalize by sum of weights only. Resulting histogram represents the fraction of probability mass for each bin and does not have norm 1.:none
: Do not normalize.
offset
= 0.0
— Adds an offset to every value.
over_background_color
= automatic
— No docs available.
over_bar_color
= automatic
— No docs available.
scale_to
= nothing
— Allows to scale all values to a certain height. This can also be set to :flip
to flip the direction of histogram bars without scaling them to a common height.
strokecolor
= @inherit patchstrokecolor
— No docs available.
strokewidth
= @inherit patchstrokewidth
— No docs available.
weights
= automatic
— Allows to statistically weight the observations.
Makie.hist! Function
hist!
is the mutating variant of plotting function hist
. Check the docstring for hist
for further information.
Makie.hlines Function
hlines(ys; xmin = 0.0, xmax = 1.0, attrs...)
Create horizontal lines across a Scene
with 2D projection. The lines will be placed at ys
in data coordinates and xmin
to xmax
in scene coordinates (0 to 1). All three of these can have single or multiple values because they are broadcast to calculate the final line segments.
Plot type
The plot type alias for the hlines
function is HLines
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= @inherit linecolor
— The color of the line.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
cycle
= [:color]
— Sets which attributes to cycle when creating multiple plots.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
fxaa
= false
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
linecap
= @inherit linecap
— Sets the type of linecap used, i.e. :butt (flat with no extrusion), :square (flat with 1 linewidth extrusion) or :round.
linestyle
= nothing
— Sets the dash pattern of the line. Options are :solid
(equivalent to nothing
), :dot
, :dash
, :dashdot
and :dashdotdot
. These can also be given in a tuple with a gap style modifier, either :normal
, :dense
or :loose
. For example, (:dot, :loose)
or (:dashdot, :dense)
.
For custom patterns have a look at Makie.Linestyle
.
linewidth
= @inherit linewidth
— Sets the width of the line in pixel units
lowclip
= automatic
— The color for any value below the colorrange.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
xmax
= 1
— The end of the lines in relative axis units (0 to 1) along the x dimension.
xmin
= 0
— The start of the lines in relative axis units (0 to 1) along the x dimension.
Makie.hlines! Function
hlines!
is the mutating variant of plotting function hlines
. Check the docstring for hlines
for further information.
Makie.hovered_scene Method
hovered_scene()
Returns the scene
that the mouse is currently hovering over.
Properly identifies the scene for a plot with multiple sub-plots.
Makie.hspan Function
hspan(ys_low, ys_high; xmin = 0.0, xmax = 1.0, attrs...)
hspan(ys_lowhigh; xmin = 0.0, xmax = 1.0, attrs...)
Create horizontal bands spanning across a Scene
with 2D projection. The bands will be placed from ys_low
to ys_high
in data coordinates and xmin
to xmax
in scene coordinates (0 to 1). All four of these can have single or multiple values because they are broadcast to calculate the final spans. Both bounds can be passed together as an interval ys_lowhigh
.
Plot type
The plot type alias for the hspan
function is HSpan
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= @inherit patchcolor
— Sets the color of the poly. Can be a Vector{<:Colorant}
for per vertex colors or a single Colorant
. A Matrix{<:Colorant}
can be used to color the mesh with a texture, which requires the mesh to contain texture coordinates. Vector or Matrices of numbers can be used as well, which will use the colormap arguments to map the numbers to colors. One can also use Makie.LinePattern
, to cover the poly with a regular stroke pattern.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
cycle
= [:color => :patchcolor]
— No docs available.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
joinstyle
= @inherit joinstyle
— No docs available.
linecap
= @inherit linecap
— No docs available.
linestyle
= nothing
— Sets the dash pattern of the line. Options are :solid
(equivalent to nothing
), :dot
, :dash
, :dashdot
and :dashdotdot
. These can also be given in a tuple with a gap style modifier, either :normal
, :dense
or :loose
. For example, (:dot, :loose)
or (:dashdot, :dense)
.
For custom patterns have a look at Makie.Linestyle
.
lowclip
= automatic
— The color for any value below the colorrange.
miter_limit
= @inherit miter_limit
— No docs available.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
shading
= NoShading
— No docs available.
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
stroke_depth_shift
= -1.0e-5
— Depth shift of stroke plot. This is useful to avoid z-fighting between the stroke and the fill.
strokecolor
= @inherit patchstrokecolor
— Sets the color of the outline around a marker.
strokecolormap
= @inherit colormap
— Sets the colormap that is sampled for numeric color
s.
strokewidth
= @inherit patchstrokewidth
— Sets the width of the outline.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
xmax
= 1
— The end of the bands in relative axis units (0 to 1) along the x dimension.
xmin
= 0
— The start of the bands in relative axis units (0 to 1) along the x dimension.
Makie.hspan! Function
hspan!
is the mutating variant of plotting function hspan
. Check the docstring for hspan
for further information.
Makie.is_mouseinside Method
is_mouseinside(scene)
Returns true if the current mouseposition is inside the given scene.
Makie.ispressed Function
ispressed(parent, result::Bool[, waspressed = nothing]) ispressed(parent, button::Union{Mouse.Button, Keyboard.Button[, waspressed = nothing]) ispressed(parent, collection::Union{Set, Vector, Tuple}[, waspressed = nothing]) ispressed(parent, op::BooleanOperator[, waspressed = nothing])
This function checks if a button or combination of buttons is pressed.
If given a true or false, ispressed
will return true or false respectively. This provides a way to turn an interaction "always on" or "always off" from the outside.
Passing a button or collection of buttons such as Keyboard.enter
or Mouse.left
will return true if all of the given buttons are pressed.
Parent can be any object that has get_scene
method implemented, which includes e.g. Figure, Axis, Axis3, Lscene, FigureAxisPlot, and AxisPlot.
For more complicated combinations of buttons they can be combined into boolean expression with &
, |
and !
. For example, you can have ispressed(parent, !Keyboard.left_control & Keyboard.c))
and ispressed(parent, Keyboard.left_control & Keyboard.c)
to avoid triggering both cases at the same time.
Furthermore you can also make any button, button collection or boolean expression exclusive by wrapping it in Exclusively(...)
. With that ispressed
will only return true if the currently pressed buttons match the request exactly.
For cases where you want to react to a release event you can optionally add a key or mousebutton waspressed
which is then assumed to be pressed regardless of it's current state. For example, when reacting to a mousebutton event, you can pass event.button
so that a key combination including that button still evaluates as true.
See also: And
, Or
, Not
, Exclusively
, &
, |
, !
Makie.labelslider! Method
labelslider!(scene, label, range; format = string, sliderkw = Dict(),
labelkw = Dict(), valuekw = Dict(), value_column_width = automatic, layoutkw...)
labelslider!
is deprecated, use SliderGrid
instead
Construct a horizontal GridLayout with a label, a slider and a value label in scene
.
Returns a NamedTuple
:
(slider = slider, label = label, valuelabel = valuelabel, layout = layout)
Specify a format function for the value label with the format
keyword or pass a format string used by Format.format
. The slider is forwarded the keywords from sliderkw
. The label is forwarded the keywords from labelkw
. The value label is forwarded the keywords from valuekw
. You can set the column width for the value label column with the keyword value_column_width
. By default, the width is determined heuristically by sampling a few values from the slider range. All other keywords are forwarded to the GridLayout
.
Example:
ls = labelslider!(scene, "Voltage:", 0:10; format = x -> "$(x)V")
layout[1, 1] = ls.layout
Makie.labelslidergrid! Method
labelslidergrid!(scene, labels, ranges; formats = [string],
sliderkw = Dict(), labelkw = Dict(), valuekw = Dict(),
value_column_width = automatic, layoutkw...)
labelslidergrid!
is deprecated, use SliderGrid
instead
Construct a GridLayout with a column of label, a column of sliders and a column of value labels in scene
. The argument values are broadcast, so you can use scalars if you want to keep labels, ranges or formats constant across rows.
Returns a NamedTuple
:
(sliders = sliders, labels = labels, valuelabels = valuelabels, layout = layout)
Specify format functions for the value labels with the formats
keyword or pass format strings used by Format.format
. The sliders are forwarded the keywords from sliderkw
. The labels are forwarded the keywords from labelkw
. The value labels are forwarded the keywords from valuekw
. You can set the column width for the value label column with the keyword value_column_width
. By default, the width is determined heuristically by sampling a few values from the slider ranges. All other keywords are forwarded to the GridLayout
.
Example:
ls = labelslidergrid!(scene, ["Voltage", "Ampere"], Ref(0:0.1:100); format = x -> "$(x)V")
layout[1, 1] = ls.layout
Makie.left_subsup Method
left_subsup(subscript, superscript; kwargs...)
Create a RichText
object representing a left subscript/superscript combination, where both scripts are right-aligned against the following text.
Makie.limits! Method
limits!(ax::Axis, xlims, ylims)
Set the axis limits to xlims
and ylims
. If limits are ordered high-low, this reverses the axis orientation.
Makie.limits! Method
limits!(ax::Axis, rect::Rect2)
Set the axis limits to rect
. If limits are ordered high-low, this reverses the axis orientation.
Makie.limits! Method
limits!(ax::Axis, x1, x2, y1, y2)
Set the axis x-limits to x1
and x2
and the y-limits to y1
and y2
. If limits are ordered high-low, this reverses the axis orientation.
Makie.limits! Method
limits!(ax::Axis3, xlims, ylims, zlims)
Set the axis limits to xlims
, ylims
, and zlims
. If limits are ordered high-low, this reverses the axis orientation.
Makie.limits! Method
limits!(ax::Axis3, rect::Rect3)
Set the axis limits to rect
. If limits are ordered high-low, this reverses the axis orientation.
Makie.limits! Method
limits!(ax::Axis3, x1, x2, y1, y2, z1, z2)
Set the axis x-limits to x1
and x2
, the y-limits to y1
and y2
, and the z-limits to z1
and z2
. If limits are ordered high-low, this reverses the axis orientation.
Makie.linkaxes! Method
linkaxes!(a::Axis, others...)
Link both x and y axes of all given Axis
so that they stay synchronized.
Makie.linkxaxes! Method
linkxaxes!(a::Axis, others...)
Link the x axes of all given Axis
so that they stay synchronized.
Makie.linkyaxes! Method
linkyaxes!(a::Axis, others...)
Link the y axes of all given Axis
so that they stay synchronized.
Makie.mouseover Method
mouseover(fig/ax/scene, plots::AbstractPlot...)
Returns true if the mouse currently hovers any of plots
.
Makie.mouseposition Method
mouseposition(scene = hovered_scene())
Return the current position of the mouse in data coordinates of the given scene
.
By default uses the scene
that the mouse is currently hovering over.
Makie.old_cam3d! Method
old_cam3d!(scene; kwargs...)
An alias to old_cam3d_turntable!
. Creates a 3D camera for scene
, which rotates around the plot's axis.
Makie.old_cam3d_cad! Method
old_cam3d_cad!(scene; kw_args...)
Creates a 3D camera for scene
which rotates around the viewer's "up" axis - similarly to how it's done in CAD software cameras.
Makie.old_cam3d_turntable! Method
old_cam3d_turntable!(scene; kw_args...)
Creates a 3D camera for scene
, which rotates around the plot's axis.
Makie.onmousedownoutside Method
Executes the function f whenever the MouseEventHandle
's observable is set to a MouseEvent with event.type === downoutside
.
Makie.onmouseenter Method
Executes the function f whenever the MouseEventHandle
's observable is set to a MouseEvent with event.type === enter
.
Makie.onmouseleftclick Method
Executes the function f whenever the MouseEventHandle
's observable is set to a MouseEvent with event.type === leftclick
.
Makie.onmouseleftdoubleclick Method
Executes the function f whenever the MouseEventHandle
's observable is set to a MouseEvent with event.type === leftdoubleclick
.
Makie.onmouseleftdown Method
Executes the function f whenever the MouseEventHandle
's observable is set to a MouseEvent with event.type === leftdown
.
Makie.onmouseleftdrag Method
Executes the function f whenever the MouseEventHandle
's observable is set to a MouseEvent with event.type === leftdrag
.
Makie.onmouseleftdragstart Method
Executes the function f whenever the MouseEventHandle
's observable is set to a MouseEvent with event.type === leftdragstart
.
Makie.onmouseleftdragstop Method
Executes the function f whenever the MouseEventHandle
's observable is set to a MouseEvent with event.type === leftdragstop
.
Makie.onmouseleftup Method
Executes the function f whenever the MouseEventHandle
's observable is set to a MouseEvent with event.type === leftup
.
Makie.onmousemiddleclick Method
Executes the function f whenever the MouseEventHandle
's observable is set to a MouseEvent with event.type === middleclick
.
Makie.onmousemiddledoubleclick Method
Executes the function f whenever the MouseEventHandle
's observable is set to a MouseEvent with event.type === middledoubleclick
.
Makie.onmousemiddledown Method
Executes the function f whenever the MouseEventHandle
's observable is set to a MouseEvent with event.type === middledown
.
Makie.onmousemiddledrag Method
Executes the function f whenever the MouseEventHandle
's observable is set to a MouseEvent with event.type === middledrag
.
Makie.onmousemiddledragstart Method
Executes the function f whenever the MouseEventHandle
's observable is set to a MouseEvent with event.type === middledragstart
.
Makie.onmousemiddledragstop Method
Executes the function f whenever the MouseEventHandle
's observable is set to a MouseEvent with event.type === middledragstop
.
Makie.onmousemiddleup Method
Executes the function f whenever the MouseEventHandle
's observable is set to a MouseEvent with event.type === middleup
.
Makie.onmouseout Method
Executes the function f whenever the MouseEventHandle
's observable is set to a MouseEvent with event.type === out
.
Makie.onmouseover Method
Executes the function f whenever the MouseEventHandle
's observable is set to a MouseEvent with event.type === over
.
Makie.onmouserightclick Method
Executes the function f whenever the MouseEventHandle
's observable is set to a MouseEvent with event.type === rightclick
.
Makie.onmouserightdoubleclick Method
Executes the function f whenever the MouseEventHandle
's observable is set to a MouseEvent with event.type === rightdoubleclick
.
Makie.onmouserightdown Method
Executes the function f whenever the MouseEventHandle
's observable is set to a MouseEvent with event.type === rightdown
.
Makie.onmouserightdrag Method
Executes the function f whenever the MouseEventHandle
's observable is set to a MouseEvent with event.type === rightdrag
.
Makie.onmouserightdragstart Method
Executes the function f whenever the MouseEventHandle
's observable is set to a MouseEvent with event.type === rightdragstart
.
Makie.onmouserightdragstop Method
Executes the function f whenever the MouseEventHandle
's observable is set to a MouseEvent with event.type === rightdragstop
.
Makie.onmouserightup Method
Executes the function f whenever the MouseEventHandle
's observable is set to a MouseEvent with event.type === rightup
.
Makie.onpick Function
onpick(func, plot)
Calls func
if one clicks on plot
. Implemented by the backend.
Makie.onpick Method
onpick(f, fig/ax/scene, plots::AbstractPlot...)
Calls f(plot, idx)
whenever the mouse is over any of plots
. idx
is an index, e.g. when over a scatter plot, it will be the index of the hovered element
Makie.origin! Method
origin!([mode = Absolute], t::Transformable, xyz...)
origin!([mode = Absolute], t::Transformable, xyz::VecTypes)
Sets the origin of the transformable t
to the given xyz
value. This affects the origin of rotate!(t, ...)
and scale!(t, ...)
. If mode
is given as Accum
the origin is translated by the given xyz
instead.
Makie.pick Method
pick(scene::Scene, rect::Rect2i)
Return all (plot, index)
pairs within the given rect. The rect must be within screen boundaries.
Makie.pick Method
pick(fig/ax/scene, x, y[, range])
pick(fig/ax/scene, xy::VecLike[, range])
Returns the plot and element index under the given pixel position xy = Vec(x, y)
. If range
is given, the nearest plot up to a distance of range
is returned instead.
The plot
returned by this function is always a primitive plot, i.e. one that is not composed of other plot types.
The index returned relates to the main input of the respective primitive plot.
For
scatter
andmeshscatter
it is an index into the positions given to the plot.For
text
it is an index into the merged character array.For
lines
andlinesegments
it is the end position of the selected line segment.For
image
,heatmap
andsurface
it is the linear index into the matrix argument of the plot (i.e. the given image, value or z-value matrix) that is closest to the selected position.For
voxels
it is the linear index into the given 3D Array.For
mesh
it is the largest vertex index of the picked triangle face.For
volume
it is always 0.
See also: pick_sorted
Makie.pie Function
pie(values; kwargs...)
pie(point, values; kwargs...)
pie(x, y, values; kwargs...)
Creates a pie chart from the given values
.
Plot type
The plot type alias for the pie
function is Pie
.
Attributes
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= :gray
— No docs available.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
inner_radius
= 0
— The inner radius of the pie segments. If this is larger than zero, the pie pieces become ring sections.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
normalize
= true
— If true
, the sum of all values is normalized to 2π (a full circle).
offset
= 0
— The angular offset of the first pie segment from the (1, 0) vector in radians.
offset_radius
= 0
— The offset of each pie segment from the center along the radius
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
radius
= 1
— The outer radius of the pie segments.
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
strokecolor
= :black
— No docs available.
strokewidth
= 1
— No docs available.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
vertex_per_deg
= 1
— Controls how many polygon vertices are used for one degree of rotation.
visible
= true
— Controls whether the plot will be rendered or not.
Makie.pie! Function
pie!
is the mutating variant of plotting function pie
. Check the docstring for pie
for further information.
Makie.plotlist Method
plotlist!(
[
PlotSpec(:Scatter, args...; kwargs...),
PlotSpec(:Lines, args...; kwargs...),
]
)
Plots a list of PlotSpec's, which can be an observable, making it possible to create efficiently animated plots with the following API:
Example
using GLMakie
import Makie.SpecApi as S
fig = Figure()
ax = Axis(fig[1, 1])
plots = Observable([S.heatmap(0 .. 1, 0 .. 1, Makie.peaks()), S.lines(0 .. 1, sin.(0:0.01:1); color=:blue)])
pl = plot!(ax, plots)
display(fig)
# Updating the plot dynamically
plots[] = [S.heatmap(0 .. 1, 0 .. 1, Makie.peaks()), S.lines(0 .. 1, sin.(0:0.01:1); color=:red)]
plots[] = [
S.image(0 .. 1, 0 .. 1, Makie.peaks()),
S.poly(Rect2f(0.45, 0.45, 0.1, 0.1)),
S.lines(0 .. 1, sin.(0:0.01:1); linewidth=10, color=Makie.resample_cmap(:viridis, 101)),
]
plots[] = [
S.surface(0..1, 0..1, Makie.peaks(); colormap = :viridis, translation = Vec3f(0, 0, -1)),
]
Makie.qqnorm Function
qqnorm(y; kwargs...)
Shorthand for qqplot(Normal(0,1), y)
, i.e., draw a Q-Q plot of y
against the standard normal distribution. See qqplot
for more details.
Plot type
The plot type alias for the qqnorm
function is QQNorm
.
Attributes
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= @inherit linecolor
— Control color of both line and markers (if markercolor
is not specified).
cycle
= [:color]
— No docs available.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
linestyle
= nothing
— No docs available.
linewidth
= @inherit linewidth
— No docs available.
marker
= @inherit marker
— No docs available.
markercolor
= automatic
— No docs available.
markersize
= @inherit markersize
— No docs available.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
strokecolor
= @inherit markerstrokecolor
— No docs available.
strokewidth
= @inherit markerstrokewidth
— No docs available.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
Makie.qqnorm! Function
qqnorm!
is the mutating variant of plotting function qqnorm
. Check the docstring for qqnorm
for further information.
Makie.qqplot Function
qqplot(x, y; kwargs...)
Draw a Q-Q plot, comparing quantiles of two distributions. y
must be a list of samples, i.e., AbstractVector{<:Real}
, whereas x
can be
a list of samples,
an abstract distribution, e.g.
Normal(0, 1)
,a distribution type, e.g.
Normal
.
In the last case, the distribution type is fitted to the data y
.
The attribute qqline
(defaults to :none
) determines how to compute a fit line for the Q-Q plot. Possible values are the following.
:identity
draws the identity line.:fit
computes a least squares line fit of the quantile pairs.:fitrobust
computes the line that passes through the first and third quartiles of the distributions.:none
omits drawing the line.
Broadly speaking, qqline = :identity
is useful to see if x
and y
follow the same distribution, whereas qqline = :fit
and qqline = :fitrobust
are useful to see if the distribution of y
can be obtained from the distribution of x
via an affine transformation.
Plot type
The plot type alias for the qqplot
function is QQPlot
.
Attributes
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= @inherit linecolor
— Control color of both line and markers (if markercolor
is not specified).
cycle
= [:color]
— No docs available.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
linestyle
= nothing
— No docs available.
linewidth
= @inherit linewidth
— No docs available.
marker
= @inherit marker
— No docs available.
markercolor
= automatic
— No docs available.
markersize
= @inherit markersize
— No docs available.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
strokecolor
= @inherit markerstrokecolor
— No docs available.
strokewidth
= @inherit markerstrokewidth
— No docs available.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
Makie.qqplot! Function
qqplot!
is the mutating variant of plotting function qqplot
. Check the docstring for qqplot
for further information.
Makie.rainclouds Function
rainclouds!(ax, category_labels, data_array; plot_boxplots=true, plot_clouds=true, kwargs...)
Plot a violin (/histogram), boxplot and individual data points with appropriate spacing between each.
Arguments
ax
: Axis used to place all these plots onto.category_labels
: TypicallyVector{String}
with a label for each element indata_array
data_array
: TypicallyVector{Float64}
used for to represent the datapoints to plot.
Keywords
Plot type
The plot type alias for the rainclouds
function is RainClouds
.
Attributes
boxplot_nudge
= 0.075
— Determines the distance away the boxplot should be placed from the center line when center_boxplot
is false
. This is the value used to recentering the boxplot.
boxplot_width
= 0.1
— Width of the boxplot on the category axis.
center_boxplot
= true
— Whether or not to center the boxplot on the category.
cloud_width
= 0.75
— Determines size of violin plot. Corresponds to width
keyword arg in violin
.
clouds
= violin
— [violin
, hist
, nothing
] how to show cloud plots, either as violin or histogram plots, or not at all.
color
= @inherit patchcolor
— A single color, or a vector of colors, one for each point.
cycle
= [:color => :patchcolor]
— No docs available.
dodge
= automatic
— Vector of Integer
(length of data) of grouping variable to create multiple side-by-side boxes at the same x position
dodge_gap
= 0.01
— Spacing between dodged boxes.
gap
= 0.2
— Distance between elements on the main axis (depending on orientation
).
hist_bins
= 30
— If clouds=hist
, this passes down the number of bins to the histogram call.
jitter_width
= 0.05
— Determines the width of the scatter-plot bar in category x-axis absolute terms.
markersize
= 2.0
— Size of marker used for the scatter plot.
n_dodge
= automatic
— The number of categories to dodge (defaults to maximum(dodge)
)
orientation
= :vertical
— Orientation of rainclouds (:vertical
or :horizontal
)
plot_boxplots
= true
— Whether to show boxplots to summarize distribution of data.
show_boxplot_outliers
= false
— Show outliers in the boxplot as points (usually confusing when paired with the scatter plot so the default is to not show them)
show_median
= true
— Determines whether or not to have a line for the median value in the boxplot.
side
= :left
— Can take values of :left
, :right
, determines where the violin plot will be, relative to the scatter points
side_nudge
= automatic
— Scatter plot specific. Default value is 0.02 if plot_boxplots
is true, otherwise 0.075
default.
strokewidth
= 1.0
— Determines the stroke width for the outline of the boxplot.
violin_limits
= (-Inf, Inf)
— Specify values to trim the violin
. Can be a Tuple
or a Function
(e.g. datalimits=extrema
)
whiskerwidth
= 0.5
— The width of the Q1, Q3 whisker in the boxplot. Value as a portion of the boxplot_width
.
Makie.rainclouds! Function
rainclouds!
is the mutating variant of plotting function rainclouds
. Check the docstring for rainclouds
for further information.
Makie.rangebars Function
rangebars(val, low, high; kwargs...)
rangebars(val, low_high; kwargs...)
rangebars(val_low_high; kwargs...)
Plots rangebars at val
in one dimension, extending from low
to high
in the other dimension given the chosen direction
. The low_high
argument can be a vector of tuples or intervals.
If you want to plot errors relative to a reference value, use errorbars
.
Plot type
The plot type alias for the rangebars
function is Rangebars
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= @inherit linecolor
— The color of the lines. Can be an array to color each bar separately.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
cycle
= [:color]
— No docs available.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
direction
= :y
— The direction in which the bars are drawn. Can be :x
or :y
.
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
linecap
= @inherit linecap
— No docs available.
linewidth
= @inherit linewidth
— The thickness of the lines in screen units.
lowclip
= automatic
— The color for any value below the colorrange.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
whiskerwidth
= 0
— The width of the whiskers or line caps in screen units.
Makie.rangebars! Function
rangebars!
is the mutating variant of plotting function rangebars
. Check the docstring for rangebars
for further information.
Makie.record Method
record(func, figurelike, path; backend=current_backend(), kwargs...)
record(func, figurelike, path, iter; backend=current_backend(), kwargs...)
The first signature provides func
with a VideoStream, which it should call recordframe!(io)
on when recording a frame.
The second signature iterates iter
, calling recordframe!(io)
internally after calling func
with the current iteration element.
Both notations require a Figure, FigureAxisPlot or Scene figure
to work. The animation is then saved to path
, with the format determined by path
's extension.
Under the hood, record
is just video_io = Record(func, figurelike, [iter]; same_kw...); save(path, video_io)
. Record
can be used directly as well to do the saving at a later point, or to inline a video directly into a Notebook (the video supports, show(video_io, "text/html")
for that purpose).
Options one can pass via kwargs...
:
backend::Module = current_backend()
: set the backend to write out video, can be set toCairoMakie
,GLMakie
,WGLMakie
,RPRMakie
.
Backend options
See ?Backend.Screen
or Base.doc(Backend.Screen)
for applicable options that can be passed and forwarded to the backend.
Video options
format = "mkv"
: The format of the video. If a path is present, will be inferred from the file extension. Can be one of the following:"mkv"
(open standard, the default)"mp4"
(good for Web, most supported format)"webm"
(smallest file size)"gif"
(largest file size for the same quality)
mp4
andmk4
are marginally bigger thanwebm
.gif
s can be significantly (as much as 6x) larger with worse quality (due to the limited color palette) and only should be used as a last resort, for playing in a context where videos aren't supported.framerate = 24
: The target framerate.compression = 20
: Controls the video compression viaffmpeg
's-crf
option, with smaller numbers giving higher quality and larger file sizes (lower compression), and higher numbers giving lower quality and smaller file sizes (higher compression). The minimum value is0
(lossless encoding).- For
mp4
,51
is the maximum. Note thatcompression = 0
only works withmp4
if
profile = "high444"
.For
webm
,63
is the maximum.compression
has no effect onmkv
andgif
outputs.
- For
profile = "high422"
: A ffmpeg compatible profile. Currently only applies tomp4
. If
you have issues playing a video, try profile = "high"
or profile = "main"
.
pixel_format = "yuv420p"
: A ffmpeg compatible pixel format (-pix_fmt
). Currently only
applies to mp4
. Defaults to yuv444p
for profile = "high444"
.
loop = 0
: Number of times the video is repeated, for agif
orhtml
output. Defaults to0
, which
means infinite looping. A value of -1
turns off looping, and a value of n > 0
means n
repetitions (i.e. the video is played n+1
times) when supported by backend.
!!! warning
`profile` and `pixel_format` are only used when `format` is `"mp4"`; a warning will be issued if `format`
is not `"mp4"` and those two arguments are not `nothing`. Similarly, `compression` is only
valid when `format` is `"mp4"` or `"webm"`.
Typical usage
record(figure, "video.mp4", itr) do i
func(i) # or some other manipulation of the figure
end
or, for more tweakability,
record(figure, "test.gif") do io
for i = 1:100
func!(figure) # animate figure
recordframe!(io) # record a new frame
end
end
If you want a more tweakable interface, consider using VideoStream
and save
.
Extended help
Examples
fig, ax, p = lines(rand(10))
record(fig, "test.gif") do io
for i in 1:255
p[:color] = RGBf(i/255, (255 - i)/255, 0) # animate figure
recordframe!(io)
end
end
or
fig, ax, p = lines(rand(10))
record(fig, "test.gif", 1:255) do i
p[:color] = RGBf(i/255, (255 - i)/255, 0) # animate figure
end
Makie.record_events Method
record_events(f, scene::Scene, path::String)
Records all window events that happen while executing function f
for scene
and serializes them to path
.
Makie.recordframe! Method
recordframe!(io::VideoStream)
Adds a video frame to the VideoStream io
.
Makie.register_interaction! Method
register_interaction!(parent, name::Symbol, interaction)
Register interaction
with parent
under the name name
. The parent will call process_interaction(interaction, event, parent)
whenever suitable events happen.
The interaction can be removed with deregister_interaction!
or temporarily toggled with activate_interaction!
/ deactivate_interaction!
.
Makie.register_interaction! Method
register_interaction!(interaction::Function, parent, name::Symbol)
Register interaction
with parent
under the name name
. The parent will call process_interaction(interaction, event, parent)
whenever suitable events happen. This form with the first Function
argument is especially intended for do
syntax.
The interaction can be removed with deregister_interaction!
or temporarily toggled with activate_interaction!
/ deactivate_interaction!
.
Makie.replace_automatic! Method
Like get!(f, dict, key)
but also calls f
and replaces key
when the corresponding value is nothing
Makie.replay_events Method
replay_events(f, scene::Scene, path::String) replay_events(scene::Scene, path::String)
Replays the serialized events recorded with record_events
in path
in scene
.
Makie.resample_cmap Method
resample_cmap(cmap, ncolors::Integer; alpha=1.0)
cmap: anything that
to_colormap
acceptsncolors: number of desired colors
alpha: additional alpha applied to each color. Can also be an array, matching
colors
, or a tuple giving a start + stop alpha value.
Makie.reset_limits! Method
reset_limits!(ax; xauto = true, yauto = true)
Resets the axis limits depending on the value of ax.limits
. If one of the two components of limits is nothing, that value is either copied from the targetlimits if xauto
or yauto
is false, respectively, or it is determined automatically from the plots in the axis. If one of the components is a tuple of two numbers, those are used directly.
Makie.resize_to_layout! Method
resize_to_layout!(fig::Figure)
Resize fig
so that it fits the current contents of its top GridLayout
. If a GridLayout
contains fixed-size content or aspect-constrained columns, for example, it is likely that the solved size of the GridLayout
differs from the size of the Figure
. This can result in superfluous whitespace at the borders, or content clipping at the figure edges. Once resized, all content should fit the available space, including the Figure
's outer padding.
Makie.rich Method
rich(args...; kwargs...)
Create a RichText
object containing all elements in args
.
Makie.rlims! Method
rlims!(ax::PolarAxis[, rmin], rmax)
Sets the radial limits of a given PolarAxis
.
Makie.rotate! Method
rotate!(t::Transformable, axis_rot::Quaternion)
rotate!(t::Transformable, axis_rot::Real)
rotate!(t::Transformable, axis_rot...)
Apply an absolute rotation to the transformable. Rotations are all internally converted to Quaternion
s.
Makie.rotate! Method
rotate!(Accum, t::Transformable, axis_rot...)
Apply a relative rotation to the transformable, by multiplying by the current rotation.
Makie.rotate_cam! Function
rotate_cam!(scene, cam::Camera3D, angles::Vec3)
Rotates the camera by the given angles
around the camera x- (left, right), y- (up, down) and z-axis (in out). The rotation around the y axis is applied first, then x, then y.
Note that this method reacts to fix_x_key
etc and fixed_axis
. The former restrict the rotation around a specific axis when a given key is pressed. The latter keeps the camera y axis fixed as the data space z axis.
Makie.rotate_cam! Method
rotate_cam!(scene::Scene, theta_v::Number...)
rotate_cam!(scene::Scene, theta_v::VecTypes)
Rotate the camera of the Scene by the given rotation. Passing theta_v = (α, β, γ)
will rotate the camera according to the Euler angles (α, β, γ).
Makie.scale! Method
scale!([mode = Absolute], t::Transformable, xyz...)
scale!([mode = Absolute], t::Transformable, xyz::VecTypes)
Scale the given t::Transformable
(a Scene or Plot) to the given arguments xyz
. Any missing dimension will be scaled by 1. If mode == Accum
the given scaling will be multiplied with the previous one.
Makie.scatterlines Function
scatterlines(xs, ys, [zs]; kwargs...)
Plots scatter
markers and lines
between them.
Plot type
The plot type alias for the scatterlines
function is ScatterLines
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= @inherit linecolor
— The color of the line, and by default also of the scatter markers.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
cycle
= [:color]
— No docs available.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
joinstyle
= @inherit joinstyle
— No docs available.
linecap
= @inherit linecap
— No docs available.
linestyle
= nothing
— Sets the pattern of the line e.g. :solid
, :dot
, :dashdot
. For custom patterns look at Linestyle(Number[...])
linewidth
= @inherit linewidth
— Sets the width of the line in screen units
lowclip
= automatic
— The color for any value below the colorrange.
marker
= @inherit marker
— Sets the scatter marker.
markercolor
= automatic
— No docs available.
markercolormap
= automatic
— No docs available.
markercolorrange
= automatic
— No docs available.
markersize
= @inherit markersize
— Sets the size of the marker.
miter_limit
= @inherit miter_limit
— No docs available.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
strokecolor
= @inherit markerstrokecolor
— Sets the color of the outline around a marker.
strokewidth
= @inherit markerstrokewidth
— Sets the width of the outline around a marker.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
Makie.scatterlines! Function
scatterlines!
is the mutating variant of plotting function scatterlines
. Check the docstring for scatterlines
for further information.
Makie.select_line Method
select_line(scene; kwargs...) -> line
Interactively select a line (typically an arrow) on a 2D scene
by clicking the left mouse button, dragging and then un-clicking. Return an observable whose value corresponds to the selected line on the scene. In addition the function plots the line on the scene as the user clicks and moves the mouse around. When the button is not clicked any more, the plotted line disappears.
The value of the returned line is updated only when the user un-clicks and only if the selected line has non-zero length.
The kwargs...
are propagated into lines!
which plots the selected line.
Makie.select_point Method
select_point(scene; kwargs...) -> point
Interactively select a point on a 2D scene
by clicking the left mouse button, dragging and then un-clicking. Return an observable whose value corresponds to the selected point on the scene. In addition the function plots the point on the scene as the user clicks and moves the mouse around. When the button is not clicked any more, the plotted point disappears.
The value of the returned point is updated only when the user un-clicks.
The kwargs...
are propagated into scatter!
which plots the selected point.
Makie.select_rectangle Method
select_rectangle(scene; kwargs...) -> rect
Interactively select a rectangle on a 2D scene
by clicking the left mouse button, dragging and then un-clicking. The function returns an observable rect
whose value corresponds to the selected rectangle on the scene. In addition the function plots the selected rectangle on the scene as the user clicks and moves the mouse around. When the button is not clicked any more, the plotted rectangle disappears.
The value of the returned observable is updated only when the user un-clicks (i.e. when the final value of the rectangle has been decided) and only if the rectangle has area > 0.
The kwargs...
are propagated into lines!
which plots the selected rectangle.
Makie.series Function
series(curves)
Curves can be:
AbstractVector{<: AbstractVector{<: Point2}}
: the native representation of a series as a vector of linesAbstractMatrix
: each row represents y coordinates of the line, whilex
goes from1:size(curves, 1)
AbstractVector, AbstractMatrix
: the same as the above, but the first argument sets the x values for all linesAbstractVector{<: Tuple{X<: AbstractVector, Y<: AbstractVector}}
: A vector of tuples, where each tuple contains a vector for the x and y coordinates
If any of marker
, markersize
, markercolor
, strokecolor
or strokewidth
is set != nothing, a scatterplot is added.
Plot type
The plot type alias for the series
function is Series
.
Attributes
color
= :lighttest
— No docs available.
joinstyle
= @inherit joinstyle
— No docs available.
labels
= nothing
— No docs available.
linecap
= @inherit linecap
— No docs available.
linestyle
= :solid
— No docs available.
linewidth
= 2
— No docs available.
marker
= nothing
— No docs available.
markercolor
= automatic
— No docs available.
markersize
= nothing
— No docs available.
miter_limit
= @inherit miter_limit
— No docs available.
solid_color
= nothing
— No docs available.
space
= :data
— No docs available.
strokecolor
= nothing
— No docs available.
strokewidth
= nothing
— No docs available.
Makie.series! Function
series!
is the mutating variant of plotting function series
. Check the docstring for series
for further information.
Makie.set_close_to! Method
Set the slider
to the values in the slider's range that are closest to v1
and v2
, and return those values ordered min, misl.
Makie.set_close_to! Method
set_close_to!(slider, value) -> closest_value
Set the slider
to the value in the slider's range that is closest to value
and return this value. This function should be used to set a slider to a value programmatically, rather than mutating its value observable directly, which doesn't update the slider visually.
Makie.set_theme! Function
set_theme!(theme; kwargs...)
Set the global default theme to theme
and add / override any attributes given as keyword arguments.
Makie.showgradients Method
showgradients(
cgrads::AbstractVector{Symbol};
h = 0.0, offset = 0.2, fontsize = 0.7,
size = (800, length(cgrads) * 84)
)::Scene
Plots the given colour gradients arranged as horizontal colourbars. If you change the offsets or the font size, you may need to change the resolution.
Makie.spy Function
spy(z::AbstractSparseArray) spy(x_range::NTuple{2, Number}, y_range::NTuple{2, Number}, z::AbstractSparseArray) spy(x_range::ClosedInterval, y_range::ClosedInterval, z::AbstractSparseArray)
Visualizes big sparse matrices. Usage:
using SparseArrays, GLMakie
N = 200_000
x = sprand(Float64, N, N, (3(10^6)) / (N*N));
spy(x)
# or if you want to specify the range of x and y:
spy(0..1, 0..1, x)
Plot type
The plot type alias for the spy
function is Spy
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= nothing
— Per default the color of the markers will be determined by the value in the matrix, but can be overwritten via color
.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
framecolor
= :black
— By default a frame will be drawn around the data, which uses the framecolor
attribute for its color.
framesize
= 1
— The linewidth of the frame
framevisible
= true
— Whether or not to draw the frame.
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
lowclip
= automatic
— The color for any value below the colorrange.
marker
= Rect
— Can be any of the markers supported by scatter!
. Note, for huge sparse arrays, one should use FastPixel
, which is a very fast, but can only render square markers. So, without Axis(...; aspect=1)
, the markers won't have the correct size. Compare:
data = sprand(10, 10, 0.5)
f = Figure()
spy(f[1, 1], data; marker=FastPixel())
spy(f[1, 2], data; marker=FastPixel(), axis=(; aspect=1))
f
marker_gap
= 0
— Makes the marker size smaller to create a gap between the markers. The unit of this is in data space.
markersize
= automatic
— markersize=automatic, will make the marker size fit the data - but can also be set manually.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
Makie.spy! Function
spy!
is the mutating variant of plotting function spy
. Check the docstring for spy
for further information.
Makie.stairs Function
stairs(xs, ys; kwargs...)
Plot a stair function.
The conversion trait of stairs
is PointBased
.
Plot type
The plot type alias for the stairs
function is Stairs
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= @inherit linecolor
— The color of the line.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
cycle
= [:color]
— Sets which attributes to cycle when creating multiple plots.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
fxaa
= false
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
joinstyle
= @inherit joinstyle
— Controls the rendering at corners. Options are :miter
for sharp corners, :bevel
for "cut off" corners, and :round
for rounded corners. If the corner angle is below miter_limit
, :miter
is equivalent to :bevel
to avoid long spikes.
linecap
= @inherit linecap
— Sets the type of line cap used. Options are :butt
(flat without extrusion), :square
(flat with half a linewidth extrusion) or :round
.
linestyle
= nothing
— Sets the dash pattern of the line. Options are :solid
(equivalent to nothing
), :dot
, :dash
, :dashdot
and :dashdotdot
. These can also be given in a tuple with a gap style modifier, either :normal
, :dense
or :loose
. For example, (:dot, :loose)
or (:dashdot, :dense)
.
For custom patterns have a look at Makie.Linestyle
.
linewidth
= @inherit linewidth
— Sets the width of the line in screen units
lowclip
= automatic
— The color for any value below the colorrange.
miter_limit
= @inherit miter_limit
— Sets the minimum inner join angle below which miter joins truncate. See also Makie.miter_distance_to_angle
.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
step
= :pre
— The step
parameter can take the following values:
:pre
: horizontal part of step extends to the left of each value inxs
.:post
: horizontal part of step extends to the right of each value inxs
.:center
: horizontal part of step extends halfway between the two adjacent values ofxs
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
Makie.stairs! Function
stairs!
is the mutating variant of plotting function stairs
. Check the docstring for stairs
for further information.
Makie.stem Function
stem(xs, ys, [zs]; kwargs...)
Plots markers at the given positions extending from offset
along stem lines.
The conversion trait of stem
is PointBased
.
Plot type
The plot type alias for the stem
function is Stem
.
Attributes
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= @inherit markercolor
— No docs available.
colormap
= @inherit colormap
— No docs available.
colorrange
= automatic
— No docs available.
colorscale
= identity
— No docs available.
cycle
= [[:stemcolor, :color, :trunkcolor] => :color]
— No docs available.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
marker
= :circle
— No docs available.
markersize
= @inherit markersize
— No docs available.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
offset
= 0
— Can be a number, in which case it sets y
for 2D, and z
for 3D stems. It can be a Point2
for 2D plots, as well as a Point3
for 3D plots. It can also be an iterable of any of these at the same length as xs
, ys
, zs
.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
stemcolor
= @inherit linecolor
— No docs available.
stemcolormap
= @inherit colormap
— No docs available.
stemcolorrange
= automatic
— No docs available.
stemlinestyle
= nothing
— No docs available.
stemwidth
= @inherit linewidth
— No docs available.
strokecolor
= @inherit markerstrokecolor
— No docs available.
strokewidth
= @inherit markerstrokewidth
— No docs available.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
trunkcolor
= @inherit linecolor
— No docs available.
trunkcolormap
= @inherit colormap
— No docs available.
trunkcolorrange
= automatic
— No docs available.
trunklinestyle
= nothing
— No docs available.
trunkwidth
= @inherit linewidth
— No docs available.
visible
= true
— Controls whether the plot will be rendered or not.
Makie.stem! Function
stem!
is the mutating variant of plotting function stem
. Check the docstring for stem
for further information.
Makie.stephist Function
stephist(values)
Plot a step histogram of values
.
Plot type
The plot type alias for the stephist
function is StepHist
.
Attributes
bins
= 15
— Can be an Int
to create that number of equal-width bins over the range of values
. Alternatively, it can be a sorted iterable of bin edges.
color
= @inherit patchcolor
— No docs available.
cycle
= [:color => :patchcolor]
— No docs available.
linestyle
= :solid
— No docs available.
linewidth
= @inherit linewidth
— No docs available.
normalization
= :none
— Allows to apply a normalization to the histogram. Possible values are:
:pdf
: Normalize by sum of weights and bin sizes. Resulting histogram
has norm 1 and represents a PDF.
:density
: Normalize by bin sizes only. Resulting histogram represents
count density of input and does not have norm 1. Will not modify the histogram if it already represents a density (h.isdensity == 1
).
:probability
: Normalize by sum of weights only. Resulting histogram
represents the fraction of probability mass for each bin and does not have norm 1.
:none
: Do not normalize.
scale_to
= nothing
— Allows to scale all values to a certain height.
weights
= automatic
— Allows to provide statistical weights.
Makie.stephist! Function
stephist!
is the mutating variant of plotting function stephist
. Check the docstring for stephist
for further information.
Makie.streamplot Function
streamplot(f::function, xinterval, yinterval; color = norm, kwargs...)
f must either accept f(::Point)
or f(x::Number, y::Number)
. f must return a Point2.
Example:
v(x::Point2{T}) where T = Point2f(x[2], 4*x[1])
streamplot(v, -2..2, -2..2)
Implementation
See the function Makie.streamplot_impl
for implementation details.
Plot type
The plot type alias for the streamplot
function is StreamPlot
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
arrow_head
= automatic
— No docs available.
arrow_size
= automatic
— No docs available.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= norm
— One can choose the color of the lines by passing a function color_func(dx::Point)
to the color
attribute. This can be set to any function or composition of functions. The dx
which is passed to color_func
is the output of f
at the point being colored.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
density
= 1.0
— No docs available.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
gridsize
= (32, 32, 32)
— No docs available.
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
joinstyle
= @inherit joinstyle
— No docs available.
linecap
= @inherit linecap
— No docs available.
linestyle
= nothing
— No docs available.
linewidth
= @inherit linewidth
— No docs available.
lowclip
= automatic
— The color for any value below the colorrange.
maxsteps
= 500
— No docs available.
miter_limit
= @inherit miter_limit
— No docs available.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
quality
= 16
— No docs available.
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
stepsize
= 0.01
— No docs available.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
Makie.streamplot! Function
streamplot!
is the mutating variant of plotting function streamplot
. Check the docstring for streamplot
for further information.
Makie.subscript Method
subscript(args...; kwargs...)
Create a RichText
object representing a superscript containing all elements in args
.
Makie.subsup Method
subsup(subscript, superscript; kwargs...)
Create a RichText
object representing a right subscript/superscript combination, where both scripts are left-aligned against the preceding text.
Makie.superscript Method
superscript(args...; kwargs...)
Create a RichText
object representing a superscript containing all elements in args
.
Makie.thetalims! Method
thetalims!(ax::PolarAxis, thetamin, thetamax)
Sets the angular limits of a given PolarAxis
.
Makie.tight_ticklabel_spacing! Method
tight_ticklabel_spacing!(ax::Axis)
Sets the space allocated for the xticklabels and yticklabels of the Axis
to the minimum that is needed.
Makie.tight_ticklabel_spacing! Method
space = tight_ticklabel_spacing!(cb::Colorbar)
Sets the space allocated for the ticklabels of the Colorbar
to the minimum that is needed and returns that value.
Makie.tight_xticklabel_spacing! Method
space = tight_xticklabel_spacing!(ax::Axis)
Sets the space allocated for the xticklabels of the Axis
to the minimum that is needed and returns that value.
Makie.tight_yticklabel_spacing! Method
space = tight_yticklabel_spacing!(ax::Axis)
Sets the space allocated for the yticklabels of the Axis
to the minimum that is needed and returns that value.
Makie.tightlimits! Method
tightlimits!(la::Axis, sides::Union{Left, Right, Bottom, Top}...)
Sets the autolimit margins to zero on all given sides.
Example:
tightlimits!(laxis, Bottom())
Makie.tightlimits! Method
tightlimits!(la::Axis)
Sets the autolimit margins to zero on all sides.
Makie.timeseries Function
timeseries(x::Observable{{Union{Number, Point2}}})
Plots a sampled signal.
Usage:
signal = Observable(1.0)
scene = timeseries(signal)
display(scene)
# @async is optional, but helps to continue evaluating more code
@async while isopen(scene)
# acquire data from e.g. a sensor:
data = rand()
# update the signal
signal[] = data
# sleep/ wait for new data/ whatever...
# It's important to yield here though, otherwise nothing will be rendered
sleep(1/30)
end
Plot type
The plot type alias for the timeseries
function is TimeSeries
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= @inherit linecolor
— The color of the line.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
cycle
= [:color]
— Sets which attributes to cycle when creating multiple plots.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
fxaa
= false
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
history
= 100
— No docs available.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
joinstyle
= @inherit joinstyle
— Controls the rendering at corners. Options are :miter
for sharp corners, :bevel
for "cut off" corners, and :round
for rounded corners. If the corner angle is below miter_limit
, :miter
is equivalent to :bevel
to avoid long spikes.
linecap
= @inherit linecap
— Sets the type of line cap used. Options are :butt
(flat without extrusion), :square
(flat with half a linewidth extrusion) or :round
.
linestyle
= nothing
— Sets the dash pattern of the line. Options are :solid
(equivalent to nothing
), :dot
, :dash
, :dashdot
and :dashdotdot
. These can also be given in a tuple with a gap style modifier, either :normal
, :dense
or :loose
. For example, (:dot, :loose)
or (:dashdot, :dense)
.
For custom patterns have a look at Makie.Linestyle
.
linewidth
= @inherit linewidth
— Sets the width of the line in screen units
lowclip
= automatic
— The color for any value below the colorrange.
miter_limit
= @inherit miter_limit
— Sets the minimum inner join angle below which miter joins truncate. See also Makie.miter_distance_to_angle
.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
Makie.timeseries! Function
timeseries!
is the mutating variant of plotting function timeseries
. Check the docstring for timeseries
for further information.
Makie.to_align Method
to_align(align[, error_prefix])
Converts the given align to a Vec2f
. Can convert VecTypes{2}
and two component Tuple
s with Real
and Symbol
elements.
To specify a custom error message you can add an error_prefix
or use halign2num(value, error_msg)
and valign2num(value, error_msg)
respectively.
Makie.to_colormap Method
to_colormap(b::AbstractVector)
An AbstractVector{T}
with any object that to_color
accepts.
Makie.to_colormap Method
to_colormap(cs::Union{String, Symbol})::Vector{RGBAf}
A Symbol/String naming the gradient. For more on what names are available please see: available_gradients()
. For now, we support gradients from PlotUtils
natively.
Makie.to_font Method
to_font(str::String)
Loads a font specified by str
and returns a NativeFont
object storing the font handle. A font can either be specified by a file path, such as "folder/with/fonts/font.otf", or by a (partial) name such as "Helvetica", "Helvetica Bold" etc.
Makie.to_rotation Method
rotation accepts:
to_rotation(b, quaternion)
to_rotation(b, tuple_float)
to_rotation(b, vec4)
Makie.tooltip Function
tooltip(position, string)
tooltip(x, y, string)
Creates a tooltip pointing at position
displaying the given `string
Plot type
The plot type alias for the tooltip
function is Tooltip
.
Attributes
align
= 0.5
— Sets the alignment of the tooltip relative position
. With align = 0.5
the tooltip is centered above/below/left/right the position
.
backgroundcolor
= :white
— Sets the background color of the tooltip.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
font
= @inherit font
— Sets the font.
fontsize
= 16
— Sets the text size in screen units.
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
inspectable
= false
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
justification
= :left
— Sets whether text is aligned to the :left
, :center
or :right
within its bounding box.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
offset
= 10
— Sets the offset between the given position
and the tip of the triangle pointing at that position.
outline_color
= :black
— Sets the color of the tooltip outline.
outline_linestyle
= nothing
— Sets the linestyle of the tooltip outline.
outline_linewidth
= 2.0
— Sets the linewidth of the tooltip outline.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
placement
= :above
— Sets where the tooltip should be placed relative to position
. Can be :above
, :below
, :left
, :right
.
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
strokecolor
= :white
— Sets the text outline color.
strokewidth
= 0
— Gives text an outline if set to a positive value.
text
= ""
— No docs available.
textcolor
= @inherit textcolor
— Sets the text color.
textpadding
= (4, 4, 4, 4)
— Sets the padding around text in the tooltip. This is given as (left, right, bottom, top)
offsets.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
triangle_size
= 10
— Sets the size of the triangle pointing at position
.
visible
= true
— Controls whether the plot will be rendered or not.
xautolimits
= false
— No docs available.
yautolimits
= false
— No docs available.
zautolimits
= false
— No docs available.
Makie.tooltip! Function
tooltip!
is the mutating variant of plotting function tooltip
. Check the docstring for tooltip
for further information.
Makie.translate! Method
translate!(t::Transformable, xyz::VecTypes)
translate!(t::Transformable, xyz...)
Apply an absolute translation to the given Transformable
(a Scene or Plot), translating it to x, y, z
.
Makie.translate! Method
translate!(Accum, t::Transformable, xyz...)
Translate the given Transformable
(a Scene or Plot), relative to its current position.
Makie.translate_cam! Method
translate_cam!(scene, cam::Camera3D, v::Vec3)
Translates the camera by the given vector in camera space, i.e. by v[1]
to the right, v[2]
to the top and v[3]
forward.
Note that this method reacts to fix_x_key
etc. If any of those keys are pressed the translation will be restricted to act in these directions.
Makie.translate_cam! Method
translate_cam!(scene::Scene, translation::VecTypes)
Translate the camera by a translation vector given in camera space.
Makie.tricontourf Function
tricontourf(triangles::Triangulation, zs; kwargs...)
tricontourf(xs, ys, zs; kwargs...)
Plots a filled tricontour of the height information in zs
at the horizontal positions xs
and vertical positions ys
. A Triangulation
from DelaunayTriangulation.jl can also be provided instead of xs
and ys
for specifying the triangles, otherwise an unconstrained triangulation of xs
and ys
is computed.
Plot type
The plot type alias for the tricontourf
function is Tricontourf
.
Attributes
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
colormap
= @inherit colormap
— Sets the colormap from which the band colors are sampled.
colorscale
= identity
— Color transform function
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
edges
= nothing
— No docs available.
extendhigh
= nothing
— This sets the color of an optional additional band from the highest value of levels
to maximum(zs)
. If it's :auto
, the high end of the colormap is picked and the remaining colors are shifted accordingly. If it's any color representation, this color is used. If it's nothing
, no band is added.
extendlow
= nothing
— This sets the color of an optional additional band from minimum(zs)
to the lowest value in levels
. If it's :auto
, the lower end of the colormap is picked and the remaining colors are shifted accordingly. If it's any color representation, this color is used. If it's nothing
, no band is added.
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
levels
= 10
— Can be either an Int
which results in n bands delimited by n+1 equally spaced levels, or it can be an AbstractVector{<:Real}
that lists n consecutive edges from low to high, which result in n-1 bands.
mode
= :normal
— Sets the way in which a vector of levels is interpreted, if it's set to :relative
, each number is interpreted as a fraction between the minimum and maximum values of zs
. For example, levels = 0.1:0.1:1.0
would exclude the lower 10% of data.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— No docs available.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
triangulation
= DelaunayTriangulation()
— The mode with which the points in xs
and ys
are triangulated. Passing DelaunayTriangulation()
performs a Delaunay triangulation. You can also pass a preexisting triangulation as an AbstractMatrix{<:Int}
with size (3, n), where each column specifies the vertex indices of one triangle, or as a Triangulation
from DelaunayTriangulation.jl.
visible
= true
— Controls whether the plot will be rendered or not.
Makie.tricontourf! Function
tricontourf!
is the mutating variant of plotting function tricontourf
. Check the docstring for tricontourf
for further information.
Makie.triplot Function
triplot(x, y; kwargs...)
triplot(positions; kwargs...)
triplot(triangles::Triangulation; kwargs...)
Plots a triangulation based on the provided position or Triangulation
from DelaunayTriangulation.jl.
Plot type
The plot type alias for the triplot
function is Triplot
.
Attributes
bounding_box
= automatic
— Sets the bounding box for truncating ghost edges which can be a Rect2
(or BBox
) or a tuple of the form (xmin, xmax, ymin, ymax)
. By default, the rectangle will be given by [a - eΔx, b + eΔx] × [c - eΔy, d + eΔy]
where e
is the ghost_edge_extension_factor
, Δx = b - a
and Δy = d - c
are the lengths of the sides of the rectangle, and [a, b] × [c, d]
is the bounding box of the points in the triangulation.
constrained_edge_color
= :magenta
— Sets the color of the constrained edges.
constrained_edge_linestyle
= @inherit linestyle
— Sets the linestyle of the constrained edges.
constrained_edge_linewidth
= @inherit linewidth
— Sets the width of the constrained edges.
convex_hull_color
= :red
— Sets the color of the convex hull.
convex_hull_linestyle
= :dash
— Sets the linestyle of the convex hull.
convex_hull_linewidth
= @inherit linewidth
— Sets the width of the convex hull.
ghost_edge_color
= :blue
— Sets the color of the ghost edges.
ghost_edge_extension_factor
= 0.1
— Sets the extension factor for the rectangle that the exterior ghost edges are extended onto.
ghost_edge_linestyle
= @inherit linestyle
— Sets the linestyle of the ghost edges.
ghost_edge_linewidth
= @inherit linewidth
— Sets the width of the ghost edges.
joinstyle
= @inherit joinstyle
— No docs available.
linecap
= @inherit linecap
— No docs available.
linestyle
= :solid
— Sets the linestyle of triangle edges.
marker
= @inherit marker
— Sets the shape of the points.
markercolor
= @inherit markercolor
— Sets the color of the points.
markersize
= @inherit markersize
— Sets the size of the points.
miter_limit
= @inherit miter_limit
— No docs available.
recompute_centers
= false
— Determines whether to recompute the representative points for the ghost edge orientation. Note that this will mutate tri.representative_point_list
directly.
show_constrained_edges
= false
— Determines whether to plot the constrained edges.
show_convex_hull
= false
— Determines whether to plot the convex hull.
show_ghost_edges
= false
— Determines whether to plot the ghost edges.
show_points
= false
— Determines whether to plot the individual points. Note that this will only plot points included in the triangulation.
strokecolor
= @inherit patchstrokecolor
— Sets the color of triangle edges.
strokewidth
= 1
— Sets the linewidth of triangle edges.
triangle_color
= :transparent
— Sets the color of the triangles.
Makie.triplot! Function
triplot!
is the mutating variant of plotting function triplot
. Check the docstring for triplot
for further information.
Makie.update_cam! Function
update_cam!(scene, cam::Camera3D, ϕ, θ[, radius])
Set the camera position based on two angles 0 ≤ ϕ ≤ 2π
and -pi/2 ≤ θ ≤ pi/2
and an optional radius around the current cam.lookat[]
.
Makie.update_cam! Function
update_cam!(scene::Scene, eyeposition, lookat, up = Vec3d(0, 0, 1))
Updates the camera's controls to point to the specified location.
Makie.update_cam! Method
update_cam!(scene::SceneLike, area)
Updates the camera for the given scene
to cover the given area
in 2d.
Makie.update_cam! Method
update_cam!(scene::SceneLike)
Updates the camera for the given scene
to cover the limits of the Scene
. Useful when using the Observable
pipeline.
Makie.update_theme! Function
update_theme!(with_theme::Theme; kwargs...)
Update the current theme incrementally. This means that only the keys given in with_theme
or through keyword arguments are changed, the rest is left intact. Nested attributes are either also updated incrementally, or replaced if they are not attributes in the new theme.
Example
To change the default colormap to :greys
, you can pass that attribute as a keyword argument to update_theme!
as demonstrated below.
update_theme!(colormap=:greys)
This can also be achieved by passing an object of types Attributes
or Theme
as the first and only positional argument:
update_theme!(Attributes(colormap=:greys))
update_theme!(Theme(colormap=:greys))
Makie.viewport Method
viewport(scene::Scene)
Gets the viewport of the scene in device independent units as an Observable{Rect2{Int}}
.
Makie.violin Function
violin(x, y)
Draw a violin plot.
Arguments
x
: positions of the categoriesy
: variables whose density is computed
Plot type
The plot type alias for the violin
function is Violin
.
Attributes
bandwidth
= automatic
— No docs available.
boundary
= automatic
— No docs available.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= @inherit patchcolor
— No docs available.
cycle
= [:color => :patchcolor]
— No docs available.
datalimits
= (-Inf, Inf)
— Specify values to trim the violin
. Can be a Tuple
or a Function
(e.g. datalimits=extrema
).
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
dodge
= automatic
— No docs available.
dodge_gap
= 0.03
— No docs available.
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
gap
= 0.2
— Shrinking factor, width -> width * (1 - gap)
.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
max_density
= automatic
— No docs available.
mediancolor
= @inherit linecolor
— No docs available.
medianlinewidth
= @inherit linewidth
— No docs available.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
n_dodge
= automatic
— No docs available.
npoints
= 200
— No docs available.
orientation
= :vertical
— Orientation of the violins (:vertical
or :horizontal
)
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
scale
= :area
— Scale density by area (:area
), count (:count
), or width (:width
).
show_median
= false
— Show median as midline.
side
= :both
— Specify :left
or :right
to only plot the violin on one side.
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
strokecolor
= @inherit patchstrokecolor
— No docs available.
strokewidth
= @inherit patchstrokewidth
— No docs available.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
weights
= automatic
— vector of statistical weights (length of data). By default, each observation has weight 1
.
width
= automatic
— Width of the box before shrinking.
Makie.violin! Function
violin!
is the mutating variant of plotting function violin
. Check the docstring for violin
for further information.
Makie.vlines Function
vlines(xs; ymin = 0.0, ymax = 1.0, attrs...)
Create vertical lines across a Scene
with 2D projection. The lines will be placed at xs
in data coordinates and ymin
to ymax
in scene coordinates (0 to 1). All three of these can have single or multiple values because they are broadcast to calculate the final line segments.
Plot type
The plot type alias for the vlines
function is VLines
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= @inherit linecolor
— The color of the line.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
cycle
= [:color]
— Sets which attributes to cycle when creating multiple plots.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
fxaa
= false
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
linecap
= @inherit linecap
— Sets the type of linecap used, i.e. :butt (flat with no extrusion), :square (flat with 1 linewidth extrusion) or :round.
linestyle
= nothing
— Sets the dash pattern of the line. Options are :solid
(equivalent to nothing
), :dot
, :dash
, :dashdot
and :dashdotdot
. These can also be given in a tuple with a gap style modifier, either :normal
, :dense
or :loose
. For example, (:dot, :loose)
or (:dashdot, :dense)
.
For custom patterns have a look at Makie.Linestyle
.
linewidth
= @inherit linewidth
— Sets the width of the line in pixel units
lowclip
= automatic
— The color for any value below the colorrange.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
ymax
= 1
— The start of the lines in relative axis units (0 to 1) along the y dimension.
ymin
= 0
— The start of the lines in relative axis units (0 to 1) along the y dimension.
Makie.vlines! Function
vlines!
is the mutating variant of plotting function vlines
. Check the docstring for vlines
for further information.
Makie.volumeslices Function
VolumeSlices
volumeslices(x, y, z, v)
Draws heatmap slices of the volume v
Plot type
The plot type alias for the volumeslices
function is VolumeSlices
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
bbox_color
= RGBAf(0.5, 0.5, 0.5, 0.5)
— No docs available.
bbox_visible
= true
— No docs available.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
interpolate
= false
— Sets whether colors should be interpolated
lowclip
= automatic
— The color for any value below the colorrange.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
Makie.volumeslices! Function
volumeslices!
is the mutating variant of plotting function volumeslices
. Check the docstring for volumeslices
for further information.
Makie.voronoiplot Function
voronoiplot(x, y, values; kwargs...)
voronoiplot(values; kwargs...)
voronoiplot(x, y; kwargs...)
voronoiplot(positions; kwargs...)
voronoiplot(vorn::VoronoiTessellation; kwargs...)
Generates and plots a Voronoi tessalation from heatmap
- or point-like data. The tessellation can also be passed directly as a VoronoiTessellation
from DelaunayTriangulation.jl.
Plot type
The plot type alias for the voronoiplot
function is Voronoiplot
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
clip
= automatic
— Sets the clipping area for the generated polygons which can be a Rect2
(or BBox
), Tuple
with entries (xmin, xmax, ymin, ymax)
or as a Circle
. Anything outside the specified area will be removed. If the clip
is not set it is automatically determined using unbounded_edge_extension_factor
as a Rect
.
color
= automatic
— Sets the color of the polygons. If automatic
, the polygons will be individually colored according to the colormap.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
highclip
= automatic
— The color for any value above the colorrange.
lowclip
= automatic
— The color for any value below the colorrange.
marker
= @inherit marker
— Sets the shape of the points.
markercolor
= @inherit markercolor
— Sets the color of the points.
markersize
= @inherit markersize
— Sets the size of the points.
nan_color
= :transparent
— The color for NaN values.
show_generators
= true
— Determines whether to plot the individual generators.
smooth
= false
— No docs available.
strokecolor
= @inherit patchstrokecolor
— Sets the strokecolor of the polygons.
strokewidth
= 1.0
— Sets the width of the polygon stroke.
unbounded_edge_extension_factor
= 0.1
— Sets the extension factor for the unbounded edges, used in DelaunayTriangulation.polygon_bounds
.
Makie.voronoiplot! Function
voronoiplot!
is the mutating variant of plotting function voronoiplot
. Check the docstring for voronoiplot
for further information.
Makie.vspan Function
vspan(xs_low, xs_high; ymin = 0.0, ymax = 1.0, attrs...)
vspan(xs_lowhigh; ymin = 0.0, ymax = 1.0, attrs...)
Create vertical bands spanning across a Scene
with 2D projection. The bands will be placed from xs_low
to xs_high
in data coordinates and ymin
to ymax
in scene coordinates (0 to 1). All four of these can have single or multiple values because they are broadcast to calculate the final spans. Both bounds can be passed together as an interval xs_lowhigh
.
Plot type
The plot type alias for the vspan
function is VSpan
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= @inherit patchcolor
— Sets the color of the poly. Can be a Vector{<:Colorant}
for per vertex colors or a single Colorant
. A Matrix{<:Colorant}
can be used to color the mesh with a texture, which requires the mesh to contain texture coordinates. Vector or Matrices of numbers can be used as well, which will use the colormap arguments to map the numbers to colors. One can also use Makie.LinePattern
, to cover the poly with a regular stroke pattern.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
cycle
= [:color => :patchcolor]
— No docs available.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
joinstyle
= @inherit joinstyle
— No docs available.
linecap
= @inherit linecap
— No docs available.
linestyle
= nothing
— Sets the dash pattern of the line. Options are :solid
(equivalent to nothing
), :dot
, :dash
, :dashdot
and :dashdotdot
. These can also be given in a tuple with a gap style modifier, either :normal
, :dense
or :loose
. For example, (:dot, :loose)
or (:dashdot, :dense)
.
For custom patterns have a look at Makie.Linestyle
.
lowclip
= automatic
— The color for any value below the colorrange.
miter_limit
= @inherit miter_limit
— No docs available.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
shading
= NoShading
— No docs available.
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
stroke_depth_shift
= -1.0e-5
— Depth shift of stroke plot. This is useful to avoid z-fighting between the stroke and the fill.
strokecolor
= @inherit patchstrokecolor
— Sets the color of the outline around a marker.
strokecolormap
= @inherit colormap
— Sets the colormap that is sampled for numeric color
s.
strokewidth
= @inherit patchstrokewidth
— Sets the width of the outline.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
ymax
= 1
— The end of the bands in relative axis units (0 to 1) along the y dimension.
ymin
= 0
— The start of the bands in relative axis units (0 to 1) along the y dimension.
Makie.vspan! Function
vspan!
is the mutating variant of plotting function vspan
. Check the docstring for vspan
for further information.
Makie.waterfall Function
waterfall(x, y; kwargs...)
Plots a waterfall chart to visualize individual positive and negative components that add up to a net result as a barplot with stacked bars next to each other.
Plot type
The plot type alias for the waterfall
function is Waterfall
.
Attributes
color
= @inherit patchcolor
— No docs available.
cycle
= [:color => :patchcolor]
— No docs available.
direction_color
= @inherit backgroundcolor
— No docs available.
dodge
= automatic
— No docs available.
dodge_gap
= 0.03
— No docs available.
final_color
= plot_color(:grey90, 0.5)
— No docs available.
final_dodge_gap
= 0
— No docs available.
final_gap
= automatic
— No docs available.
gap
= 0.2
— No docs available.
marker_neg
= :dtriangle
— No docs available.
marker_pos
= :utriangle
— No docs available.
n_dodge
= automatic
— No docs available.
show_direction
= false
— No docs available.
show_final
= false
— No docs available.
stack
= automatic
— No docs available.
width
= automatic
— No docs available.
Makie.waterfall! Function
waterfall!
is the mutating variant of plotting function waterfall
. Check the docstring for waterfall
for further information.
Makie.with_theme Function
with_theme(f, theme = Theme(); kwargs...)
Calls f
with theme
temporarily activated. Attributes in theme
can be overridden or extended with kwargs
. The previous theme is always restored afterwards, no matter if f
succeeds or fails.
Example:
my_theme = Theme(size = (500, 500), color = :red)
with_theme(my_theme, color = :blue, linestyle = :dashed) do
scatter(randn(100, 2))
end
Makie.xlims! Function
xlims!(ax = current_axis())
Reset the x-axis limits to be determined automatically from the plots in the axis.
Makie.xlims! Method
xlims!(ax, low, high)
xlims!(ax; low = nothing, high = nothing)
xlims!(ax, (low, high))
xlims!(ax, low..high)
Set the x-axis limits of axis ax
to low
and high
or a tuple xlims = (low,high)
. If the limits are ordered high-low, the axis orientation will be reversed. If a limit is nothing
it will be determined automatically from the plots in the axis.
Makie.xlims! Method
xlims!(low, high)
xlims!(; low = nothing, high = nothing)
Set the x-axis limits of the current axis to low
and high
. If the limits are ordered high-low, this reverses the axis orientation. A limit set to nothing
will be determined automatically from the plots in the axis.
Makie.xticklabels Method
xticklabels(scene)
Returns all the x-axis tick labels. See also ticklabels
.
Makie.xtickrange Method
xtickrange(scene)
Returns the tick range along the x-axis. See also tickranges
.
Makie.xtickrotation! Method
xtickrotation!([scene,] xangle)
Set the rotation of tick labels along the x-axis. See also tickrotations!
.
Makie.xtickrotation Method
xtickrotation(scene)
Returns the rotation of tick labels along the x-axis. See also tickrotations
Makie.xticks! Method
xticks!([scene,]; xtickrange=xtickrange(scene), xticklabels=xticklabel(scene))
Set the tick labels and range along the x-axis. See also ticks!
.
Makie.ylims! Function
ylims!(ax = current_axis())
Reset the y-axis limits to be determined automatically from the plots in the axis.
Makie.ylims! Method
ylims!(ax, low, high)
ylims!(ax; low = nothing, high = nothing)
ylims!(ax, (low, high))
ylims!(ax, low..high)
Set the y-axis limits of axis ax
to low
and high
or a tuple ylims = (low,high)
. If the limits are ordered high-low, the axis orientation will be reversed. If a limit is nothing
it will be determined automatically from the plots in the axis.
Makie.ylims! Method
ylims!(low, high)
ylims!(; low = nothing, high = nothing)
Set the y-axis limits of the current axis to low
and high
. If the limits are ordered high-low, this reverses the axis orientation. A limit set to nothing
will be determined automatically from the plots in the axis.
Makie.yticklabels Method
yticklabels(scene)
Returns all the y-axis tick labels. See also ticklabels
.
Makie.ytickrange Method
ytickrange(scene)
Returns the tick range along the y-axis. See also tickranges
.
Makie.ytickrotation! Method
ytickrotation!([scene,] yangle)
Set the rotation of tick labels along the y-axis. See also tickrotations!
.
Makie.ytickrotation Method
ytickrotation(scene)
Returns the rotation of tick labels along the y-axis. See also tickrotations
Makie.yticks! Method
yticks!([scene,]; ytickrange=ytickrange(scene), yticklabels=yticklabel(scene))
Set the tick labels and range along all the y-axis. See also ticks!
.
Makie.zlabel! Method
zlabel!(scene, zlabel)
Set the z-axis label for the given Scene.
Warning
The Scene must have an Axis3D. If not, then this function will error.
Makie.zlims! Function
zlims!(ax = current_axis())
Reset the z-axis limits to be determined automatically from the plots in the axis.
Makie.zlims! Method
zlims!(ax, low, high)
zlims!(ax; low = nothing, high = nothing)
zlims!(ax, (low, high))
zlims!(ax, low..high)
Set the z-axis limits of axis ax
to low
and high
or a tuple zlims = (low,high)
. If the limits are ordered high-low, the axis orientation will be reversed. If a limit is nothing
it will be determined automatically from the plots in the axis.
Makie.zlims! Method
zlims!(low, high)
zlims!(; low = nothing, high = nothing)
Set the z-axis limits of the current axis to low
and high
. If the limits are ordered high-low, this reverses the axis orientation. A limit set to nothing
will be determined automatically from the plots in the axis.
Makie.zoom! Function
zoom!(scene, cam::Camera3D, zoom_step[, cad = false, zoom_shift_lookat = false])
Zooms the camera in or out based on the multiplier zoom_step
. A zoom_step
of 1.0 is neutral, larger zooms out and lower zooms in.
If cad = true
zooming will also apply a rotation based on how far the cursor is from the center of the scene. If zoom_shift_lookat = true
and projectiontype = Orthographic
zooming will keep the data under the cursor at the same screen space position.
Makie.zoom! Method
zoom!(scene, point, zoom_step, shift_lookat::Bool)
Zooms the camera of scene
in towards point
by a factor of zoom_step
. A positive zoom_step
zooms in while a negative zoom_step
zooms out.
Makie.zticklabels Method
zticklabels(scene)
Returns all the z-axis tick labels. See also ticklabels
.
Makie.ztickrange Method
ztickrange(scene)
Returns the tick range along the z-axis. See also tickranges
.
Makie.ztickrotation! Method
ztickrotation!([scene,] zangle)
Set the rotation of tick labels along the z-axis. See also tickrotations!
.
Makie.ztickrotation Method
ztickrotation(scene)
Returns the rotation of tick labels along the z-axis. See also tickrotations
Makie.zticks! Method
zticks!([scene,]; ztickranges=ztickrange(scene), zticklabels=zticklabel(scene))
Set the tick labels and range along all z-axis. See also ticks!
.
MakieCore.convert_arguments Method
convert_arguments(ct::GridBased, x::VecOrMat, y::VecOrMat, z::Matrix)
If ct
is Heatmap
and x
and y
are vectors, infer from length of x
and y
whether they represent edges or centers of the heatmap bins. If they are centers, convert to edges. Convert eltypes to Float32
and return outputs as a Tuple
.
MakieCore.convert_arguments Method
convert_arguments(P, x::RangeLike, y::RangeLike, z::AbstractMatrix)
Takes one or two ClosedIntervals x
and y
and converts them to closed ranges with size(z, 1/2).
MakieCore.convert_arguments Method
convert_arguments(P, x, y, z)::(Vector)
Takes vectors x
, y
, and z
and turns it into a vector of 3D points of the values from x
, y
, and z
. P
is the plot Type (it is optional).
MakieCore.convert_arguments Method
Enables to use scatter like a surface plot with x::Vector, y::Vector, z::Matrix spanning z over the grid spanned by x y
MakieCore.convert_arguments Method
convert_arguments(PB, LineString)
Takes an input LineString
and decomposes it to points.
MakieCore.convert_arguments Method
convert_arguments(PB, Polygon)
Takes an input Polygon
and decomposes it to points.
MakieCore.convert_arguments Method
convert_arguments(P, x, y)::(Vector)
Takes vectors x
and y
and turns it into a vector of 2D points of the values from x
and y
.
P
is the plot Type (it is optional).
MakieCore.convert_arguments Method
Wrap a single point or equivalent object in a single-element array.
MakieCore.convert_arguments Method
convert_arguments(Mesh, vertices, indices)::GLNormalMesh
Takes vertices
and indices
, and creates a triangle mesh out of those. See to_vertices
and to_triangles
for more information about accepted types.
MakieCore.convert_arguments Method
convert_arguments(Mesh, x, y, z, indices)::GLNormalMesh
Takes real vectors x, y, z and constructs a triangle mesh out of those, using the faces in indices
, which can be integers (every 3 -> one triangle), or GeometryBasics.NgonFace{N, <: Integer}.
MakieCore.convert_arguments Method
convert_arguments(Mesh, x, y, z)::GLNormalMesh
Takes real vectors x, y, z and constructs a mesh out of those, under the assumption that every 3 points form a triangle.
MakieCore.convert_arguments Method
convert_arguments(Mesh, xyz::AbstractVector)::GLNormalMesh
Takes an input mesh and a vector xyz
representing the vertices of the mesh, and creates indices under the assumption, that each triplet in xyz
forms a triangle.
MakieCore.convert_arguments Method
convert_arguments(P, x, y, f)::(Vector, Vector, Matrix)
Takes vectors x
and y
and the function f
, and applies f
on the grid that x
and y
span. This is equivalent to f.(x, y')
. P
is the plot Type (it is optional).
MakieCore.convert_arguments Method
convert_arguments(P, x, y, z, i)::(Vector, Vector, Vector, Matrix)
Takes 3 AbstractVector
x
, y
, and z
and the AbstractMatrix
i
, and puts everything in a Tuple.
P
is the plot Type (it is optional).
MakieCore.convert_arguments Method
convert_arguments(P, x, y, z, f)::(Vector, Vector, Vector, Matrix)
Takes AbstractVector
x
, y
, and z
and the function f
, evaluates f
on the volume spanned by x
, y
and z
, and puts x
, y
, z
and f(x,y,z)
in a Tuple.
P
is the plot Type (it is optional).
MakieCore.convert_arguments Method
Accepts a Vector of Pair of Points (e.g. [Point(0, 0) => Point(1, 1), ...]
) to encode e.g. linesegments or directions.
MakieCore.convert_arguments Method
convert_arguments(P, x)::(Vector)
Takes an input GeometryPrimitive x
and decomposes it to points. P
is the plot Type (it is optional).
MakieCore.convert_arguments Method
convert_arguments(PB, Union{Array{<:LineString}, MultiLineString})
Takes an input Array{LineString}
or a MultiLineString
and decomposes it to points.
MakieCore.convert_arguments Method
convert_arguments(PB, Union{Array{<:Polygon}, MultiPolygon})
Takes an input Array{Polygon}
or a MultiPolygon
and decomposes it to points.
MakieCore.convert_arguments Method
convert_arguments(P, x)::(Vector)
Takes an input Rect
x
and decomposes it to points.
P
is the plot Type (it is optional).
MakieCore.used_attributes Method
used_attributes(args...) = ()
Function used to indicate what keyword args one wants to get passed in convert_arguments
. Those attributes will not be forwarded to the backend, but only used during the conversion pipeline. Usage:
struct MyType end
used_attributes(::MyType) = (:attribute,)
function convert_arguments(x::MyType; attribute = 1)
...
end
# attribute will get passed to convert_arguments
# without keyword_verload, this wouldn't happen
plot(MyType, attribute = 2)
#You can also use the convenience macro, to overload convert_arguments in one step:
@keywords convert_arguments(x::MyType; attribute = 1)
...
end
Observables.on Method
on(f, c::Camera, observables::Observable...)
When mapping over observables for the camera, we store them in the steering_node
vector, to make it easier to disconnect the camera steering signals later!
Makie.@extract Macro
@extract scene (a, b, c, d)
This becomes
begin
a = scene[:a]
b = scene[:b]
c = scene[:d]
d = scene[:d]
(a, b, c, d)
end
Makie.@extractvalue Macro
usage @extractvalue scene (a, b, c, d) will become:
begin
a = to_value(scene[:a])
b = to_value(scene[:b])
c = to_value(scene[:c])
(a, b, c)
end
Makie.@get_attribute Macro
@get_attribute scene (a, b, c, d)
This will extract attribute a
, b
, c
, d
from scene
and apply the correct attribute conversions + will extract the value if it's a signal. It will make those attributes available as variables and return them as a tuple. So the above is equal to: will become:
begin
a = get_attribute(scene, :a)
b = get_attribute(scene, :b)
c = get_attribute(scene, :c)
(a, b, c)
end
Makie.@lift Macro
Replaces an expression with lift(argtuple -> expression, args...)
, where args
are all expressions inside the main one that begin with $.
Example:
x = Observable(rand(100))
y = Observable(rand(100))
before
z = lift((x, y) -> x .+ y, x, y)
after
z = @lift($x .+ $y)
You can also use parentheses around an expression if that expression evaluates to an observable.
nt = (x = Observable(1), y = Observable(2))
@lift($(nt.x) + $(nt.y))
MakieCore.Arrows Type
Arrows
is the plot type associated with plotting function arrows
. Check the docstring for arrows
for further information.
MakieCore.Heatmap Type
Heatmap
is the plot type associated with plotting function heatmap
. Check the docstring for heatmap
for further information.
MakieCore.Image Type
Image
is the plot type associated with plotting function image
. Check the docstring for image
for further information.
MakieCore.LineSegments Type
LineSegments
is the plot type associated with plotting function linesegments
. Check the docstring for linesegments
for further information.
MakieCore.Lines Type
Lines
is the plot type associated with plotting function lines
. Check the docstring for lines
for further information.
MakieCore.Mesh Type
Mesh
is the plot type associated with plotting function mesh
. Check the docstring for mesh
for further information.
MakieCore.MeshScatter Type
MeshScatter
is the plot type associated with plotting function meshscatter
. Check the docstring for meshscatter
for further information.
MakieCore.Poly Type
Poly
is the plot type associated with plotting function poly
. Check the docstring for poly
for further information.
MakieCore.Scatter Type
Scatter
is the plot type associated with plotting function scatter
. Check the docstring for scatter
for further information.
MakieCore.Surface Type
Surface
is the plot type associated with plotting function surface
. Check the docstring for surface
for further information.
MakieCore.Text Type
Text
is the plot type associated with plotting function text
. Check the docstring for text
for further information.
MakieCore.Volume Type
Volume
is the plot type associated with plotting function volume
. Check the docstring for volume
for further information.
MakieCore.Voxels Type
Voxels
is the plot type associated with plotting function voxels
. Check the docstring for voxels
for further information.
MakieCore.Wireframe Type
Wireframe
is the plot type associated with plotting function wireframe
. Check the docstring for wireframe
for further information.
MakieCore.arrows Function
arrows(points, directions; kwargs...)
arrows(x, y, u, v)
arrows(x::AbstractVector, y::AbstractVector, u::AbstractMatrix, v::AbstractMatrix)
arrows(x, y, z, u, v, w)
arrows(x, y, [z], f::Function)
Plots arrows at the specified points with the specified components. u
and v
are interpreted as vector components (u
being the x and v
being the y), and the vectors are plotted with the tails at x
, y
.
If x, y, u, v
are <: AbstractVector
, then each 'row' is plotted as a single vector.
If u, v
are <: AbstractMatrix
, then x
and y
are interpreted as specifications for a grid, and u, v
are plotted as arrows along the grid.
arrows
can also work in three dimensions.
If a Function
is provided in place of u, v, [w]
, then it must accept a Point
as input, and return an appropriately dimensioned Point
, Vec
, or other array-like output.
Plot type
The plot type alias for the arrows
function is Arrows
.
Attributes
align
= :origin
— Sets how arrows are positioned. By default arrows start at the given positions and extend along the given directions. If this attribute is set to :head
, :lineend
, :tailend
, :headstart
or :center
the given positions will be between the head and tail of each arrow instead.
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
arrowcolor
= automatic
— Sets the color of the arrow head. Will copy color
if set to automatic
.
arrowhead
= automatic
— Defines the marker (2D) or mesh (3D) that is used as the arrow head. The default for is '▲'
in 2D and a cone mesh in 3D. For the latter the mesh should start at Point3f(0)
and point in positive z-direction.
arrowsize
= automatic
— Scales the size of the arrow head. This defaults to 0.3
in the 2D case and Vec3f(0.2, 0.2, 0.3)
in the 3D case. For the latter the first two components scale the radius (in x/y direction) and the last scales the length of the cone. If the arrowsize is set to 1, the cone will have a diameter and length of 1.
arrowtail
= automatic
— Defines the mesh used to draw the arrow tail in 3D. It should start at Point3f(0)
and extend in negative z-direction. The default is a cylinder. This has no effect on the 2D plot.
backlight
= 0.0
— Sets a weight for secondary light calculation with inverted normals.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= :black
— Sets the color of arrowheads and lines. Can be overridden separately using linecolor
and arrowcolor
.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
diffuse
= 1.0
— Sets how strongly the red, green and blue channel react to diffuse (scattered) light.
fxaa
= automatic
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
lengthscale
= 1.0
— Scales the length of the arrow tail.
linecolor
= automatic
— Sets the color used for the arrow tail which is represented by a line in 2D. Will copy color
if set to automatic
.
linestyle
= nothing
— Sets the linestyle used in 2D. Does not apply to 3D plots.
linewidth
= automatic
— Scales the width/diameter of the arrow tail. Defaults to 1
for 2D and 0.05
for the 3D case.
lowclip
= automatic
— The color for any value below the colorrange.
markerspace
= :pixel
— No docs available.
material
= nothing
— RPRMakie only attribute to set complex RadeonProRender materials. Warning, how to set an RPR material may change and other backends will ignore this attribute
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
normalize
= false
— By default the lengths of the directions given to arrows
are used to scale the length of the arrow tails. If this attribute is set to true the directions are normalized, skipping this scaling.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
quality
= 32
— Defines the number of angle subdivisions used when generating the arrow head and tail meshes. Consider lowering this if you have performance issues. Only applies to 3D plots.
shading
= automatic
— Sets the lighting algorithm used. Options are NoShading
(no lighting), FastShading
(AmbientLight + PointLight) or MultiLightShading
(Multiple lights, GLMakie only). Note that this does not affect RPRMakie.
shininess
= 32.0
— Sets how sharp the reflection is.
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
specular
= 0.2
— Sets how strongly the object reflects light in the red, green and blue channels.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
MakieCore.arrows! Function
arrows!
is the mutating variant of plotting function arrows
. Check the docstring for arrows
for further information.
MakieCore.heatmap Function
heatmap(x, y, matrix)
heatmap(x, y, func)
heatmap(matrix)
heatmap(xvector, yvector, zvector)
Plots a heatmap as a collection of rectangles. x
and y
can either be of length i
and j
where (i, j)
is size(matrix)
, in this case the rectangles will be placed around these grid points like voronoi cells. Note that for irregularly spaced x
and y
, the points specified by them are not centered within the resulting rectangles.
x
and y
can also be of length i+1
and j+1
, in this case they are interpreted as the edges of the rectangles.
Colors of the rectangles are derived from matrix[i, j]
. The third argument may also be a Function
(i, j) -> v which is then evaluated over the grid spanned by x
and y
.
Another allowed form is using three vectors xvector
, yvector
and zvector
. In this case it is assumed that no pair of elements x
and y
exists twice. Pairs that are missing from the resulting grid will be treated as if zvector
had a NaN
element at that position.
If x
and y
are omitted with a matrix argument, they default to x, y = axes(matrix)
.
Note that heatmap
is slower to render than image
so image
should be preferred for large, regularly spaced grids.
Plot type
The plot type alias for the heatmap
function is Heatmap
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
interpolate
= false
— Sets whether colors should be interpolated
lowclip
= automatic
— The color for any value below the colorrange.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
MakieCore.heatmap! Function
heatmap!
is the mutating variant of plotting function heatmap
. Check the docstring for heatmap
for further information.
MakieCore.image Function
image(x, y, image)
image(image)
Plots an image on a rectangle bounded by x
and y
(defaults to size of image).
Plot type
The plot type alias for the image
function is Image
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
colormap
= [:black, :white]
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
fxaa
= false
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
interpolate
= true
— Sets whether colors should be interpolated between pixels.
lowclip
= automatic
— The color for any value below the colorrange.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
uv_transform
= automatic
— Sets a transform for uv coordinates, which controls how the image is mapped to its rectangular area. The attribute can be I
, scale::VecTypes{2}
, (translation::VecTypes{2}, scale::VecTypes{2})
, any of :rotr90, :rotl90, :rot180, :swap_xy/:transpose, :flip_x, :flip_y, :flip_xy, or most generally a Makie.Mat{2, 3, Float32}
or Makie.Mat3f
as returned by Makie.uv_transform()
. They can also be changed by passing a tuple (op3, op2, op1)
.
visible
= true
— Controls whether the plot will be rendered or not.
MakieCore.image! Function
image!
is the mutating variant of plotting function image
. Check the docstring for image
for further information.
MakieCore.lines Function
lines(positions)
lines(x, y)
lines(x, y, z)
Creates a connected line plot for each element in (x, y, z)
, (x, y)
or positions
.
NaN
values are displayed as gaps in the line.
Plot type
The plot type alias for the lines
function is Lines
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= @inherit linecolor
— The color of the line.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
cycle
= [:color]
— Sets which attributes to cycle when creating multiple plots.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
fxaa
= false
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
joinstyle
= @inherit joinstyle
— Controls the rendering at corners. Options are :miter
for sharp corners, :bevel
for "cut off" corners, and :round
for rounded corners. If the corner angle is below miter_limit
, :miter
is equivalent to :bevel
to avoid long spikes.
linecap
= @inherit linecap
— Sets the type of line cap used. Options are :butt
(flat without extrusion), :square
(flat with half a linewidth extrusion) or :round
.
linestyle
= nothing
— Sets the dash pattern of the line. Options are :solid
(equivalent to nothing
), :dot
, :dash
, :dashdot
and :dashdotdot
. These can also be given in a tuple with a gap style modifier, either :normal
, :dense
or :loose
. For example, (:dot, :loose)
or (:dashdot, :dense)
.
For custom patterns have a look at Makie.Linestyle
.
linewidth
= @inherit linewidth
— Sets the width of the line in screen units
lowclip
= automatic
— The color for any value below the colorrange.
miter_limit
= @inherit miter_limit
— Sets the minimum inner join angle below which miter joins truncate. See also Makie.miter_distance_to_angle
.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
MakieCore.lines! Function
lines!
is the mutating variant of plotting function lines
. Check the docstring for lines
for further information.
MakieCore.linesegments Function
linesegments(positions)
linesegments(vector_of_2tuples_of_points)
linesegments(x, y)
linesegments(x, y, z)
Plots a line for each pair of points in (x, y, z)
, (x, y)
, or positions
.
Plot type
The plot type alias for the linesegments
function is LineSegments
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= @inherit linecolor
— The color of the line.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
cycle
= [:color]
— Sets which attributes to cycle when creating multiple plots.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
fxaa
= false
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
linecap
= @inherit linecap
— Sets the type of linecap used, i.e. :butt (flat with no extrusion), :square (flat with 1 linewidth extrusion) or :round.
linestyle
= nothing
— Sets the dash pattern of the line. Options are :solid
(equivalent to nothing
), :dot
, :dash
, :dashdot
and :dashdotdot
. These can also be given in a tuple with a gap style modifier, either :normal
, :dense
or :loose
. For example, (:dot, :loose)
or (:dashdot, :dense)
.
For custom patterns have a look at Makie.Linestyle
.
linewidth
= @inherit linewidth
— Sets the width of the line in pixel units
lowclip
= automatic
— The color for any value below the colorrange.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
MakieCore.linesegments! Function
linesegments!
is the mutating variant of plotting function linesegments
. Check the docstring for linesegments
for further information.
MakieCore.mesh Function
mesh(x, y, z)
mesh(mesh_object)
mesh(x, y, z, faces)
mesh(xyz, faces)
Plots a 3D or 2D mesh. Supported mesh_object
s include Mesh
types from GeometryBasics.jl.
Plot type
The plot type alias for the mesh
function is Mesh
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
backlight
= 0.0
— Sets a weight for secondary light calculation with inverted normals.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= @inherit patchcolor
— Sets the color of the mesh. Can be a Vector{<:Colorant}
for per vertex colors or a single Colorant
. A Matrix{<:Colorant}
can be used to color the mesh with a texture, which requires the mesh to contain texture coordinates.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
cycle
= [:color => :patchcolor]
— No docs available.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
diffuse
= 1.0
— Sets how strongly the red, green and blue channel react to diffuse (scattered) light.
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
interpolate
= true
— sets whether colors should be interpolated
lowclip
= automatic
— The color for any value below the colorrange.
matcap
= nothing
— No docs available.
material
= nothing
— RPRMakie only attribute to set complex RadeonProRender materials. Warning, how to set an RPR material may change and other backends will ignore this attribute
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
shading
= automatic
— Sets the lighting algorithm used. Options are NoShading
(no lighting), FastShading
(AmbientLight + PointLight) or MultiLightShading
(Multiple lights, GLMakie only). Note that this does not affect RPRMakie.
shininess
= 32.0
— Sets how sharp the reflection is.
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
specular
= 0.2
— Sets how strongly the object reflects light in the red, green and blue channels.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
uv_transform
= automatic
— Sets a transform for uv coordinates, which controls how a texture is mapped to a mesh. The attribute can be I
, scale::VecTypes{2}
, (translation::VecTypes{2}, scale::VecTypes{2})
, any of :rotr90, :rotl90, :rot180, :swap_xy/:transpose, :flip_x, :flip_y, :flip_xy, or most generally a Makie.Mat{2, 3, Float32}
or Makie.Mat3f
as returned by Makie.uv_transform()
. They can also be changed by passing a tuple (op3, op2, op1)
.
visible
= true
— Controls whether the plot will be rendered or not.
MakieCore.mesh! Function
mesh!
is the mutating variant of plotting function mesh
. Check the docstring for mesh
for further information.
MakieCore.meshscatter Function
meshscatter(positions)
meshscatter(x, y)
meshscatter(x, y, z)
Plots a mesh for each element in (x, y, z)
, (x, y)
, or positions
(similar to scatter
). markersize
is a scaling applied to the primitive passed as marker
.
Plot type
The plot type alias for the meshscatter
function is MeshScatter
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
backlight
= 0.0
— Sets a weight for secondary light calculation with inverted normals.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= @inherit markercolor
— Sets the color of the marker.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
cycle
= [:color]
— No docs available.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
diffuse
= 1.0
— Sets how strongly the red, green and blue channel react to diffuse (scattered) light.
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
lowclip
= automatic
— The color for any value below the colorrange.
marker
= :Sphere
— Sets the scattered mesh.
markersize
= 0.1
— Sets the scale of the mesh. This can be given as a Vector
to apply to each scattered mesh individually.
material
= nothing
— RPRMakie only attribute to set complex RadeonProRender materials. Warning, how to set an RPR material may change and other backends will ignore this attribute
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
rotation
= 0.0
— Sets the rotation of the mesh. A numeric rotation is around the z-axis, a Vec3f
causes the mesh to rotate such that the the z-axis is now that vector, and a quaternion describes a general rotation. This can be given as a Vector to apply to each scattered mesh individually.
shading
= automatic
— Sets the lighting algorithm used. Options are NoShading
(no lighting), FastShading
(AmbientLight + PointLight) or MultiLightShading
(Multiple lights, GLMakie only). Note that this does not affect RPRMakie.
shininess
= 32.0
— Sets how sharp the reflection is.
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
specular
= 0.2
— Sets how strongly the object reflects light in the red, green and blue channels.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
uv_transform
= automatic
— Sets a transform for uv coordinates, which controls how a texture is mapped to the scattered mesh. Note that the mesh needs to include uv coordinates for this, which is not the case by default for geometry primitives. You can use GeometryBasics.uv_normal_mesh(prim)
with, for example prim = Rect2f(0, 0, 1, 1)
. The attribute can be I
, scale::VecTypes{2}
, (translation::VecTypes{2}, scale::VecTypes{2})
, any of :rotr90, :rotl90, :rot180, :swap_xy/:transpose, :flip_x, :flip_y, :flip_xy, or most generally a Makie.Mat{2, 3, Float32}
or Makie.Mat3f
as returned by Makie.uv_transform()
. It can also be set per scattered mesh by passing a Vector
of any of the above and operations can be changed by passing a tuple (op3, op2, op1)
.
visible
= true
— Controls whether the plot will be rendered or not.
MakieCore.meshscatter! Function
meshscatter!
is the mutating variant of plotting function meshscatter
. Check the docstring for meshscatter
for further information.
MakieCore.poly Function
poly(vertices, indices; kwargs...)
poly(points; kwargs...)
poly(shape; kwargs...)
poly(mesh; kwargs...)
Plots a polygon based on the arguments given. When vertices and indices are given, it functions similarly to mesh
. When points are given, it draws one polygon that connects all the points in order. When a shape is given (essentially anything decomposable by GeometryBasics
), it will plot decompose(shape)
.
poly(coordinates, connectivity; kwargs...)
Plots polygons, which are defined by coordinates
(the coordinates of the vertices) and connectivity
(the edges between the vertices).
Plot type
The plot type alias for the poly
function is Poly
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= @inherit patchcolor
— Sets the color of the poly. Can be a Vector{<:Colorant}
for per vertex colors or a single Colorant
. A Matrix{<:Colorant}
can be used to color the mesh with a texture, which requires the mesh to contain texture coordinates. Vector or Matrices of numbers can be used as well, which will use the colormap arguments to map the numbers to colors. One can also use Makie.LinePattern
, to cover the poly with a regular stroke pattern.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
cycle
= [:color => :patchcolor]
— No docs available.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
joinstyle
= @inherit joinstyle
— No docs available.
linecap
= @inherit linecap
— No docs available.
linestyle
= nothing
— Sets the dash pattern of the line. Options are :solid
(equivalent to nothing
), :dot
, :dash
, :dashdot
and :dashdotdot
. These can also be given in a tuple with a gap style modifier, either :normal
, :dense
or :loose
. For example, (:dot, :loose)
or (:dashdot, :dense)
.
For custom patterns have a look at Makie.Linestyle
.
lowclip
= automatic
— The color for any value below the colorrange.
miter_limit
= @inherit miter_limit
— No docs available.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
shading
= NoShading
— No docs available.
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
stroke_depth_shift
= -1.0e-5
— Depth shift of stroke plot. This is useful to avoid z-fighting between the stroke and the fill.
strokecolor
= @inherit patchstrokecolor
— Sets the color of the outline around a marker.
strokecolormap
= @inherit colormap
— Sets the colormap that is sampled for numeric color
s.
strokewidth
= @inherit patchstrokewidth
— Sets the width of the outline.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
MakieCore.poly! Function
poly!
is the mutating variant of plotting function poly
. Check the docstring for poly
for further information.
MakieCore.scatter Function
scatter(positions)
scatter(x, y)
scatter(x, y, z)
Plots a marker for each element in (x, y, z)
, (x, y)
, or positions
.
Plot type
The plot type alias for the scatter
function is Scatter
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= @inherit markercolor
— Sets the color of the marker. If no color is set, multiple calls to scatter!
will cycle through the axis color palette.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
cycle
= [:color]
— Sets which attributes to cycle when creating multiple plots
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
depthsorting
= false
— Enables depth-sorting of markers which can improve border artifacts. Currently supported in GLMakie only.
distancefield
= nothing
— Optional distancefield used for e.g. font and bezier path rendering. Will get set automatically.
fxaa
= false
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
glowcolor
= (:black, 0.0)
— Sets the color of the glow effect around the marker.
glowwidth
= 0.0
— Sets the size of a glow effect around the marker.
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
lowclip
= automatic
— The color for any value below the colorrange.
marker
= @inherit marker
— Sets the scatter marker.
marker_offset
= automatic
— The offset of the marker from the given position in markerspace
units. Default is centered around the position (markersize * -0.5).
markersize
= @inherit markersize
— Sets the size of the marker by scaling it relative to its base size which can differ for each marker. A Real
scales x and y dimensions by the same amount. A Vec
or Tuple
with two elements scales x and y separately. An array of either scales each marker separately. Humans perceive the area of a marker as its size which grows quadratically with markersize
, so multiplying markersize
by 2 results in a marker that is 4 times as large, visually.
markerspace
= :pixel
— Sets the space in which markersize
is given. See Makie.spaces()
for possible inputs
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
rotation
= Billboard()
— Sets the rotation of the marker. A Billboard
rotation is always around the depth axis.
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
strokecolor
= @inherit markerstrokecolor
— Sets the color of the outline around a marker.
strokewidth
= @inherit markerstrokewidth
— Sets the width of the outline around a marker.
transform_marker
= false
— Controls whether the model matrix (without translation) applies to the marker itself, rather than just the positions. (If this is true, scale!
and rotate!
will affect the marker.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
uv_offset_width
= (0.0, 0.0, 0.0, 0.0)
— No docs available.
visible
= true
— Controls whether the plot will be rendered or not.
MakieCore.scatter! Function
scatter!
is the mutating variant of plotting function scatter
. Check the docstring for scatter
for further information.
MakieCore.surface Function
surface(x, y, z)
surface(z)
Plots a surface, where (x, y)
define a grid whose heights are the entries in z
. x
and y
may be Vectors
which define a regular grid, or Matrices
which define an irregular grid.
Plot type
The plot type alias for the surface
function is Surface
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
backlight
= 0.0
— Sets a weight for secondary light calculation with inverted normals.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= nothing
— Can be set to an Matrix{<: Union{Number, Colorant}}
to color surface independent of the z
component. If color=nothing
, it defaults to color=z
.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
diffuse
= 1.0
— Sets how strongly the red, green and blue channel react to diffuse (scattered) light.
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
interpolate
= true
— [(W)GLMakie only] Specifies whether the surface matrix gets sampled with interpolation.
invert_normals
= false
— Inverts the normals generated for the surface. This can be useful to illuminate the other side of the surface.
lowclip
= automatic
— The color for any value below the colorrange.
material
= nothing
— RPRMakie only attribute to set complex RadeonProRender materials. Warning, how to set an RPR material may change and other backends will ignore this attribute
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
shading
= automatic
— Sets the lighting algorithm used. Options are NoShading
(no lighting), FastShading
(AmbientLight + PointLight) or MultiLightShading
(Multiple lights, GLMakie only). Note that this does not affect RPRMakie.
shininess
= 32.0
— Sets how sharp the reflection is.
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
specular
= 0.2
— Sets how strongly the object reflects light in the red, green and blue channels.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
uv_transform
= automatic
— Sets a transform for uv coordinates, which controls how a texture is mapped to a surface. The attribute can be I
, scale::VecTypes{2}
, (translation::VecTypes{2}, scale::VecTypes{2})
, any of :rotr90, :rotl90, :rot180, :swap_xy/:transpose, :flip_x, :flip_y, :flip_xy, or most generally a Makie.Mat{2, 3, Float32}
or Makie.Mat3f
as returned by Makie.uv_transform()
. They can also be changed by passing a tuple (op3, op2, op1)
.
visible
= true
— Controls whether the plot will be rendered or not.
MakieCore.surface! Function
surface!
is the mutating variant of plotting function surface
. Check the docstring for surface
for further information.
MakieCore.text Function
text(positions; text, kwargs...)
text(x, y; text, kwargs...)
text(x, y, z; text, kwargs...)
Plots one or multiple texts passed via the text
keyword. Text
uses the PointBased
conversion trait.
Plot type
The plot type alias for the text
function is Text
.
Attributes
align
= (:left, :bottom)
— Sets the alignment of the string w.r.t. position
. Uses :left, :center, :right, :top, :bottom, :baseline
or fractions.
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= @inherit textcolor
— Sets the color of the text. One can set one color per glyph by passing a Vector{<:Colorant}
, or one colorant for the whole text. If color is a vector of numbers, the colormap args are used to map the numbers to colors.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
font
= @inherit font
— Sets the font. Can be a Symbol
which will be looked up in the fonts
dictionary or a String
specifying the (partial) name of a font or the file path of a font file
fonts
= @inherit fonts
— Used as a dictionary to look up fonts specified by Symbol
, for example :regular
, :bold
or :italic
.
fontsize
= @inherit fontsize
— The fontsize in units depending on markerspace
.
fxaa
= false
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
glowcolor
= (:black, 0.0)
— Sets the color of the glow effect around the text.
glowwidth
= 0.0
— Sets the size of a glow effect around the text.
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
justification
= automatic
— Sets the alignment of text w.r.t its bounding box. Can be :left, :center, :right
or a fraction. Will default to the horizontal alignment in align
.
lineheight
= 1.0
— The lineheight multiplier.
lowclip
= automatic
— The color for any value below the colorrange.
markerspace
= :pixel
— Sets the space in which fontsize
acts. See Makie.spaces()
for possible inputs.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
offset
= (0.0, 0.0)
— The offset of the text from the given position in markerspace
units.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
position
= (0.0, 0.0)
— Deprecated: Specifies the position of the text. Use the positional argument to text
instead.
rotation
= 0.0
— Rotates text around the given position
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
strokecolor
= (:black, 0.0)
— Sets the color of the outline around a marker.
strokewidth
= 0
— Sets the width of the outline around a marker.
text
= ""
— Specifies one piece of text or a vector of texts to show, where the number has to match the number of positions given. Makie supports String
which is used for all normal text and LaTeXString
which layouts mathematical expressions using MathTeXEngine.jl
.
transform_marker
= false
— Controls whether the model matrix (without translation) applies to the glyph itself, rather than just the positions. (If this is true, scale!
and rotate!
will affect the text glyphs.)
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
word_wrap_width
= -1
— Specifies a linewidth limit for text. If a word overflows this limit, a newline is inserted before it. Negative numbers disable word wrapping.
MakieCore.text! Function
text!
is the mutating variant of plotting function text
. Check the docstring for text
for further information.
MakieCore.volume Function
volume(volume_data)
volume(x, y, z, volume_data)
Plots a volume, with optional physical dimensions x, y, z
. Available algorithms are:
:iso
=> IsoValue:absorption
=> Absorption:mip
=> MaximumIntensityProjection:absorptionrgba
=> AbsorptionRGBA:additive
=> AdditiveRGBA:indexedabsorption
=> IndexedAbsorptionRGBA
Plot type
The plot type alias for the volume
function is Volume
.
Attributes
absorption
= 1.0
— Absorption multiplier for algorithm=:absorption. This changes how much light each voxel absorbs.
algorithm
= :mip
— Sets the volume algorithm that is used.
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
backlight
= 0.0
— Sets a weight for secondary light calculation with inverted normals.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
diffuse
= 1.0
— Sets how strongly the red, green and blue channel react to diffuse (scattered) light.
enable_depth
= true
— Enables depth write for Volume, so that volume correctly occludes other objects.
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
interpolate
= true
— Sets whether the volume data should be sampled with interpolation.
isorange
= 0.05
— Sets the range of values picked up by the IsoValue algorithm.
isovalue
= 0.5
— Sets the target value for the IsoValue algorithm.
lowclip
= automatic
— The color for any value below the colorrange.
material
= nothing
— RPRMakie only attribute to set complex RadeonProRender materials. Warning, how to set an RPR material may change and other backends will ignore this attribute
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
shading
= automatic
— Sets the lighting algorithm used. Options are NoShading
(no lighting), FastShading
(AmbientLight + PointLight) or MultiLightShading
(Multiple lights, GLMakie only). Note that this does not affect RPRMakie.
shininess
= 32.0
— Sets how sharp the reflection is.
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
specular
= 0.2
— Sets how strongly the object reflects light in the red, green and blue channels.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
MakieCore.volume! Function
volume!
is the mutating variant of plotting function volume
. Check the docstring for volume
for further information.
MakieCore.voxels Function
voxels(x, y, z, chunk::Array{<:Real, 3})
voxels(chunk::Array{<:Real, 3})
Plots a chunk of voxels centered at 0. Optionally the placement and scaling of the chunk can be given as range-like x, y and z. (Only the extrema are considered here. Voxels are always uniformly sized.)
Internally voxels are represented as 8 bit unsigned integer, with 0x00
always being an invisible "air" voxel. Passing a chunk with matching type will directly set those values. Note that color handling is specialized for the internal representation and may behave a bit differently than usual.
Plot type
The plot type alias for the voxels
function is Voxels
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
backlight
= 0.0
— Sets a weight for secondary light calculation with inverted normals.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= nothing
— Sets colors per voxel id, skipping 0x00
. This means that a voxel with id 1 will grab plot.colors[1]
and so on up to id 255. This can also be set to a Matrix of colors, i.e. an image for texture mapping.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
depthsorting
= false
— Controls the render order of voxels. If set to false
voxels close to the viewer are rendered first which should reduce overdraw and yield better performance. If set to true
voxels are rendered back to front enabling correct order for transparent voxels.
diffuse
= 1.0
— Sets how strongly the red, green and blue channel react to diffuse (scattered) light.
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
gap
= 0.0
— Sets the gap between adjacent voxels in units of the voxel size. This needs to be larger than 0.01 to take effect.
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
interpolate
= false
— Controls whether the texture map is sampled with interpolation (i.e. smoothly) or not (i.e. pixelated).
is_air
= x->begin #= /home/runner/work/Makie.jl/Makie.jl/MakieCore/src/basic_plots.jl:607 =# isnothing(x) || (ismissing(x) || isnan(x)) end
— A function that controls which values in the input data are mapped to invisible (air) voxels.
lowclip
= automatic
— The color for any value below the colorrange.
material
= nothing
— RPRMakie only attribute to set complex RadeonProRender materials. Warning, how to set an RPR material may change and other backends will ignore this attribute
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
shading
= automatic
— Sets the lighting algorithm used. Options are NoShading
(no lighting), FastShading
(AmbientLight + PointLight) or MultiLightShading
(Multiple lights, GLMakie only). Note that this does not affect RPRMakie.
shininess
= 32.0
— Sets how sharp the reflection is.
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
specular
= 0.2
— Sets how strongly the object reflects light in the red, green and blue channels.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
uvmap
= nothing
— Defines a map from voxel ids (and optionally sides) to uv coordinates. These uv coordinates are then used to sample a 2D texture passed through color
for texture mapping.
visible
= true
— Controls whether the plot will be rendered or not.
MakieCore.voxels! Function
voxels!
is the mutating variant of plotting function voxels
. Check the docstring for voxels
for further information.
MakieCore.wireframe Function
wireframe(x, y, z)
wireframe(positions)
wireframe(mesh)
Draws a wireframe, either interpreted as a surface or as a mesh.
Plot type
The plot type alias for the wireframe
function is Wireframe
.
Attributes
alpha
= 1.0
— The alpha value of the colormap or color attribute. Multiple alphas like in plot(alpha=0.2, color=(:red, 0.5)
, will get multiplied.
clip_planes
= automatic
— Clip planes offer a way to do clipping in 3D space. You can set a Vector of up to 8 Plane3f
planes here, behind which plots will be clipped (i.e. become invisible). By default clip planes are inherited from the parent plot or scene. You can remove parent clip_planes
by passing Plane3f[]
.
color
= @inherit linecolor
— The color of the line.
colormap
= @inherit colormap :viridis
— Sets the colormap that is sampled for numeric color
s. PlotUtils.cgrad(...)
, Makie.Reverse(any_colormap)
can be used as well, or any symbol from ColorBrewer or PlotUtils. To see all available color gradients, you can call Makie.available_gradients()
.
colorrange
= automatic
— The values representing the start and end points of colormap
.
colorscale
= identity
— The color transform function. Can be any function, but only works well together with Colorbar
for identity
, log
, log2
, log10
, sqrt
, logit
, Makie.pseudolog10
and Makie.Symlog10
.
cycle
= [:color]
— Sets which attributes to cycle when creating multiple plots.
depth_shift
= -1.0e-5
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
fxaa
= false
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
highclip
= automatic
— The color for any value above the colorrange.
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
linecap
= @inherit linecap
— Sets the type of linecap used, i.e. :butt (flat with no extrusion), :square (flat with 1 linewidth extrusion) or :round.
linestyle
= nothing
— Sets the dash pattern of the line. Options are :solid
(equivalent to nothing
), :dot
, :dash
, :dashdot
and :dashdotdot
. These can also be given in a tuple with a gap style modifier, either :normal
, :dense
or :loose
. For example, (:dot, :loose)
or (:dashdot, :dense)
.
For custom patterns have a look at Makie.Linestyle
.
linewidth
= @inherit linewidth
— Sets the width of the line in pixel units
lowclip
= automatic
— The color for any value below the colorrange.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
nan_color
= :transparent
— The color for NaN values.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
MakieCore.wireframe! Function
wireframe!
is the mutating variant of plotting function wireframe
. Check the docstring for wireframe
for further information.
Makie.And Type
And(left, right[, rest...])
Creates an And
struct with the left and right argument for later evaluation. If more than two arguments are given a tree of And
structs is created.