[131] | 1 | ;+ |
---|
| 2 | ; @file_comments |
---|
| 3 | ; figure 1: basics plots |
---|
| 4 | ; plot and contours |
---|
| 5 | ; |
---|
| 6 | ; @history |
---|
| 7 | ; Sebastien Masson may 2005 |
---|
| 8 | ; |
---|
| 9 | ; @version $Id$ |
---|
| 10 | ;- |
---|
[231] | 11 | ; |
---|
[58] | 12 | PRO tst_basic |
---|
| 13 | ; |
---|
| 14 | ; 1) plot |
---|
| 15 | ; |
---|
[114] | 16 | compile_opt idl2, strictarrsubs |
---|
| 17 | ; |
---|
[58] | 18 | n = 10 |
---|
| 19 | y = findgen(n) |
---|
| 20 | ; basic plot |
---|
| 21 | splot, y, small = [2, 2, 1], /portrait |
---|
| 22 | ; improved plot by using plot and "graphic keywords" |
---|
| 23 | splot, y, small = [2, 2, 2], /noerase, yrange = [0, (n-1)^2], title = 'x and x^2' |
---|
| 24 | oplot, y^2, color = 100, linestyle = 2, thick = 3 |
---|
| 25 | ; |
---|
| 26 | ; 2) contour |
---|
| 27 | ; |
---|
| 28 | z = dist(n) |
---|
| 29 | ; basic plot |
---|
| 30 | scontour, z, /fill, nlevels = 15, small = [2, 2, 3], /noerase |
---|
| 31 | ; improved plot by using contour and "graphic keywords" |
---|
| 32 | ind = findgen(2*n)/(2.*n) |
---|
| 33 | scontour, z, levels = n*ind, c_orientation = 180*ind, c_spacing = .2*ind $ |
---|
| 34 | , small = [2, 2, 4], /noerase |
---|
| 35 | contour, z, /overplot, c_label = rebin([1, 0], 2, n), levels = n*ind $ |
---|
| 36 | , c_charthick = 2, c_charsize = 1.5, c_colors = 250*ind |
---|
| 37 | return |
---|
| 38 | end |
---|