Special characters in axis labels [message #3108] |
Wed, 16 November 1994 13:25  |
am9963
Messages: 1 Registered: November 1994
|
Junior Member |
|
|
Does anyone know how to put special characters in the axis labels when
you make a postscript plot in idl? I need to label one axis as angstroms
and I can't seem to be able to find a way to put the ascii code for the
angstrom symbol in the text string which describes the x-axis. How do I
let idl know that I want ascii symbol 197 in my string and not "197"?
I have looked all over in the documentation and can't find how to do this.
Any help would be greatly appreciated.
--
Alan E. Munter
munter@uiuc.edu
|
|
|
Re: Special characters in axis labels [message #3201 is a reply to message #3108] |
Thu, 17 November 1994 10:03   |
agraps
Messages: 35 Registered: September 1994
|
Member |
|
|
am9963@glhpx6 (Alan Edwin Munter) writes:
> Does anyone know how to put special characters in the axis labels when
> you make a postscript plot in idl? I need to label one axis as angstroms
> and I can't seem to be able to find a way to put the ascii code for the
> angstrom symbol in the text string which describes the x-axis.
> --
> Alan E. Munter
> munter@uiuc.edu
Alan:
When I had to do what you wanted a long time ago, I looked it up in
Adobe's Postscript Lang Reference Manual. I don't have my manual
handy, so I don't recall the octal reference number. (For example, for
degree, the octal value is : \260.) I tried to find the angstrom
symbol in another postscript book that I have, and I could only find
the octal number for the "ring" symbol, the circle over the A: \312.
So how about trying this: draw a regular A, and back up and put the
ring over it? Say the A is in Times-Roman font: !7. Note, !9 is the
symbol font, !S is the save position action, !R is the restore
position action, !X returns to the entry font, and !N shifts back to
the normal level (probably not necessary).
So, try this: (haven't tested it, so I don't know if this works)
Angstrom = '!S!7A!R!9\312!N!X'
xlabel = 'Wavelength ('+Angstrom+')'
(draw xlabel)
Amara
--
************************************************************ **********
Amara Graps email: agraps@netcom.com
Computational Physicist vita: finger graps@clio.arc.nasa.gov
Intergalactic Reality bio: finger -lm agraps@netcom.com
************************************************************ **********
"If you wish to drown, do not torture yourself with shallow water."
--A Bulgarian proverb
|
|
|
|
|