Skip to content

A Julia package for producing publication quality figures based on Makie.jl.

License

Notifications You must be signed in to change notification settings

nickkeepfer/MakiePublication.jl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MakiePublication.jl

MakiePublication.jl is a Julia package for producing publication quality figures based on Makie.jl. MakiePublication.jl aims to provide an equivalent functionalities as the Python package mpltex.

Features

  • Provide a collection of custom themes for journal publishers: ACS, APS, RSC.
  • Custom theme for making figures suitable for web pages.

Install

MakiePublication can be installed from the Julia REPL.

julia> # Press the key "]"

(@v1.7) pkg> add MakiePublication

Usage

using MakiePublication
using CairoMakie
using LaTeXStrings

function myplot()
  x = 0:0.001:1.0
  fig = Figure(figure_padding=(0, 6, 0, 4))
  ax = Axis(fig, xlabel=L"x", ylabel=L"f(x)")
  lines!(ax, x, x, label=L"x")
  lines!(ax, x, x.^2, label=L"x^2")
  lines!(ax, x, x.^3, label=L"x^3")
  lines!(ax, x, x.^4, label=L"x^4")
  lines!(ax, x, log.(x.+1), label=L"\ln(1+x)")
  lines!(ax, x, .√x, label=L"x^{1/2}")
  lines!(ax, x, x.^(1/3), label=L"x^{1/3}")
  xlims!(0, 1)
  ylims!(0, 1)
  
  fig[1,1] = ax
  
  return fig
end

fig = with_theme(myplot, theme_acs())
savefig("myplot.pdf", fig)

Sample figures can be found in the doc folder.

Please see the Pluto notebook doc/tutorial.jl.html for a detailed demonstration of this package.

Contribute

Links

About

A Julia package for producing publication quality figures based on Makie.jl.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Julia 100.0%