Can I create a contour plot with 0's and NaN's

Hi, I hope someone can help. I'm relatively new to Matlab but have managed to create plots for my data. I have 52 years of data for each species I have. Some of these are 0 values as none of that species were found and others are NaN's as a trawl was not done in that month - I have written a code which creates a pcolour plot but its really doesn't look very nice. I also need to log the data as they are such large values. is there a way to create a contour plot showing the 0's as one colour and the NaN's as another. This is my code:
load 'DinoC.txt';
month = (1:12); year = 1958:2009;
logDinoC=log10(DinoC); k=find(logDinoC==-Inf); logDinoC(k)=0; caxis([0 6]);
pcolor(year,month,logDinoC');shading flat colorbar; xlabel('Year'); ylabel('Month');
title('Dinoflagellates (Size Class C& Total'); month_names = ['Jan';'Feb';'Mar';'Apr';'May';'Jun';'Jul';'Aug';'Sep';'Oct';'Nov';'Dec']; set(gca,'YTickLabel')
If anyone could help I'd really appreciate it. Cheers guys! Zoe

Answers (0)

Categories

Asked:

Zoe
on 6 Aug 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!