User Manual

Makie Themes

MakiePublication provides 5 Makie themes suitable for creating publication quality figures and 1 theme for web presentation.

MakiePublication.theme_acsFunction
theme_acs(; kwargs...)

Generate Makie theme for producing figures for ACS (American Chemical Society).

Save the figure using savefig("path_to_figure.pdf", fig) or save("path_to_figure.pdf", fig, pt_per_unit=1.0).

Auguments

  • width=3.25: width of figure in unit of inches.
  • colors=COLORS[1]: color palette specified by a list of colors.
  • linestyles=LINESTYLES: a list of line styles to be cycled.
  • markers=MARKERS: a list of markers to be cycled.
  • ishollowmarkers: a list of true or false values, which indicates whether the current marker is hollow.
  • palette=nothing: a palette to be used by Makie. It is a NamedTuple when it is not nothing. Example: (color=COLORS[1], marker=MARKERS). It is key will be referenced by cycle, linecycle and scattercycle.
  • cycle=CYCLE: a Makie Cycle instance tell how Makie will cycle figure properties.
  • linecycle=nothing: Cycle instance used by Line plots. If it is nothing, then cycle value will be used instead.
  • scattercycle=nothing: Cycle instance used by Scatter plots. If it is nothing, then cycle value will be used instead.
  • markerstrokewidth=0: customize the stroke width of markers.
  • heightwidthratio=HWRATIO: set the aspect ratio of the figure as a multiple of width.
  • usetexfont=true: set if Makie should use the ComputerModern font provided by MathTexEngine.jl.

See also theme_aps, theme_rsc, and theme_web.

source
MakiePublication.theme_apsFunction
theme_aps(; kwargs...)

Generate Makie theme for producing figures for APS (American Physical Society). The usage is the same as theme_acs except figure width=3.375 which following the guideline of the APS publisher.

See also theme_acs, theme_rsc, and theme_web.

source
MakiePublication.theme_jcapFunction
theme_jcap(; kwargs...)

Generate Makie theme for producing figures for JCAP (Journal of Cosmology and Astroparticle Physics).

The usage is the same as theme_acs except figure width=6.08948. The value of width is obtained from \uselengthunit{in}\printlength{\linewidth} and corresponds to 440pt.

JCAP is single column, so theme_jcap_1col and theme_jcap_2col are not defined.

See also theme_acs, theme_aps, theme_jhep, theme_rsc, and theme_web.

source
MakiePublication.theme_jhepFunction
theme_jhep(; kwargs...)

Generate Makie theme for producing figures for JHEP (Journal of High Energy Physics).

The usage is the same as theme_acs except figure width=5.95393. The value of width is obtained from \uselengthunit{in}\printlength{\linewidth}.

JHEP is single column, so theme_jhep_1col and theme_jhep_2col are not defined.

See also theme_acs, theme_aps, theme_jcap, theme_rsc, and theme_web.

source

Built-in Color Palettes

MakiePublication provides 15 built-in color palettes which are adopt from well-known quality color schemes. 14 of them are from the quality color schemes in the ColorSchemes.jl package with the same name. wong is from the Makie default. The order of colors in some of these color palettes has been adjusted to have a consistent manner with the seaborn_deep color palette.

Methods for creating color palettes

COLORS

The order is following how strongly we recommend the corresponding color palette.

const COLORS = [seaborn_deep(),  # 10 colors
                tab10(),  # 10 colors
                tableau_10(),  # 10 colors
                wong(),  # 7 colors
                tol_bright(),  # 7 colors
                okabe_ito(),  # 8 colors
                mk_8(),  # 8 colors
                tableau_superfishel_stone(),  # 10 colors
                dark2_8(),  # 8 colors
                set1_8(),  # 8 colors
                glasbey_hv_n256(),  # 10 colors
                seaborn_dark(),  # 10 colors
                seaborn_muted(),  # 10 colors
                seaborn_bright(),  # 10 colors
                seaborn_colorblind()  # 10 colors
                ]

Default Line Styles

const LINESTYLES = [nothing,  # solid line
                    :dash,
                    :dot,
                    :dashdot,
                    :dashdotdot
                    ]

Default Marker Types

const MARKERS = [:circle,
                 :rect,
                 :dtriangle,
                 :utriangle,
                 :cross,
                 :diamond,
                 :ltriangle,
                 :rtriangle,
                 :pentagon,
                 :xcross,
                 :hexagon
                 ]

Default Cycler

The default cycler, which is a Makie.Cycle object, is used by both Line and Scatter plots.

const CYCLE = Cycle([:color, :marker], covary=true)

Default Image Height/Width Ratio

const HWRATIO = 0.68  # = figure_height / figure_width

Utility Methods

MakiePublication.figsizeFunction
figsize(width_in_inch, height_width_ratio=0.68)

Convert figure size in inches (which is often required by publishers) to that in points (which is the unit for CairoMakie).

Note that 1 point in CairoMakie is equal to 1/72 inch.

source
MakiePublication.savefigFunction
savefig(f, fig, pt_per_unit=1)

Save the Figure instance fig as an image file. f is the path to the image file, like /path/to/figure.svg. Many image format are supported. The most common ones are: svg, pdf, eps, and png.

source