restore formatters
This commit is contained in:
parent
b8a1efc4c0
commit
acac178d8a
@ -993,6 +993,15 @@ function RecipesPipeline.preprocess_attributes!(plotattributes::AKW)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# vline and others accesses the y argument but actually maps it to the x axis.
|
||||||
|
# Hence, we have to swap formatters
|
||||||
|
if treats_y_as_x(get(plotattributes, :seriestype, :path))
|
||||||
|
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 = RecipesPipeline.pop_kw!(plotattributes, :grid, ())
|
args = RecipesPipeline.pop_kw!(plotattributes, :grid, ())
|
||||||
for arg in wraptuple(args)
|
for arg in wraptuple(args)
|
||||||
|
|||||||
@ -57,8 +57,7 @@ end
|
|||||||
## Preprocessing attributes
|
## Preprocessing attributes
|
||||||
function RecipesPipeline.preprocess_axis_args!(plt::Plot, plotattributes, letter)
|
function RecipesPipeline.preprocess_axis_args!(plt::Plot, plotattributes, letter)
|
||||||
# Fix letter for seriestypes that are x only but data gets passed as y
|
# Fix letter for seriestypes that are x only but data gets passed as y
|
||||||
if get(plotattributes, :seriestype, :path) in
|
if treats_y_as_x(get(plotattributes, :seriestype, :path))
|
||||||
(:vline, :vspan, :histogram, :barhist, :stephist, :scatterhist)
|
|
||||||
if get(plotattributes, :orientation, :vertical) == :vertical
|
if get(plotattributes, :orientation, :vertical) == :vertical
|
||||||
letter = :x
|
letter = :x
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
|
function treats_y_as_x(seriestype)
|
||||||
|
return seriestype in (:vline, :vspan, :histogram, :barhist, :stephist, :scatterhist)
|
||||||
|
end
|
||||||
function replace_image_with_heatmap(z::Array{T}) where T<:Colorant
|
function replace_image_with_heatmap(z::Array{T}) where T<:Colorant
|
||||||
n, m = size(z)
|
n, m = size(z)
|
||||||
colors = palette(vec(z))
|
colors = palette(vec(z))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user