source: trunk/SRC/Tests/tst_basic.pro

Last change on this file was 325, checked in by pinsard, 16 years ago

modification of some headers (+some corrections) to prepare usage of the new idldoc

  • Property svn:keywords set to Id
File size: 930 bytes
Line 
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;-
14PRO tst_basic
15;
16; 1) plot
17;
18  compile_opt idl2, strictarrsubs
19;
20  n = 10
21  y = findgen(n)
22; basic plot
23  splot, y, small = [2, 2, 1], /portrait
24; improved plot by using plot and "graphic keywords"
25  splot, y, small = [2, 2, 2], /noerase, yrange = [0, (n-1)^2], title = 'x and x^2'
26  oplot, y^2, color = 100, linestyle = 2, thick = 3
27;
28; 2) contour
29;
30  z = dist(n)
31; basic plot
32  scontour, z, /fill, nlevels = 15, small = [2, 2, 3], /noerase
33; improved plot by using contour and "graphic keywords"
34  ind = findgen(2*n)/(2.*n)
35  scontour, z, levels = n*ind, c_orientation = 180*ind, c_spacing = .2*ind $
36            , small = [2, 2, 4], /noerase
37  contour, z, /overplot, c_label = rebin([1, 0], 2, n), levels = n*ind $
38           , c_charthick = 2, c_charsize = 1.5, c_colors = 250*ind
39  return
40end
Note: See TracBrowser for help on using the repository browser.