function rgbData=rgbPlot(redData,greenData,blueData,colorFlipVars,displayAxis,doflipud,dofliplr,rect)
%Plots an RGB image
%Inputs: radiance data from AIRS granule
%        red,green, and blue bands selected (string)
%        axis to display rgb plot on
% Kevin Baggett 
% Updated for airatee Thu May  1 18:32:51 GMT 2003

h=waitbar(0,'Please wait...');
rgbData.redimagedata=getPlotValues(redData,doflipud,dofliplr,rect);
waitbar(.1,h);
rgbData.greenimagedata=getPlotValues(greenData,doflipud,dofliplr,rect);
waitbar(.2,h);
rgbData.blueimagedata=getPlotValues(blueData,doflipud,dofliplr,rect);
waitbar(.3,h);
% temporary fix to what to specify to true color scale (would have something for visible channels)
% see manatee function getRGBVar.m
% optional third argument when visible selected (reflectance)
redCellStr=getRGBCell(colorFlipVars.red);
blueCellStr=getRGBCell(colorFlipVars.blue);
greenCellStr=getRGBCell(colorFlipVars.green);

rgbImage(:,:,1)=trueColorScale(redCellStr,rgbData.redimagedata);
waitbar(.55,h);
rgbImage(:,:,2)=trueColorScale(greenCellStr,rgbData.greenimagedata);
waitbar(.80,h);
rgbImage(:,:,3)=trueColorScale(blueCellStr,rgbData.blueimagedata);
waitbar(1,h);
close(h);
rgbData.rect=rect;
axes(displayAxis);
cla;
imagesc(rgbImage);
set(gca,'XTick',[]);
set(gca,'YTick',[]);
