CairoMakie.ScreenType
Screen(; screen_config...)

Arguments one can pass via screen_config:

  • px_per_unit = 2.0
  • pt_per_unit = 0.75
  • antialias::Union{Symbol, Int} = :best: antialias modus Cairo uses to draw. Applicable options: [:best => Cairo.ANTIALIAS_BEST, :good => Cairo.ANTIALIAS_GOOD, :subpixel => Cairo.ANTIALIAS_SUBPIXEL, :none => Cairo.ANTIALIAS_NONE].
  • visible::Bool: if true, a browser/image viewer will open to display rendered output.

Constructors:

Screen constructors implemented by all backends:

# Constructor aimed at showing the plot in a window.
Screen(scene::Scene; screen_config...)

# Screen to save a png/jpeg to file or io
Screen(scene::Scene, io::IO, mime; screen_config...)

# Screen that is efficient for `colorbuffer(screen, format)`
Screen(scene::Scene, format::Makie.ImageStorageFormat; screen_config...)

Interface implemented by all backends:

# Needs to be overload:
size(screen) # Size in pixel
empty!(screen) # empties screen state to reuse the screen, or to close it

# Optional
wait(screen) # waits as long window is open

# Provided by Makie:
push_screen!(scene, screen)
CairoMakie.ScreenConfigType
  • px_per_unit = 2.0
  • pt_per_unit = 0.75
  • antialias::Union{Symbol, Int} = :best: antialias modus Cairo uses to draw. Applicable options: [:best => Cairo.ANTIALIAS_BEST, :good => Cairo.ANTIALIAS_GOOD, :subpixel => Cairo.ANTIALIAS_SUBPIXEL, :none => Cairo.ANTIALIAS_NONE].
  • visible::Bool: if true, a browser/image viewer will open to display rendered output.
CairoMakie.activate!Method
CairoMakie.activate!(; screen_config...)

Sets CairoMakie as the currently active backend and also allows to quickly set the screen_config. Note, that the screen_config can also be set permanently via Makie.set_theme!(CairoMakie=(screen_config...,)).

Arguments one can pass via screen_config:

  • px_per_unit = 2.0
  • pt_per_unit = 0.75
  • antialias::Union{Symbol, Int} = :best: antialias modus Cairo uses to draw. Applicable options: [:best => Cairo.ANTIALIAS_BEST, :good => Cairo.ANTIALIAS_GOOD, :subpixel => Cairo.ANTIALIAS_SUBPIXEL, :none => Cairo.ANTIALIAS_NONE].
  • visible::Bool: if true, a browser/image viewer will open to display rendered output.
CairoMakie.best_fontFunction

Finds a font that can represent the unicode character! Returns Makie.defaultfont() if not representable!

CairoMakie.check_parent_plotsMethod
check_parent_plots(f, plot::Plot)::Bool

Returns whether the plot's parent tree satisfies the predicate f. f must return a Bool and take a plot as its only argument.

CairoMakie.disable_mime!Method
disable_mime!(mime::Union{String, Symbol, MIME}...)

The default is automatic, which lets the display system figure out the best mime. If set to any other valid mime, will result in showable(any_other_mime, figurelike) to return false and only return true for showable(preferred_mime, figurelike). Depending on the display system used, this may result in nothing getting displayed.

CairoMakie.draw_plotMethod

Special method for polys so we don't fall back to atomic meshes, which are much more complex and slower to draw than standard paths with single color.

CairoMakie.is_cairomakie_atomic_plotMethod
is_cairomakie_atomic_plot(plot::Plot)::Bool

Returns whether the plot is considered atomic for the CairoMakie backend. This is overridden for Poly, Band, and Tricontourf so we can apply CairoMakie can treat them as atomic plots and render them directly.

Plots with children are by default recursed into. This can be overridden by defining specific dispatches for is_cairomakie_atomic_plot for a given plot type.

CairoMakie.to_cairo_antialiasMethod

Supported options: [:best => Cairo.ANTIALIAS_BEST, :good => Cairo.ANTIALIAS_GOOD, :subpixel => Cairo.ANTIALIAS_SUBPIXEL, :none => Cairo.ANTIALIAS_NONE]

CairoMakie.to_mime_stringMethod
to_mime_string(mime::Union{String, Symbol, MIME})

Converts anything like "png", :png, "image/png", MIME"image/png"() to "image/png".

CairoMakie.tryrunMethod
tryrun(cmd::Cmd)

Try to run a command. Return true if cmd runs and is successful (exits with a code of 0). Return false otherwise.