Colorbar offsetText (scientific base multiplier) move from top to bottom of colorbar

后端 未结 2 1376
不思量自难忘°
不思量自难忘° 2020-12-18 14:51

I\'m losing my wits here with this \'simple\' problem:

In the colorbar (illustrated in picture) in matplotlib I need to move offsetText (base multiplier) from top of

2条回答
  •  囚心锁ツ
    2020-12-18 14:57

    Hmmm... Apparently, it's not possible to move colorbar's scientific base multiplier up or down, just slightly left or right.

    Workaround would be to hide it and just add (same) custom text that would be positioned at the bottom (in my case):

        cb.ax.yaxis.get_offset_text().set_visible(False)
        cb.ax.text(0.5, -0.1, '1e4', va='bottom', ha='center', size=6)
    

    If someone has more elegant solution, I would be happy to see it!

提交回复
热议问题