Plots.jl
Plots.jl copied to clipboard
[FR] sort axis limits
Setting axis limits with xlims
etc only works if the values are specified in ascending order. Particularly if the axis is flipped, this is confusing - in many cases it's more natural to specify limits from left to right according to the axis. For example,
scatter([1,2,3,4,5],[1,2,3,4,5], xlims=(4.2,1.8),xflip=true)
doesn't set the limits as specified, but actually shows the plot from 5.2 to 4.2.
It would be very helpful if limits could be sorted automatically into ascending order.
(tested with Julia 1.9, Plots 1.39)