source: trunk/SRC/Tests/tst_basic.pro @ 114

Last change on this file since 114 was 114, checked in by smasson, 18 years ago

new compilation options (compile_opt idl2, strictarrsubs) in each routine

  • Property svn:executable set to *
File size: 838 bytes
Line 
1PRO tst_basic
2;
3; figure 1: basics plots
4;
5; 1) plot
6;
7;
8  compile_opt idl2, strictarrsubs
9;
10  n = 10
11  y = findgen(n)
12; basic plot
13  splot, y, small = [2, 2, 1], /portrait
14; improved plot by using plot and "graphic keywords"
15  splot, y, small = [2, 2, 2], /noerase, yrange = [0, (n-1)^2], title = 'x and x^2'
16  oplot, y^2, color = 100, linestyle = 2, thick = 3
17;
18; 2) contour
19;
20  z = dist(n)
21; basic plot
22  scontour, z, /fill, nlevels = 15, small = [2, 2, 3], /noerase
23; improved plot by using contour and "graphic keywords"
24  ind = findgen(2*n)/(2.*n)
25  scontour, z, levels = n*ind, c_orientation = 180*ind, c_spacing = .2*ind $
26            , small = [2, 2, 4], /noerase
27  contour, z, /overplot, c_label = rebin([1, 0], 2, n), levels = n*ind $
28           , c_charthick = 2, c_charsize = 1.5, c_colors = 250*ind
29           
30  return
31end
Note: See TracBrowser for help on using the repository browser.