Pro coltria30 ;+ ; Demo program: sows a grid of 30 triangles with color indices 0-29 ; ; LN 2001 ;- erase loadct,5 ; load color table 5 c=loadct19() ; load personal standard table into the first 19 indices ;... in NORMAL coordinates y0 = 0.87 ; upper side y1 = 0.03 ; lower side x0 = 0.03 ; left side x1 = .97 ; right side ncols = 6 ; number of column dx = (x1-x0) / ncols ; X step ncolors = 30 ; number of colors DEVICE, SET_FONT='helvetica', /TT_FONT ; select TrueType Helvetica font xyouts, 0.5, 0.95, 'First 30 colors of current table', siz=2.5, alig=0.5, /norm nrows = ncolors / ncols ; numero di righe dy = (y1-y0) / nrows ; step in Y plots, [x1, x1], [y0, y1], /NORM plots, [x0, x1], [y0, y0], /NORM for iy=0, nrows-1 do begin ; per ogni riga y = y0 + (iy+1) * dy for ix=0,ncols-1 do begin ; per ogni colonna X = (ix) * dx + x0 k = iy*6 + ix s = string(k) POLYFILL, [x+dx,x,x,x,x+dx], [y,y-dy,y-dy,y,y], /NORM, COLOR=k xyouts,x+.0225,y+.01,'!3'+s,size=2.0,/norm endfor plots, [x0, x1], [y, y], /NORM endfor for ix=0,ncols do begin ; per ogni colonna x = x0 + ix * dx y = y0 + 0.01 xx = x + dx/2 plots, [x,x],[y0,y1], /norm endfor return end