swap x/y formatters for vline

This commit is contained in:
Daniel Schwabeneder 2019-09-02 00:04:11 +02:00
parent bccf4ef563
commit dd645bcd9f

View File

@ -937,6 +937,15 @@ function preprocessArgs!(plotattributes::KW)
end end
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 # handle grid args common to all axes
args = pop!(plotattributes, :grid, ()) args = pop!(plotattributes, :grid, ())
for arg in wraptuple(args) for arg in wraptuple(args)