Merge pull request #2170 from daschw/vline

swap x/y formatters for vline
This commit is contained in:
Daniel Schwabeneder 2019-09-04 21:11:25 +02:00 committed by GitHub
commit 4cb3e6a23c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)