From dd645bcd9f0d9440ffe197456c4d3297ccda3820 Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Mon, 2 Sep 2019 00:04:11 +0200 Subject: [PATCH] swap x/y formatters for vline --- src/args.jl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/args.jl b/src/args.jl index 68ac3fd4..ef134731 100644 --- a/src/args.jl +++ b/src/args.jl @@ -937,6 +937,15 @@ function preprocessArgs!(plotattributes::KW) end end + # vline accesses the y argument but actually maps it to the x axis. + # Hence, we have to swap formatters + if get(plotattributes, :seriestype, :path) == :vline + xformatter = get(plotattributes, :xformatter, :auto) + yformatter = get(plotattributes, :yformatter, :auto) + plotattributes[:xformatter] = yformatter + plotattributes[:yformatter] = xformatter + end + # handle grid args common to all axes args = pop!(plotattributes, :grid, ()) for arg in wraptuple(args)