Barchart with vertical labels in python/matplotlib

后端 未结 4 1103
栀梦
栀梦 2021-01-31 07:17

I\'m using matplotlib to generate a (vertical) barchart. The problem is my labels are rather long. Is there any way to display them vertically, either in the bar or above it or

4条回答
  •  一个人的身影
    2021-01-31 07:35

    I would suggest looking at the matplotlib gallery. At least two of the examples seem to be relevant:

    • text_rotation.py for understanding how text layout works
    • barchart_demo2.py, an example of a bar chart with somewhat more complicated layout than the most basic example.

提交回复
热议问题