Skip to content

Commit

Permalink
remove one_arg_shorthands macro (#74)
Browse files Browse the repository at this point in the history
It didn't work out as intended
  • Loading branch information
BeastyBlacksmith authored Sep 9, 2020
1 parent 720d400 commit 1474496
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions RecipesBase/src/RecipesBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export
@series,
@userplot,
@shorthands,
@one_arg_shorthands,
RecipeData,
AbstractBackend,
AbstractPlot,
Expand Down Expand Up @@ -405,31 +404,6 @@ macro shorthands(funcname::Symbol)
end)
end

"""
@one_arg_shorthands(funcname::Symbol)
Similar to `@shorthands`, but for one-argument plots.
The main difference with `@shorthands` is that the arguments
are reordered according to the `orientation` keyword
such that the axis letter is correctly assigned.
"""
macro one_arg_shorthands(funcname::Symbol)
funcname2 = Symbol(funcname, "!")
esc(quote
export $funcname, $funcname2
Core.@__doc__ $funcname(x; kw...) = get(kw, :orientation, :vertical) == :vertical ?
RecipesBase.plot(x, []; kw..., seriestype = $(Meta.quot(funcname))) :
RecipesBase.plot([], x; kw..., seriestype = $(Meta.quot(funcname)))
Core.@__doc__ $funcname2(plt, x; kw...) = get(kw, :orientation, :vertical) == :vertical ?
RecipesBase.plot!(plt, x, []; kw..., seriestype = $(Meta.quot(funcname))) :
RecipesBase.plot!(plt, [], x; kw..., seriestype = $(Meta.quot(funcname)))
Core.@__doc__ $funcname2(x; kw...) = get(kw, :orientation, :vertical) == :vertical ?
RecipesBase.plot!(x, []; kw..., seriestype = $(Meta.quot(funcname))) :
RecipesBase.plot!([], x; kw..., seriestype = $(Meta.quot(funcname)))
end)
end

#----------------------------------------------------------------------------

# allow usage of type recipes without depending on StatsPlots
Expand Down

0 comments on commit 1474496

Please sign in to comment.