Post by ColmPost by ColmHi,
I'm trying to overlay a contour plot of bathmetry over a pcolor plot, but when I plot the contour plot, it turns the whole pcolor plot a nasty shade of brown. I assume it's to do with the color commands of the contour plot messing with the colours of the pcolor, but is there anyway of stopping this happening?
I'm using a Lambert projection, if that makes any difference.
Anyone else have any ideas?
Hi,
I'm having a similar problem, but I?m trying to use pcolor over a contour plot (to plot a concentration map over a bathymetry contour). When I put the pcolor plot the contour changes to the highest associated color of the colormap in the pcolor plot.
I think it has something to do with the colormap associated with the figure. Is it possible to use two different colormaps in one figure? If it is, problem solved...
1) As I couldn't use two colormaps in one figure, I edited a jet colormap so that the "pcolor highest value associated color +1" was black.
2) Then I created a NaN matrix the same size of the matrix used on the pcolor plot and transformed, only the cells associated with the exterior contour plot, to the value associated with the black color on the colormap.
3) Then I added the two (the original pcolor matrix and the one I created), so my new matrix had the pcolor values and they were surounded by the values associated with the black color on the colormap.
4) And then plot (pcolor) the new matrix. It should work.
5) Then, if you want to plot the colorbar as well, you?ll have to limit the scale of this colorbar to the (black color value -1), or the highest value of the original pcolor plot, so that the black color doesn?t appear on your colorbar.
As I have to process maybe a thousand maps i'm trying to make a script to generate them all, but as i?m using many different variables (such as BOD and total phosphorous), I have to change the scale of the colormap constantly, and this is causing trouble.
But, with the method above I was able to plot one figure that was really good. So this should be a start.
Hope this helps