function mod06Plotter(imageData,varToPlot,fileName)
% Plots variables associated with MOD06 Files
% Inputs: imageData to plot
%         the variable to plot as a string
%         the current MOD06 filename
% Ouput:  none
% Kevin Baggett
% Wed Feb 27 17:19:30 UTC 2002

f=openfig('mod06');
h=guihandles(f);
guidata(gcf,h);

%make plots of the variables
axes(h.axDisplay);
cla;

[temp,rem]=strtok(fileName,'.');
[yearday,rem]=strtok(rem,'.');
yr=yearday(length(yearday)-6:length(yearday)-3);
dy=yearday(length(yearday)-2:length(yearday));
hr=strtok(rem,'.');
plotString = sprintf('MODIS %s %s %s UTC',yr,dy,hr);
switch varToPlot
case 'Cloud Phase'
    plotCloudPhase(imageData,plotString);
    set(h.mnuMod06Contrast,'Visible','Off');
case 'Cloud Top Pressure'
    imagesc(imageData);
    title(plotString);
    set(gca,'XTick',[],'YTick',[]);
    caxis([0 1100])
    c=colorbar;
    label=get(c,'XLabel');
    set(label,'String',sprintf('%s (mb)',varToPlot));
case 'Cloud Top Temperature'
    imagesc(imageData);
    title(plotString);
    set(gca,'XTick',[],'YTick',[]);
    caxis([0 320]);
    c=colorbar;
    label=get(c,'XLabel');
    set(label,'String',sprintf('%s (K)',varToPlot));
case 'Effective Cloud Emissivity'
    indx=find(imageData>1);
    imageData(indx)=0;
    imagesc(imageData);
    title(plotString);
    set(gca,'XTick',[],'YTick',[]);
    caxis([0 1]);
    c=colorbar;
    label=get(c,'XLabel');
    set(label,'String',varToPlot);
end
set(gcf,'Name',varToPlot);