|
From: Oleksandr H. <guz...@gm...> - 2013-08-20 15:28:40
|
Hi matplotlib users:
Could you please help me with this?
I have created a map plot and a colorbar. For the colorbar I've used the
format argument, supplying the following object as a value:
#format the colorbar tick labels
sfmt = ScalarFormatter(useMathText=True)
sfmt.set_powerlimits((-2, 2))
cb = colorbar(format=sfmt)
As you can see on the image below my text from the multiplier is
overlapping with a top tick label. I would like to lift it a bit, is there
an easy way?
I tried this, but it does not work, since after colorbar() the toffsetText does
not contain the multiplier yet:
ax = cb.ax
title = ax.offsetText.get_text()
ax.offsetText.set_text("{0}\n\n\n\n".format(title))
[image: image]<https://f.cloud.github.com/assets/900941/986867/2a1ef2c8-08e1-11e3-9674-12ac7558f082.png>
I could, probably increase the width of the colorbar or decrease font
size... But I like this width and the font size seems to be very readable.
|