source: trunk/SRC/ToBeReviewed/PLOTS/plotsym.pro @ 163

Last change on this file since 163 was 163, checked in by navarro, 18 years ago

header improvements : type of parameters and keywords, default values, spell checking + idldoc assistant (IDL online_help)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.4 KB
Line 
1;+
2;
3; @file_comments
4; function to make plotting symbols much easier.
5;
6; @categories
7; Graphics
8;
9; @Keyword circle
10; circle symbol
11;
12; @Keyword TRIANGLE
13; triangle symbol
14;
15; @Keyword DIAMOND
16; diamond symbol
17;
18; @Keyword BOX
19; box symbol
20;
21; @Keyword LINE
22; line symbol
23 ;
24; @Keyword SCALE
25; scales the symbol
26;
27; @Keyword ANGLE
28; angle the symbol should be rotated
29;
30; @Keyword _EXTRA
31; extra keywords for usersym.  These are thick, color and fill
32;
33; @history
34; Written by:
35; Ronn Kling
36; Ronn Kling Consulting
37; 7038 Westmoreland Dr.
38; Warrenton, VA 20187
39; klingrl\@juno.com
40; copyright 1999, all rights reserved
41;
42; @version
43; $Id$
44;
45;-
46
47function plotsym, circle=circle, triangle=triangle, diamond=diamond, $
48                  angle=angle, box=box, line=line, scale=scale, $
49                  _extra=extra
50;
51  compile_opt idl2, strictarrsubs
52;
53if not keyword_set(scale) then scale=1.0
54if not keyword_set(angle) then angle=0.0
55
56if keyword_set(circle) then begin
57  theta = findgen(30)/29.*360.
58endif else if keyword_set(triangle) then begin
59  theta = [-30.,90.,210., -30.]
60endif else if keyword_set(diamond) then begin
61  theta = [0.,90.,180.,270.,0.]
62endif else if keyword_set(box) then begin
63  theta = [315.,45.,135.,225.,315.]
64endif else if keyword_set(line) then begin
65  theta = [-180.,0.]
66endif
67
68theta = theta + angle
69x = cos(theta * !dtor) * scale
70y = sin(theta * !dtor) * scale
71
72usersym, x,y, _extra=extra
73return,8
74end
Note: See TracBrowser for help on using the repository browser.