Skip to content

Trying to understand sorting better #1046

Discussion options

You must be logged in to vote

I expect part of the confusion is the difference between sorting the (x) scale domain, i.e. the order of bars along the x-axis, and sorting the mark, i.e. the z-order in which marks are drawn. The former is known as mark sort options, whereas the latter is known as the basic sort transform. Both are controlled by the mark’s sort option; it just depends on the value of this function (as described in the README):

Note: when the value of the sort option is a string or a function, it is interpreted as a basic sort transform. To use both sort options and a sort transform, use Plot.sort.

The basic sort transform is generally only relevant if you have overlapping marks to avoid occlusion, such…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ChristopherPAndrews
Comment options

Answer selected by Fil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants