Skip to content

tooltip

Makie.tooltip Function
julia
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.

source

Examples

Basic tooltip

julia
using CairoMakie
fig, ax, p = scatter(Point2f(0), marker = 'x', markersize = 20)
tooltip!(Point2f(0), "This is a tooltip pointing at x")
fig

Attributes

align

Defaults to 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

Defaults to :white

Sets the background color of the tooltip.

clip_planes

Defaults to 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

Defaults to 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

Defaults to @inherit font

Sets the font.

fontsize

Defaults to 16

Sets the text size in screen units.

fxaa

Defaults to true

adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).

inspectable

Defaults to false

sets whether this plot should be seen by DataInspector.

inspector_clear

Defaults to automatic

Sets a callback function (inspector, plot) -> ... for cleaning up custom indicators in DataInspector.

inspector_hover

Defaults to automatic

Sets a callback function (inspector, plot, index) -> ... which replaces the default show_data methods.

inspector_label

Defaults to automatic

Sets a callback function (plot, index, position) -> string which replaces the default label generated by DataInspector.

justification

Defaults to :left

Sets whether text is aligned to the :left, :center or :right within its bounding box.

model

Defaults to automatic

Sets a model matrix for the plot. This overrides adjustments made with translate!, rotate! and scale!.

offset

Defaults to 10

Sets the offset between the given position and the tip of the triangle pointing at that position.

outline_color

Defaults to :black

Sets the color of the tooltip outline.

outline_linestyle

Defaults to nothing

Sets the linestyle of the tooltip outline.

outline_linewidth

Defaults to 2.0

Sets the linewidth of the tooltip outline.

overdraw

Defaults to false

Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends

placement

Defaults to :above

Sets where the tooltip should be placed relative to position. Can be :above, :below, :left, :right.

space

Defaults to :data

sets the transformation space for box encompassing the plot. See Makie.spaces() for possible inputs.

ssao

Defaults to 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

Defaults to :white

Sets the text outline color.

strokewidth

Defaults to 0

Gives text an outline if set to a positive value.

text

Defaults to ""

No docs available.

textcolor

Defaults to @inherit textcolor

Sets the text color.

textpadding

Defaults to (4, 4, 4, 4)

Sets the padding around text in the tooltip. This is given as (left, right, bottom, top) offsets.

transformation

Defaults to automatic

No docs available.

transparency

Defaults to false

Adjusts how the plot deals with transparency. In GLMakie transparency = true results in using Order Independent Transparency.

triangle_size

Defaults to 10

Sets the size of the triangle pointing at position.

visible

Defaults to true

Controls whether the plot will be rendered or not.

xautolimits

Defaults to false

No docs available.

yautolimits

Defaults to false

No docs available.

zautolimits

Defaults to false

No docs available.