note | The dimension argument breaks with PV-WAVE convention of 0-based indexing and is instead 1-based. That is, the 0th dimension of an array is specified by a 1 and the first dimension by a 2. |
; Create a 4-by-3 integer array. Each element has a value equal
; to its one-dimensional subscript.
a = INDGEN(4, 3)
PRINT, a
; PV-WAVE prints:
; 0 1 2 3
; 4 5 6 7
; 8 9 10 11
; Reverse the rows of a.
PRINT, REVERSE(a)
; PV-WAVE prints:
; 3 2 1 0
; 7 6 5 4
; 11 10 9 8
; Reverse the columns of a.
PRINT, REVERSE(a, 2)
; PV-WAVE prints:
; 8 9 10 11
; 4 5 6 7
; 0 1 2 3
; Reverse the columns and rows of a.
PRINT, REVERSE(REVERSE(a), 2)
; PV-WAVE prints:
; 11 10 9 8
; 7 6 5 4
; 3 2 1 0
image1 = BYTARR(250, 200)
OPENR, unit, !Data_dir + 'scientist3.dat', /Get_lun
READU, unit, image1
FREE_LUN, unit
WINDOW, Xsize=500, Ysize=200
TV, image1, 0
TV, REVERSE(image1), 1