diff --git a/src/Plots.jl b/src/Plots.jl index 90bd5ea3..8643ee0a 100644 --- a/src/Plots.jl +++ b/src/Plots.jl @@ -144,6 +144,9 @@ export arcdiagram, chorddiagram, + @default_kw, + @force_kw, + translate, translate!, rotate, diff --git a/src/recipes.jl b/src/recipes.jl index 4bfcadb2..f347c3a5 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -28,6 +28,13 @@ function _apply_recipe(d::KW, args...; issubplot=false, kw...) args end +macro default_kw(k, v) + esc(:(get!(d, $k, $v))) +end + +macro force_kw(k, v) + esc(:(d[$k] = $v)) +end # ---------------------------------------------------------------------------