pro colorbar, prLoc, plotscale, minval, maxval ;---------------------------------------------------------------------------------- ; ; Put a colorbar on the plots ; - B.Bhattacharya, 4/28/97 ; ; Modification History: ; ;---------------------------------------------------------------------------------- COMMON plot_params ;pinit,pfin,di are defined in the routine quickpic as the initial and final locations ;of the color bar on the plot and the size of the box for each color case strupcase(prloc) of 'S': begin for p=pinit+di, pfin,di do begin polyfill,[p,p+di,p+di,p],[0.12,0.12,.14,.14],color=fix(p*256.0/pfin),/normal endfor xyouts,0.40,0.16,strtrim(string(plotscale))+$ ' color scale from '+strtrim(string(minval,format='(E8.2)'))+$ ' to '+strtrim(string(maxval,format='(E8.2)')),$ charsize=0.7,color=200 ,/normal end 'P': begin for p=pinit+di, pfin,di do begin polyfill,[p,p+di,p+di,p],[0.10,0.10,0.12,0.12],color=fix(p*256.0/pfin),/normal endfor xyouts,0.43,0.14,strtrim(string(plotscale))+$ ' color scale from '+strtrim(string(minval,format='(E8.2)'))+$ ' to '+strtrim(string(maxval,format='(E8.2)')),$ charsize=0.7, color=175, /normal end endcase END