comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Oops. UserSymbol, Take II

Oops. UserSymbol, Take II
type: item
description: Foolishly enough, I didn't check all the logic in the previous posting of UserSymbol. It should have worked if a correct symbol name was entered, but the part which matched partial names was broken. Sorry to all who had trouble, and thanks to Dave Steele for pointing out the problem. This version should work (knock on wood). ;+ ; NAME: UserSymbol ; PURPOSE: Make neat little user defined symbols ; CATEGORY: Plotting/Graphics ; ; CALLING SEQUENCE: UserSymbol,symbol_name ; ; INPUTS: ; Symbol_name a string containing the name of the desired symbol. ; Some possible options are Square,Triangle,Circle, ; Hexagon,BigX,Clover,Spiral,Star... ; ; KEYWORD PARAMETERS: ; SIZE Symbol size (default=1) ; LIST if set, puts the list of available symbol names ; in the input parameter Symbol_Name ; HELP if set, returns this documentation header ; ; and also the keywords which apply to USERSYM ; THICK Line thickness (default=1) ; FILL Fill symbol? (default=0=no) ; COLOR Symbol color ; ; SIDE EFFECTS: Calls USERSYM to load the new symbol ; ; EXAMPLE: UserSymbol,'BigX' ;to change to an X outline ; UserSymbol,list,/LIST ;to get a list of possible symbols ; ; MODIFICATION HISTORY: Brian Jackel August 10 1992 ; University of Western Ontario ; ; Bjj June 2 1994 Fixed up the handling of no clear match. ;- pro USERSYMBOL,symbol_name,SIZE=size,LIST=list,HELP=help,_EXTRA= _extra ON_ERROR,2 IF KEYWORD_SET(HELP) THEN BEGIN doc_library,'USERSYMBOL' return ENDIF symbol_list= ['DIAMOND','PENTAGON','CLOVER','PACMAN','SPIRAL','BIGX'] symbol_list= [symbol_list,'CIRCLE','SQUARE','TRIANGLE','STAR','HEXAGON'] IF KEYWORD_SET(LIST) THEN BEGIN symbol_name= symbol_list return ;return a list of the available symbols ENDIF IF not KEYWORD_SET(SIZE) THEN size=1.0 symbol= STRUPCASE( STRCOMPRESS(symbol_name,/REMOVE_ALL) ) CASE symbol OF 'DIAMOND': BEGIN x= size* [0.0,0.8,0.0,-0.8,0.0] y= size* [1.2,0.0,-1.2,0.0,1.2] END 'PENTAGON':BEGIN theta= findgen(6)/5 * 360.0 * !dtor x= 1.0 *size* sin(theta) y= 1.0 *size* cos(the…
creator: Jackel
date: 1994-06-02T05:31:32-00:00