function rgbData=rgbPlot(filename,pathname,redband,greenband,blueband,displayAxis,doflipud,dofliplr,rect)
%Plots an RGB image
%Inputs: filename and pathname of hdf file
%        red,green, and blue bands selected (string)
%        axis to display rgb plot on
% Kevin Baggett Thu Aug  9 18:48:56 UTC 2001

h=waitbar(0,'Please wait...');
[rgbData.redvar,redcellstr,redzvar]=getRGBVar(redband);
[rgbData.greenvar,greencellstr,greenzvar]=getRGBVar(greenband);
[rgbData.bluevar,bluecellstr,bluezvar]=getRGBVar(blueband);
rgbData.redimagedata=plotband(filename,pathname,redband,displayAxis,0,rgbData.redvar,0,doflipud,dofliplr,rect);
waitbar(.1,h);
rgbData.greenimagedata=plotband(filename,pathname,greenband,displayAxis,0,rgbData.greenvar,0,doflipud,dofliplr,rect);
waitbar(.2,h);
rgbData.blueimagedata=plotband(filename,pathname,blueband,displayAxis,0,rgbData.bluevar,0,doflipud,dofliplr,rect);
waitbar(.3,h);
s=['rgbImage(:,:,1)=trueColorScale(' redcellstr ',rgbData.redimagedata.mimage' redzvar ');'];
eval(s);
waitbar(.55,h);
s=['rgbImage(:,:,2)=trueColorScale(' greencellstr ',rgbData.greenimagedata.mimage' greenzvar ');'];
eval(s);
waitbar(.80,h);
s=['rgbImage(:,:,3)=trueColorScale(' bluecellstr ',rgbData.blueimagedata.mimage' bluezvar ');'];
eval(s);
waitbar(1,h);
close(h);
rgbData.rect=rect;
axes(displayAxis);
cla;
imagesc(rgbImage);
set(gca,'XTick',[]);
set(gca,'YTick',[]);
