Re: [Matplotlib-users] Exclude colour from a colourbar

2010-09-13 Thread mdekauwe
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.

Re: [Matplotlib-users] Exclude colour from a colourbar

2010-09-13 Thread mdekauwe
So far I have tried this... colourmap = cm.get_cmap("Greys_r") colourmap = colourmap._segmentdata # exclude 0, 0, 0...i.e. black from dictionary bvals = colourmap['blue'][1:] gvals = colourmap['green'][1:] rvals = colourmap['red'][1:] colourmap = { "blue":bvals, "green":gvals, "red":rvals } col

[Matplotlib-users] Exclude colour from a colourbar

2010-09-13 Thread mdekauwe
Hi, I am setting a colourbar where I explictly set the tick intervals. However I would like to exclude the colour black from this colourbar. The reason for this is I would like to overplot some contour lines in black, so would like to make them stand out. An example...where I would like to exclu