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.
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to