Sort in the visualization

kpat
kpat New Altair Community Member
edited November 2024 in Community Q&A
Does anyone knows way to sort graph in the visualization tab.
I know you can add sort to individual element of the graph but if the data in non-numerical and you want to display graph in certain order, is there any way I can do it?

Tagged:

Best Answer

  • Caperez
    Caperez Altair Community Member
    Answer ✓
    Hi @kpat,

    The graphs in RM plots the data taking into account the index order. A possible approach is creating a new sortable Attribute, assigning the values in the order that you need and finally using the sort Operator to reorder the exampleset as you like. 

    please find attached a simple example with the Iris dataset.

    Best

    Cesar

Answers

  • kpat
    kpat New Altair Community Member

  • Caperez
    Caperez Altair Community Member
    Answer ✓
    Hi @kpat,

    The graphs in RM plots the data taking into account the index order. A possible approach is creating a new sortable Attribute, assigning the values in the order that you need and finally using the sort Operator to reorder the exampleset as you like. 

    please find attached a simple example with the Iris dataset.

    Best

    Cesar
  • kpat
    kpat New Altair Community Member
    Thank you Cesar for the response. I wish App had a drag and drop feature to arrange plot data like Tebleau.