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

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

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

  • 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; Used to pass keywords to <proidl>USERSYM</proidl>.
32; These are thick, color and fill.
33;
34; @history
35; Written by:
36; Ronn Kling
37; Ronn Kling Consulting
38; 7038 Westmoreland Dr.
39; Warrenton, VA 20187
40; klingrl\@juno.com
41; copyright 1999, all rights reserved
42;
43; @version
44; $Id$
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.