mirror of
https://gitlab.rlp.net/mobitar/ReCo.jl.git
synced 2025-09-04 09:12:35 +00:00
Snapshot graphic with CairoMakie
This commit is contained in:
parent
4e054653f5
commit
70abd1d4c7
6 changed files with 171 additions and 74 deletions
|
@ -5,7 +5,7 @@ function init_cairomakie!()
|
|||
return nothing
|
||||
end
|
||||
|
||||
function gen_figure(; padding=4)
|
||||
function gen_figure(; padding=5)
|
||||
text_width_in_pt = 405
|
||||
|
||||
return Figure(;
|
||||
|
@ -22,8 +22,10 @@ function set_gaps!(fig::Figure)
|
|||
return nothing
|
||||
end
|
||||
|
||||
function save_fig(filename::String, fig::Figure, parent_dir="exports/graphics")
|
||||
function save_fig(filename::String, fig::Figure; parent_dir="exports/graphics")
|
||||
mkpath(parent_dir)
|
||||
|
||||
return save("$parent_dir/$filename", fig; pt_per_unit=1)
|
||||
save("$parent_dir/$filename", fig; pt_per_unit=1)
|
||||
|
||||
return nothing
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue