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

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

keywords in uppercase in headers of pro files

  • 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;-
47;
48FUNCTION plotsym, circle=circle, triangle=triangle, diamond=diamond, $
49                  angle=angle, box=box, line=line, scale=scale, $
50                  _EXTRA=extra
51;
52  compile_opt idl2, strictarrsubs
53;
54if not keyword_set(scale) then scale=1.0
55if not keyword_set(angle) then angle=0.0
56
57if keyword_set(circle) then begin
58  theta = findgen(30)/29.*360.
59endif else if keyword_set(triangle) then begin
60  theta = [-30.,90.,210., -30.]
61endif else if keyword_set(diamond) then begin
62  theta = [0.,90.,180.,270.,0.]
63endif else if keyword_set(box) then begin
64  theta = [315.,45.,135.,225.,315.]
65endif else if keyword_set(line) then begin
66  theta = [-180.,0.]
67endif
68
69theta = theta + angle
70x = cos(theta * !dtor) * scale
71y = sin(theta * !dtor) * scale
72
73usersym, x,y, _extra=extra
74return,8
75end
Note: See TracBrowser for help on using the repository browser.