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