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

Home » Public Forums » archive » RE: Angstrom Symbol Nonsense
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
RE: Angstrom Symbol Nonsense [message #8000] Sun, 02 February 1997 00:00
mallozzi is currently offline  mallozzi
Messages: 60
Registered: August 1994
Member
Hi all,

All this talk about symbols reminded me of a package called TexToIDL that
I found somewhere on the web. If you like TeX, this is a really neat
program written by Matthew W. Craig that lets you specify symbols using
TeX format. For example, if I wanted to XYOUTS the symbol for chi^2,

XYOUTS, X, Y, TexToIDL('\chi^2')

This is *much* easier than !7V!U2!N I think ;-) The documentation states
translation is also available for PostScript hardware font.

If anyone is interested and cannot find it on the web, I can make it
available from my web page.

PS I don't think the angstrom symbol is available with the package :-)

-bob mallozzi
http://cspar.uah.edu/~mallozzir/
Re: Angstrom Symbol Nonsense [message #8001 is a reply to message #8000] Sun, 02 February 1997 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Stein Vidar Hagfors Haugan <steinhh@rigil.uio.no> finally supplies us
with the Angstrom...er, Aring Symbol truth when he writes:

> As a native of a country where the combined office staff is
> probably spending millions of bucks each year trying to figure out
> "how do we get these blasted norwegian characters to work on *this* one!"
> whenver a piece of new equipment comes along, I'm proud to present the
> solution:
>
> set_plot,'PS'
> !P.font=0
>
> device,/isolatin1 ; It's only a shame that this is not the default...
>
> xyouts,0.5,0.5,/normal,string(197b)
> device,/close
> set_plot,'X'
>
> And to be really nitpicking, it's not at all an "angstrom sign" :-)
> It merely happens to be the character used in the name of the Swedish
> physicist {\Aa}ngstr{\"o}m.
>
> The KeySym is "Aring".

I *knew* we could figure this one out!

Thanks to Joe Gurman (who independently supplied this solution),
Andy Loughe, Bill Thompson, and Stein Vidar for all their help.

I'll write this down on my web page so I don't forget it the
*next* time I am asked. :-)

Cheers!

David

-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
2642 Bradbury Court, Fort Collins, CO 80521
Phone: 970-221-0438 Fax: 970-221-4762
E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
-----------------------------------------------------------
Re: Angstrom Symbol Nonsense [message #8005 is a reply to message #8000] Sun, 02 February 1997 00:00 Go to previous message
steinhh is currently offline  steinhh
Messages: 260
Registered: June 1994
Senior Member
In article <32F21F7B.738E@cdc.noaa.gov>, Andy Loughe <afl@cdc.noaa.gov> writes:
|> William Thompson wrote:
|>
|> >
|> > >David
|> >
|> > That's actually the same as the STRING("305B) that you suggested earlier, j
ust
|> > expressed in decimal as well as octal. It does work regardless of graphics
|> > device, including PostScript, so long as one avoids hardware fonts.
|> >
|> > Bill Thompson
|>
|>
|> Bingo!
|> I don't think this can be done, reliably at least, for hardware fonts.
|> What does that mean? With hardware fonts it may work in X, but never in
|> PS.

As a native of a country where the combined office staff is
probably spending millions of bucks each year trying to figure out
"how do we get these blasted norwegian characters to work on *this* one!"
whenver a piece of new equipment comes along, I'm proud to present the
solution:

set_plot,'PS'
!P.font=0

device,/isolatin1 ; It's only a shame that this is not the default...

xyouts,0.5,0.5,/normal,string(197b)
device,/close
set_plot,'X'

And to be really nitpicking, it's not at all an "angstrom sign" :-)
It merely happens to be the character used in the name of the Swedish
physicist {\Aa}ngstr{\"o}m.

The KeySym is "Aring".

Cheers,

Stein Vidar H. Haugan
Re: Angstrom Symbol Nonsense [message #8020 is a reply to message #8000] Fri, 31 January 1997 00:00 Go to previous message
Andy Loughe is currently offline  Andy Loughe
Messages: 174
Registered: November 1995
Senior Member
David Fanning wrote:

> It's elementary, my dear Watson. What I wrote was this:
>
> ang = '!6!sA!r!u!9 %!6!n'
>
> Take out your Geek to English dictionary. You can find it
> in Chapter 9 of the IDL User's Guide. This sentence is easily
> parsed:


"Geek" to English dictionary?

Just what are you implying about those of us who use IDL! ;-) ;-)


--
Andrew F. Loughe |
afl@cdc.noaa.gov
University of Colorado, CIRES Box 449 |
http://cdc.noaa.gov/~afl
Boulder, CO 80309-0449 | phn:(303)492-0707
fax:(303)497-7013
------------------------------------------------------------ ---------------
"I do not feel obliged to believe that the same God who has endowed us
with
sense, reason, and intellect has intended us to forego their use."
-Galileo
Re: Angstrom Symbol Nonsense [message #8023 is a reply to message #8020] Fri, 31 January 1997 00:00 Go to previous message
Andy Loughe is currently offline  Andy Loughe
Messages: 174
Registered: November 1995
Senior Member
William Thompson wrote:

>
>> David
>
> That's actually the same as the STRING("305B) that you suggested earlier, just
> expressed in decimal as well as octal. It does work regardless of graphics
> device, including PostScript, so long as one avoids hardware fonts.
>
> Bill Thompson


Bingo!
I don't think this can be done, reliably at least, for hardware fonts.
What does that mean? With hardware fonts it may work in X, but never in
PS.
Give it a try, I mean BOTH methods suggested by David Fanning. Here is
a
procedure for you...


pro test_fonts, setx=setx, setps=setps, hard=hard, soft=soft

!p.font = -1
set_plot, 'X'
if (keyword_set(setx)) then set_plot, 'X'
if (keyword_set(setps)) then set_plot, 'PS'
if (keyword_set(hard)) then !p.font = 0 ; Hardware fonts
if (keyword_set(soft)) then !p.font = -1 ; Vector-drawn fonts
!p.color = 0
!p.background = 1

ang1 = '1) ' + string("305B)
ang2 = '2) !6!sA!r!u!9%!6!n'

el_nino1 = '3) El Ni' + string(241B) + 'o'
el_nino2 = '4) El Ni' + string("241B) + 'o'
el_nino3 = '5) El Ni!sn!r!u!9A!6!no'

plot, indgen(1)

xyouts, .4, .8, ang1, /norm, chars=3
xyouts, .4, .7, ang2, /norm, chars=3
xyouts, .4, .6, el_nino1, /norm, chars=3
xyouts, .4, .5, el_nino2, /norm, chars=3
xyouts, .4, .4, el_nino3, /norm, chars=3

if (!d.name eq 'PS') then device, /close

end


--
Andrew F. Loughe |
afl@cdc.noaa.gov
University of Colorado, CIRES Box 449 |
http://cdc.noaa.gov/~afl
Boulder, CO 80309-0449 | phn:(303)492-0707
fax:(303)497-7013
------------------------------------------------------------ ---------------
"I do not feel obliged to believe that the same God who has endowed us
with
sense, reason, and intellect has intended us to forego their use."
-Galileo
Re: Angstrom Symbol Nonsense [message #8024 is a reply to message #8020] Fri, 31 January 1997 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Bill Thompson <thompson@orpheus.nascom.nasa.gov> writes:

>> ang = STRING(197B)

> That's actually the same as the STRING("305B) that you suggested earlier, just
> expressed in decimal as well as octal. It does work regardless of graphics
> device, including PostScript, so long as one avoids hardware fonts.

Uh, right. :-(

I should point out, however, that whether you are an octal sort of
person ("305), or hexadecimal ('C5'x), or (heaven forbid!) decimal
(197), there is no way this is going to work unless you are using
the Simplex Roman font.

The correct formulation, it seems to me, is this:

angstrom = '!3' + STRING(197B) + '!x'

Cheers!

Davod

-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
2642 Bradbury Court, Fort Collins, CO 80521
Phone: 970-221-0438 Fax: 970-221-4762
E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
-----------------------------------------------------------
Re: Angstrom Symbol Nonsense [message #8025 is a reply to message #8020] Fri, 31 January 1997 00:00 Go to previous message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
davidf@dfanning.com (David Fanning) writes:

> Brian Handy is traveling and unable to post to this newsgroup,
> but he points out to me that for his angstrom symbol he uses this:

> ang = STRING(197B)

> He claims it works on the display and in PostScript files.

> I don't know. I think it should be disqualified as being *way*
> too easy. Most of us programmer types would feel
> uncomfortable with it.

> Thanks, Brian!

> David

That's actually the same as the STRING("305B) that you suggested earlier, just
expressed in decimal as well as octal. It does work regardless of graphics
device, including PostScript, so long as one avoids hardware fonts.

Bill Thompson
Re: Angstrom Symbol Nonsense [message #8036 is a reply to message #8020] Thu, 30 January 1997 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Brian Handy is traveling and unable to post to this newsgroup,
but he points out to me that for his angstrom symbol he uses this:

ang = STRING(197B)

He claims it works on the display and in PostScript files.

I don't know. I think it should be disqualified as being *way*
too easy. Most of us programmer types would feel
uncomfortable with it.

Thanks, Brian!

David

-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
2642 Bradbury Court, Fort Collins, CO 80521
Phone: 970-221-0438 Fax: 970-221-4762
E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
-----------------------------------------------------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: S: catching the output of help,/mem into variable-programm ???
Next Topic: Speckle

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

Current Time: Wed Oct 08 13:43:26 PDT 2025

Total time taken to generate the page: 0.00823 seconds