Skip to content

Commit

Permalink
swap axis limits for bars
Browse files Browse the repository at this point in the history
  • Loading branch information
BeastyBlacksmith committed Jun 8, 2023
1 parent 45b87a0 commit e786ff5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/backends.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,6 @@ const _unicodeplots_seriestype = [
:heatmap,
:contour,
# :contour3d,
:permute,
:image,
:spy,
:surface,
Expand Down
9 changes: 9 additions & 0 deletions src/pipeline.jl
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,15 @@ function RecipesPipeline.add_series!(plt::Plot, plotattributes)
elseif ms === :vline && (perm == (:x, :y) || perm == (:y, :x))
plotattributes[:markershape] = :hline
end
if plotattributes[:seriestype] === :bar # bar calls expand_extrema! in its recipe...
sp = plotattributes[:subplot]
sp[get_attr_symbol(letter1, :axis)][:lims],
sp[get_attr_symbol(letter2, :axis)][:lims] =
sp[get_attr_symbol(letter2, :axis)][:lims],
sp[get_attr_symbol(letter1, :axis)][:lims]
end
plotattributes[:x_extrema], plotattributes[:y_extrema] =
plotattributes[:y_extrema], plotattributes[:x_extrema]
plotattributes[letter1], plotattributes[letter2] =
plotattributes[letter2], plotattributes[letter1]
end
Expand Down

0 comments on commit e786ff5

Please sign in to comment.