User Manual
Makie Themes
MakiePublication provides various Makie themes suitable for creating publication quality figures and 1 theme for web presentation.
MakiePublication.theme_acs
— Functiontheme_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 oftrue
orfalse
values, which indicates whether the current marker is hollow.palette=nothing
: a palette to be used by Makie. It is aNamedTuple
when it is notnothing
. Example: (color=COLORS[1], marker=MARKERS). It is key will be referenced bycycle
,linecycle
andscattercycle
.cycle=CYCLE
: a MakieCycle
instance tell how Makie will cycle figure properties.linecycle=nothing
:Cycle
instance used byLine
plots. If it isnothing
, thencycle
value will be used instead.scattercycle=nothing
:Cycle
instance used byScatter
plots. If it isnothing
, thencycle
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 ofwidth
.usetexfont=true
: set if Makie should use the ComputerModern font provided byMathTexEngine.jl
.
MakiePublication.theme_acs_1col
— FunctionOne-column figure for ACS, which is identical to theme_acs
.
MakiePublication.theme_acs_2col
— FunctionTwo-column figure for ACS.
MakiePublication.theme_aps
— Functiontheme_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.
MakiePublication.theme_aps_1col
— FunctionOne-column figure for APS, which is identical to theme_aps
.
MakiePublication.theme_aps_2col
— FunctionTwo-column figure for APS.
MakiePublication.theme_jcap
— Functiontheme_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
.
MakiePublication.theme_jhep
— Functiontheme_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
.
MakiePublication.theme_joss
— Functiontheme_joss(; kwargs...)
Generate Makie theme for producing figures for JOSS (The Journal of Open Source Software).
The usage is the same as theme_acs
except figure width=5.36066
. The value of width
is obtained from \uselengthunit{in}\printlength{\linewidth}
.
JOSS is single column, so theme_joss_1col
and theme_joss_2col
are not defined.
See also theme_acs
, theme_aps
, theme_jcap
, theme_rsc
, and theme_web
.
MakiePublication.theme_rsc
— Functiontheme_rsc(; kwargs...)
Generate Makie theme for producing figures for RSC (Royal Society of Chemistry). The usage is the same as theme_acs
except figure width=3.26
which following the guideline of the RSC publisher.
MakiePublication.theme_rsc_1col
— FunctionOne-column figure for RSC, which is identical to theme_rsc
.
MakiePublication.theme_rsc_2col
— FunctionTwo-column figure for RSC.
MakiePublication.theme_web
— Functiontheme_web(width=600, colors=COLORS, markers=MARDERS, cycle=CYCLE)
Generate Makie theme for producing figures for web publishing. The usage is the same as theme_acs
except figure width
which following the guideline of the Makie default.
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
MakiePublication.seaborn_deep
— FunctionColor palette: seaborn_deep
MakiePublication.seaborn_dark
— FunctionColor palette: seaborn_dark
MakiePublication.seaborn_bright
— FunctionColor palette: seaborn_bright
MakiePublication.seaborn_muted
— FunctionColor palette: seaborn_muted
MakiePublication.seaborn_colorblind
— FunctionColor palette: seaborn_colorblind
MakiePublication.tab10
— FunctionColor palette: tab10
MakiePublication.tableau_10
— FunctionColor palette: tableau_10
MakiePublication.tableau_superfishel_stone
— FunctionColor palette: tableausuperfishelstone
MakiePublication.wong
— FunctionColor palette: wong
MakiePublication.tol_bright
— FunctionColor palette: tol_bright
MakiePublication.okabe_ito
— FunctionColor palette: okabe_ito
MakiePublication.mk_8
— FunctionColor palette: mk_8
MakiePublication.dark2_8
— FunctionColor palette: dark2_8
MakiePublication.set1_8
— FunctionColor palette: set1_8
MakiePublication.glasbey_hv_n256
— FunctionColor palette: glasbeyhvn256
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.alpharize
— Functionalpharize(alpha, colors)
Add a alpha value to RGB colors
or modify the alpha channel value of RGBA colors
.
MakiePublication.figsize
— Functionfigsize(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.
MakiePublication.savefig
— Functionsavefig(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
.