default_kw and force_kw macros for recipes
This commit is contained in:
parent
3c09921cbd
commit
59c1e24371
@ -144,6 +144,9 @@ export
|
||||
arcdiagram,
|
||||
chorddiagram,
|
||||
|
||||
@default_kw,
|
||||
@force_kw,
|
||||
|
||||
translate,
|
||||
translate!,
|
||||
rotate,
|
||||
|
||||
@ -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
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user