comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » plotting a tropical cyclone symbol
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
plotting a tropical cyclone symbol [message #94499] Wed, 14 June 2017 09:26 Go to next message
Brian McNoldy is currently offline  Brian McNoldy
Messages: 35
Registered: July 2000
Member
Something that several users of this language would likely find useful is the tropical cyclone symbol (basically a circle with two spiral arms sticking out).

In Hershey fonts, one variety exists: in the Miscellaneous font set, it is the "<" character ( https://www.harrisgeospatial.com/docs/html/images/font20.gif). With the TEXT function, it can be created using:
t=text(x,y,"<",font_name="Hershey 20")

However, that symbol has variants that would be extremely useful if they were available. If the symbol is filled in, it represents a hurricane; if it's unfilled, it represents a tropical storm. But the same two symbols should exist for the southern hemisphere too; the unfilled or filled symbol would be flipped upside-down.

These four symbols would be excellent to have in IDL... All four symbols are already available in NCL:
https://www.ncl.ucar.edu/Document/Graphics/Images/font35.png ("k" and "m")
https://www.ncl.ucar.edu/Document/Graphics/Images/font37.png ("p" and "s")

Anyone have any insights into this?

Thank you!!
Brian
Re: plotting a tropical cyclone symbol [message #94500 is a reply to message #94499] Wed, 14 June 2017 10:51 Go to previous messageGo to next message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
If you have the font file (ttf) I think that you can add the font to IDL and use its characters...
http://slugidl.pbworks.com/w/page/29632183/Adding%20a%20Font %20to%20IDL%20and%20Very%20Special%20Characters
Re: plotting a tropical cyclone symbol [message #94501 is a reply to message #94500] Wed, 14 June 2017 11:23 Go to previous messageGo to next message
Brian McNoldy is currently offline  Brian McNoldy
Messages: 35
Registered: July 2000
Member
On Wednesday, June 14, 2017 at 1:51:31 PM UTC-4, nata wrote:
> If you have the font file (ttf) I think that you can add the font to IDL and use its characters...
> http://slugidl.pbworks.com/w/page/29632183/Adding%20a%20Font %20to%20IDL%20and%20Very%20Special%20Characters

Thanks for the suggestion, but I do not have or know of a TTF file with those characters/symbols. They are pretty hard to come by, but since NCL offers all of them, it would make sense that IDL would want to remain competitive.
Re: plotting a tropical cyclone symbol [message #94530 is a reply to message #94501] Tue, 27 June 2017 08:10 Go to previous messageGo to next message
Kenneth Bowman is currently offline  Kenneth Bowman
Messages: 86
Registered: November 2006
Member
On Wednesday, June 14, 2017 at 1:23:43 PM UTC-5, Brian McNoldy wrote:

> Thanks for the suggestion, but I do not have or know of a TTF file with those characters/symbols. They are pretty hard to come by, but since NCL offers all of them, it would make sense that IDL would want to remain competitive.

You can draw an arbitrary filled or unfilled symbol using USERSYM and plot it with PLOTS.

We used it to create the outline of an airplane for animations of flight tracks (including rotating the direction of the plane).

This creates a filled or unfilled circular plotting symbol for when you need a finite-sized dot (as opposed to PSYM = 3).

Unfortunately you can only have on e USERSYM at at time, so you will have to redefine the symbol when switching between filled and unfilled.

Ken

PRO USERSYM_CIRCLE, FILL = fill, NPOINT = npoints

;+
; Name:
; USERSYM_CIRCLE
; Purpose:
; Define a circular plotting symbol using USERSYM.
; Calling sequence:
; USERSYM_CIRCLE
; Inputs:
; None
; Output:
; Changes definition of user-defined symbol (PSYM = 8).
; Keywords:
; FILL : If set, make the symbol filled
; Author and history:
; K. Bowman. 2006-07-11
;-

COMPILE_OPT IDL2 ;Set compile options

IF (N_ELEMENTS(npoints) EQ 0) THEN npoints = 17

USERSYM, 0.5*COS(2.0*!PI*FINDGEN(npoints)/npoints), $ ;Create circular plotting symbol
0.5*SIN(2.0*!PI*FINDGEN(npoints)/npoints), $
FILL = fill

END
Re: plotting a tropical cyclone symbol [message #94552 is a reply to message #94530] Mon, 03 July 2017 13:09 Go to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
I've added 4 new symbols to the DejaVuSymbol font in IDL 8.6.1, representing tropical cyclones (filled/unfilled, Northern/Southern).

You can access these by setting the font to DejaVuSymbol and using byte codes 234, 236, 248, or 250.

Cheers,
Chris
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Pretty maps in IDL?
Next Topic: More that 2800 Solutions Manuals (Part 2)

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:35:03 PDT 2025

Total time taken to generate the page: 0.00644 seconds