source: trunk/PLOTS/plotsym.pro @ 2

Last change on this file since 2 was 2, checked in by opalod, 22 years ago

Initial revision

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.3 KB
Line 
1function plotsym, circle=circle, triangle=triangle, diamond=diamond, $
2                  angle=angle, box=box, line=line, scale=scale, $
3                  _extra=extra
4;+
5; NAME:
6;  plotsym
7; PURPOSE:
8;  function to make plotting symbols much easier.
9; Usage:
10;   plot,x,y,psym=plotsym(/circle,scale=2,/fill)
11;
12; CATEGORY:
13;   Graphics.
14;
15; Keywords:
16;  circle =  circle symbol
17;  triangle = triangle symbol
18;  diamond = diamond symbold
19;  box = box symbol
20;  line = line symbol
21;  scale = scales the symbol
22;  angle = angle the symbol should be rotated
23;  _extra = extra keywords for usersym.  These are thick, color and fill
24;
25; Written by:
26; Ronn Kling
27; Ronn Kling Consulting
28; 7038 Westmoreland Dr.
29; Warrenton, VA 20187
30; klingrl@juno.com
31; copyright 1999, all rights reserved
32;-
33
34if not keyword_set(scale) then scale=1.0
35if not keyword_set(angle) then angle=0.0
36
37if keyword_set(circle) then begin
38  theta = findgen(30)/29.*360.
39endif else if keyword_set(triangle) then begin
40  theta = [-30.,90.,210., -30.]
41endif else if keyword_set(diamond) then begin
42  theta = [0.,90.,180.,270.,0.]
43endif else if keyword_set(box) then begin
44  theta = [315.,45.,135.,225.,315.]
45endif else if keyword_set(line) then begin
46  theta = [-180.,0.]
47endif
48
49theta = theta + angle
50x = cos(theta * !dtor) * scale
51y = sin(theta * !dtor) * scale
52
53usersym, x,y, _extra=extra
54return,8
55end
Note: See TracBrowser for help on using the repository browser.