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

Last change on this file since 131 was 131, checked in by pinsard, 18 years ago

improvements of ReadWrite/?*.pro header

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