Skip to content

Color, zorder, and position of Bar plot #2965

Answered by mwaskom
mattharrison asked this question in Q&A
Discussion options

You must be logged in to vote
  • The order is changed (should I just sort in Pandas?)

I am pretty sure that your first example is labeling the y axis ticks incorrectly here. But if you just mean that the bars go from small to large when descending the y axis, you could do ax.yaxis.set_inverted(True) which is what the seaborn categorical functions do by default (and probably what a Nominal scale will do at some point soon).

  • Not clear how to set the bar color
so.Bar(color=...)
  • The position of the axes on the figure seems to have shifted

I think you want to add .layout(algo=None); perhaps the default should be to not apply a tight layout when passed an existing matplotlib object.

  • Not sure how I specify zorder …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mwaskom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants
Converted from issue

This discussion was converted from issue #2959 on August 20, 2022 20:12.