default_kw and force_kw macros for recipes
This commit is contained in:
parent
3c09921cbd
commit
59c1e24371
@ -144,6 +144,9 @@ export
|
|||||||
arcdiagram,
|
arcdiagram,
|
||||||
chorddiagram,
|
chorddiagram,
|
||||||
|
|
||||||
|
@default_kw,
|
||||||
|
@force_kw,
|
||||||
|
|
||||||
translate,
|
translate,
|
||||||
translate!,
|
translate!,
|
||||||
rotate,
|
rotate,
|
||||||
|
|||||||
@ -28,6 +28,13 @@ function _apply_recipe(d::KW, args...; issubplot=false, kw...)
|
|||||||
args
|
args
|
||||||
end
|
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