w_left=0.16 w_rght=0.05 w_bot=0.16 w_top=0.14 space=0.03 width=0.1 img_cbar_posns, w_left, w_rght, w_bot, w_top, space, width, $ imgposn, cbarposn, f_hor, f_ver if ps eq 0 and wopen(7) eq 0 then window,7,xs=f_hor*500, ys= f_ver*400 ;IMPORTANT NOTE: WHEN USING NONDECOMPOSED COLOR (PS OR X WITH ;PSEUDOCOLOR), YOU ***MUST*** INCLUDE THE FOLLOWING STATEMENT; AND ;INCLUDING IT WITH DECOMPOSED COLOR IS OK: pseudo_ch,colr;, /original if n_elements(ps) eq 0 then ps=0 erase ;if ps then psopen, 'test.ps', xsize=5, ysize=4, /inch, /color, $ if ps then psopen, 'pseudoplot.ps', xsize=5, ysize=4, /inch, /color, $ /times, /bold, /isolatin1 !p.font=ps-1 !p.thick=6 !x.thick=4 !y.thick=4 ;need loadct,0 in colorbar because it then faithfully tracks colr... loadct,0 colorbar, pos=cbarposn, crange=[0,255], rgb=colr, $color=!black, $ xtit=textoidl('Color, 0 \rightarrow 255');;;;, ps=ps ;use setcolors here so graphics text and colors are correct... setcolors, /sys ;loadct,0 plot, colr[*,0], /nodata, position=imgposn, /noerase, $ xra=[0,256], /xsty, xtit='Image Intensity', $ yra=[0,260], /ysty, ytit='Color Intensity' ;, color=!black;;;;;;, $ ;;; title='The Colortable Created by pseudo_ch' oplot, colr[*,0], color=!red oplot, colr[*,1], color=!green, lines=2 oplot, colr[*,2], color=!blue, lines=3 indxcyan=where( colr[*,1] eq 255 and colr[*,2] eq 255, countcyan) if countcyan ne 0 then oplot, minmax(indxcyan), [255,255], color=!cyan indxcyan=where( colr[*,0] eq 255 and colr[*,2] eq 255, countcyan) if countcyan ne 0 then oplot, minmax(indxcyan), [255,255], color=!magenta ;device, decomposed=1 legend, ['Red', 'Green', 'Blue'], lines=[0,2,3], colors=[!red,!green,!blue], $ position=[20,100], thick=[6,6,6], textcolors=[!red,!green,!blue] if ps then psclose setcolors, /sys !p.font=-1 !p.thick=0 !x.thick=4 !y.thick=4