The solution incase anyone has a similar issue...
data = np.random.randint(0,50,100*100).reshape(100, 100)
m = Basemap(llcrnrlon=1.5, llcrnrlat=10.5, urcrnrlon=3.5, urcrnrlat=13.5,
resolution='c', projection='cyl')
fig = plt.figure(figsize=(8, 6))
ax = fig.add_axes([0.1, 0.1, 0.6, 0.7])
m.ax = ax
ticks = [0, 10, 20, 30, 40, 50]
colours = cm.Greys_r(np.linspace(0.3, 1.0, 6))
colourmap = colors.ListedColormap(colours)
norm = colors.BoundaryNorm(ticks, colourmap.N)
im = m.imshow(data, cmap=colourmap, norm=norm, interpolation='nearest')
pos = ax.get_position()
l, b, w, h = pos.bounds
cax = plt.axes([l+w+0.045, b, 0.05, h])
cbar = mpl.colorbar.ColorbarBase(cax, cmap=colourmap, norm=norm,
ticks=ticks)
plt.show()
--
View this message in context:
http://old.nabble.com/Exclude-colour-from-a-colourbar-tp29699746p29703615.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users