Seaborn PointPlot Category Ordering Issue

前端 未结 1 717
难免孤独
难免孤独 2021-01-15 23:26

I have been trying to use pointplot in Seaborn and in general it does what I need and I\'m very impressed with the functionality.

My use case is fairly standard:

1条回答
  •  不思量自难忘°
    2021-01-15 23:56

    As explained in the tutorial, categorical plotting functions follow a set of rules to determine the order of plot elements:

    • If a sequence of categories is passed to the order parameter, that order is used.
    • If the variable is a pandas Categorical with an assigned category order, that order is used.
    • If the variable is numeric, the values are shown in sorted order
    • Otherwise, the values are shown in the order that they appear in the DataFrame.

    0 讨论(0)
提交回复
热议问题