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

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

improvements/corrections of some *.pro headers

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.4 KB
RevLine 
[2]1;+
2;
[142]3; @file_comments
4; function to make plotting symbols much easier.
[223]5;
[142]6; @categories
[157]7; Graphics
[2]8;
[223]9; @keyword circle
[142]10; circle symbol
[223]11;
12; @keyword TRIANGLE
[142]13; triangle symbol
[223]14;
15; @keyword DIAMOND
[163]16; diamond symbol
[223]17;
18; @keyword BOX
[142]19; box symbol
[223]20;
21; @keyword LINE
[142]22; line symbol
[223]23;
24; @keyword SCALE
[142]25; scales the symbol
[223]26;
27; @keyword ANGLE
[142]28; angle the symbol should be rotated
[223]29;
30; @keyword _EXTRA
[231]31; Used to pass keywords to <pro>usersym</pro>.
32; These are thick, color and fill.
[2]33;
[142]34; @history
[2]35; Written by:
36; Ronn Kling
37; Ronn Kling Consulting
38; 7038 Westmoreland Dr.
39; Warrenton, VA 20187
[157]40; klingrl\@juno.com
[2]41; copyright 1999, all rights reserved
[142]42;
43; @version
44; $Id$
[223]45;
[2]46;-
[231]47;
48FUNCTION plotsym, circle=circle, triangle=triangle, diamond=diamond, $
[97]49                  angle=angle, box=box, line=line, scale=scale, $
50                  _extra=extra
[114]51;
52  compile_opt idl2, strictarrsubs
53;
[2]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.